From patchwork Tue Mar 10 10:21:14 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Kazior X-Patchwork-Id: 5976171 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 70992BF440 for ; Tue, 10 Mar 2015 10:21:21 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 882E820211 for ; Tue, 10 Mar 2015 10:21:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D9E4520212 for ; Tue, 10 Mar 2015 10:21:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752429AbbCJKVS (ORCPT ); Tue, 10 Mar 2015 06:21:18 -0400 Received: from mail-wi0-f171.google.com ([209.85.212.171]:39913 "EHLO mail-wi0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752397AbbCJKVP convert rfc822-to-8bit (ORCPT ); Tue, 10 Mar 2015 06:21:15 -0400 Received: by wiwl15 with SMTP id l15so28780681wiw.4 for ; Tue, 10 Mar 2015 03:21:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tieto.com; s=google; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=679TzgmQVu4XyJ1/uibdcZMGeaXtQSFkK8jXUSbD5eA=; b=kcuWs5KgQ4qv5AsPTz/et4flD5Q5fESudKg1qhwTklK/wqa6JU+9chca8kjiPE4zgU JNEMKfA7SuLzNHv0ieHvgLMlTyc2kkQWe5z3/xy/2AOf/CaQ4NPAanojVVyMG6jrLvLE is9v8Fnwku8mYjX9KFYzz56IVhZE0ZdB/NvbU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=679TzgmQVu4XyJ1/uibdcZMGeaXtQSFkK8jXUSbD5eA=; b=L2dYNMSBOw2S/kSwD2EE9GC6hBx600JPt5/fmQj3PTnQPYFGdS6dpjQxKgiHf3sT2O C80W6bfet+ke7w3gP6H/4Mj3hyUnk0/TjQVF+tRwZkiJEJWwRwHR29eBymfYZPP/cTTN DNugpLMhGkQI2Ajvux6BmIgGFRqFKejylB57mTwAZSP38ovrl0pHS5L9qlu4JDPhRaLw 45KLecgv5GiXqRA7tEqPmDcQ40B6YdQ98cWoZfk4Cu6Zgf2nZnWerBNRRIc9NU55Fugr NTa5ag8u2wJIHqNZwFKGbK0tPG1GM5ZRaHegkVhVApJNcPEuo9bKqfASOz9Vv5MEUvan ejxQ== X-Gm-Message-State: ALoCoQnUjSRlTTCw3fcOHnvCckSiT1zqNKQsJLVEKHkIbPtk6Ki1kDKVYm9JlL98gg0xmC/M/TVliYPnWWoXMettjSjGl1eZebRnWmnq6/Td+3cnZ6gbujvMXhUeybNyTPpXhglPU4Hy MIME-Version: 1.0 X-Received: by 10.194.77.230 with SMTP id v6mr68002110wjw.25.1425982874094; Tue, 10 Mar 2015 03:21:14 -0700 (PDT) Received: by 10.27.51.202 with HTTP; Tue, 10 Mar 2015 03:21:14 -0700 (PDT) In-Reply-To: <1425905138-9966-4-git-send-email-marek.puzyniak@tieto.com> References: <1425905138-9966-1-git-send-email-marek.puzyniak@tieto.com> <1425905138-9966-4-git-send-email-marek.puzyniak@tieto.com> Date: Tue, 10 Mar 2015 11:21:14 +0100 Message-ID: Subject: Re: [PATCH v3 3/3] ath10k: introduce basic tdls functionality From: Michal Kazior To: Marek Puzyniak Cc: "ath10k@lists.infradead.org" , linux-wireless , Marek Kwaczynski X-DomainID: tieto.com Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID,T_RP_MATCHES_RCVD,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On 9 March 2015 at 13:45, Marek Puzyniak wrote: > This patch adds functions to enable/disable tdls > and to configure tdls peer station for tlv based firmware. > Tdls peer uapsd and tdls channel switching are not supported. > Transmitting tdls data frames works only for ethernet > type frames, that's why data addressed to tdls sta > is in ethernet format. > > Tdls functionality for ath10k requires changes in mac80211 > provided in patch: > mac80211: initialize rate control earlier for tdls station > > Signed-off-by: Michal Kazior > Signed-off-by: Marek Kwaczynski > Signed-off-by: Marek Puzyniak > --- [...] Currently the patch doesn't account for the number of connected TDLS station properly. This can lead to firmware crash when number of allowed station peers is exceeded: > ath10k_pci 0000:04:00.0 mac vdev 0 peer create 68:94:23:c6:1f:33 (new sta) sta 1 / 32 peer 33 / 37 > [...] > ath10k_pci 0000:04:00.0 firmware crashed! (uuid 4f652378-c66d-43ff-989d-00f376ff11dc) Function ath10k_mac_{inc,dec}_num_stations() need to be fixed so that ar->num_stations (the following was *not* tested), e.g.: if (ar->num_stations >= ar->max_num_stations) @@ -4435,8 +4435,7 @@ static void ath10k_mac_dec_num_stations(struct ath10k_vif *arvif) lockdep_assert_held(&ar->conf_mutex); - if (arvif->vdev_type != WMI_VDEV_TYPE_AP && - arvif->vdev_type != WMI_VDEV_TYPE_IBSS) + if (arvif->vdev_type == WMI_VDEV_TYPE_STA && !sta->tdls) return; ar->num_stations--; Micha? --- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c @@ -4411,14 +4411,14 @@ static void ath10k_sta_rc_update_wk(struct work_struct *wk) mutex_unlock(&ar->conf_mutex); } -static int ath10k_mac_inc_num_stations(struct ath10k_vif *arvif) +static int ath10k_mac_inc_num_stations(struct ath10k_vif *arvif, + struct ieee80211_sta *sta) { struct ath10k *ar = arvif->ar; lockdep_assert_held(&ar->conf_mutex); - if (arvif->vdev_type != WMI_VDEV_TYPE_AP && - arvif->vdev_type != WMI_VDEV_TYPE_IBSS) + if (arvif->vdev_type == WMI_VDEV_TYPE_STA && !sta->tdls) return 0;