From patchwork Fri May 6 16:58:42 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Greear X-Patchwork-Id: 762632 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p46GwlZv004357 for ; Fri, 6 May 2011 16:58:47 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756708Ab1EFQ6q (ORCPT ); Fri, 6 May 2011 12:58:46 -0400 Received: from mail.candelatech.com ([208.74.158.172]:53922 "EHLO ns3.lanforge.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756682Ab1EFQ6p (ORCPT ); Fri, 6 May 2011 12:58:45 -0400 Received: from [192.168.100.195] (firewall.candelatech.com [70.89.124.249]) (authenticated bits=0) by ns3.lanforge.com (8.14.2/8.14.2) with ESMTP id p46GwgoG021362 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 6 May 2011 09:58:42 -0700 Message-ID: <4DC428C2.9080403@candelatech.com> Date: Fri, 06 May 2011 09:58:42 -0700 From: Ben Greear Organization: Candela Technologies User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100430 Fedora/3.0.4-2.fc11 Thunderbird/3.0.4 MIME-Version: 1.0 To: Felix Fietkau CC: "linux-wireless@vger.kernel.org" Subject: Re: Bisected: ath9k: fix powersave frame filtering/buffering in AP mode broke STA association. References: <4DC30C42.6070402@candelatech.com> <4DC3109F.6080601@openwrt.org> <4DC3135C.4040601@candelatech.com> <4DC31A0B.4040409@candelatech.com> <4DC31C91.1030303@openwrt.org> <4DC33DE2.1070508@candelatech.com> <4DC34465.6090108@openwrt.org> <4DC421D8.3050403@candelatech.com> <4DC42707.2080503@openwrt.org> In-Reply-To: <4DC42707.2080503@openwrt.org> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Fri, 06 May 2011 16:58:47 +0000 (UTC) On 05/06/2011 09:51 AM, Felix Fietkau wrote: > On 2011-05-06 6:29 PM, Ben Greear wrote: >> On 05/05/2011 05:44 PM, Felix Fietkau wrote: >> >>> This should fix the second issue: >>> >>> --- a/drivers/net/wireless/ath/ath9k/main.c >>> +++ b/drivers/net/wireless/ath/ath9k/main.c >>> @@ -1722,6 +1722,10 @@ static int ath9k_sta_add(struct ieee8021 >>> struct ath_node *an = (struct ath_node *) sta->drv_priv; >>> struct ieee80211_key_conf ps_key = { }; >>> >>> + if (vif->opmode != NL80211_IFTYPE_AP&& >>> + vif->opmode != NL80211_IFTYPE_AP_VLAN) >>> + return 0; >>> + >>> ath_node_attach(sc, sta); >>> an->ps_key = ath_key_config(common, vif, sta,&ps_key); >> >> This doesn't compile..appears there is no vif->opmode member? >> >> Also, if you are trying to compare the hardware opmode, I'm not >> sure that would be correct since you can be in AP mode and still >> have stations. Maybe I'm just confused though... > I sent the wrong version of the patch, forgot to refresh it. > Here's the correct one: > > --- a/drivers/net/wireless/ath/ath9k/main.c > +++ b/drivers/net/wireless/ath/ath9k/main.c > @@ -1722,6 +1722,10 @@ static int ath9k_sta_add(struct ieee8021 > struct ath_node *an = (struct ath_node *) sta->drv_priv; > struct ieee80211_key_conf ps_key = { }; > > + if (vif->type != NL80211_IFTYPE_AP&& > + vif->type != NL80211_IFTYPE_AP_VLAN) > + return 0; > + > ath_node_attach(sc, sta); > an->ps_key = ath_key_config(common, vif, sta,&ps_key); > This patch appears to fix things. I'll let you send it proper for submittal since you have a better idea of what it's doing: Thanks, Ben diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c index 3de115d..3d999b7 100644 --- a/drivers/net/wireless/ath/ath9k/main.c +++ b/drivers/net/wireless/ath/ath9k/main.c @@ -1778,6 +1778,11 @@ static int ath9k_sta_add(struct ieee80211_hw *hw, struct ieee80211_key_conf ps_key = { }; ath_node_attach(sc, sta); + + if (vif->type != NL80211_IFTYPE_AP && + vif->type != NL80211_IFTYPE_AP_VLAN) + return 0; + an->ps_key = ath_key_config(common, vif, sta, &ps_key); return 0;