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: 5976181 Return-Path: X-Original-To: patchwork-ath10k@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 799089F318 for ; Tue, 10 Mar 2015 10:22:15 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8D07A20212 for ; Tue, 10 Mar 2015 10:22:14 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id AA63920225 for ; Tue, 10 Mar 2015 10:22:13 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1YVHIS-0000Oi-G5; Tue, 10 Mar 2015 10:21:56 +0000 Received: from mail-wi0-x229.google.com ([2a00:1450:400c:c05::229]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1YVHIH-0008VS-S6 for ath10k@lists.infradead.org; Tue, 10 Mar 2015 10:21:47 +0000 Received: by widfb4 with SMTP id fb4so17524846wid.0 for ; Tue, 10 Mar 2015 03:21:15 -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=FH0gmXAqglNKE7WBRFwNBQhtLQhBOniei5+1+g/1WLC0cnd6CNwo5lBMEF3zhUCdFH 5s4y6wbX+QamSsHAj4qW1swf2QqFkHxDltafsfwR3ua5FVdNXXRccm8wF+AudzZCpPrE Pesf8+9MutT/hdkMtZbBRxjuqr6VQIzmadi8qwW+Hei4oYO1t7mhAHJHZ/D3zDjsO+i3 /09xXI5HzJo7/ZLKuwIdUuq7sDbD8qw1l+vsIklAJ4A/CS0ylZquwXNjvJv6sSZgVO9X /AUd+czApqZFBgY17uYd2HU+0zDCMCbHn2uZWZ+d2OHijntZUhvzn3MHbd8FjytpKYkt nekg== X-Gm-Message-State: ALoCoQnITYpqtaP08NyU7jRgtL5dk8jDJ4MynAFVVos/rZAtM8Blmmmt3+7OEBPD1nLTpjr82Up/5aqwAax9soDawnCmmlG/Z4fTC4ZSKZDod+YCELivycWeVgg7QNsX6wH+GHf88QGY 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 X-DomainID: tieto.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150310_032146_108007_91A29575 X-CRM114-Status: GOOD ( 10.77 ) X-Spam-Score: -0.8 (/) Cc: Marek Kwaczynski , linux-wireless , "ath10k@lists.infradead.org" X-BeenThere: ath10k@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "ath10k" Errors-To: ath10k-bounces+patchwork-ath10k=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED, 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? --- 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;