diff mbox

Bisected: ath9k: fix powersave frame filtering/buffering in AP mode broke STA association.

Message ID 4DC428C2.9080403@candelatech.com (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Ben Greear May 6, 2011, 4:58 p.m. 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 mbox

Patch

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;