* [PATCH] wl12xx: don't join upon disassociation
@ 2010-12-26 8:27 Eliad Peller
2011-01-04 12:53 ` Juuso Oikarinen
2011-01-13 11:33 ` Luciano Coelho
0 siblings, 2 replies; 4+ messages in thread
From: Eliad Peller @ 2010-12-26 8:27 UTC (permalink / raw)
To: Luciano Coelho; +Cc: linux-wireless
wl12xx "rejoins" upon every BSS_CHANGED_BSSID notification.
However, there is no need to rejoin after disassociation, so just
filter out the case when the new bssid is 00:00:00:00:00:00.
Signed-off-by: Eliad Peller <eliad@wizery.com>
---
drivers/net/wireless/wl12xx/main.c | 24 ++++++++++++++----------
1 files changed, 14 insertions(+), 10 deletions(-)
diff --git a/drivers/net/wireless/wl12xx/main.c b/drivers/net/wireless/wl12xx/main.c
index 062247e..7aa783c 100644
--- a/drivers/net/wireless/wl12xx/main.c
+++ b/drivers/net/wireless/wl12xx/main.c
@@ -1944,19 +1944,23 @@ static void wl1271_op_bss_info_changed(struct ieee80211_hw *hw,
memcmp(wl->bssid, bss_conf->bssid, ETH_ALEN)) {
memcpy(wl->bssid, bss_conf->bssid, ETH_ALEN);
- ret = wl1271_cmd_build_null_data(wl);
- if (ret < 0)
- goto out_sleep;
+ if (!is_zero_ether_addr(wl->bssid)) {
+ ret = wl1271_cmd_build_null_data(wl);
+ if (ret < 0)
+ goto out_sleep;
- ret = wl1271_build_qos_null_data(wl);
- if (ret < 0)
- goto out_sleep;
+ ret = wl1271_build_qos_null_data(wl);
+ if (ret < 0)
+ goto out_sleep;
- /* filter out all packets not from this BSSID */
- wl1271_configure_filters(wl, 0);
+ /* filter out all packets not from this BSSID */
+ wl1271_configure_filters(wl, 0);
- /* Need to update the BSSID (for filtering etc) */
- do_join = true;
+ /*
+ * Need to update the BSSID (for filtering etc)
+ */
+ do_join = true;
+ }
}
if (changed & BSS_CHANGED_ASSOC) {
--
1.7.0.4
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH] wl12xx: don't join upon disassociation
2010-12-26 8:27 [PATCH] wl12xx: don't join upon disassociation Eliad Peller
@ 2011-01-04 12:53 ` Juuso Oikarinen
2011-01-04 13:13 ` Eliad Peller
2011-01-13 11:33 ` Luciano Coelho
1 sibling, 1 reply; 4+ messages in thread
From: Juuso Oikarinen @ 2011-01-04 12:53 UTC (permalink / raw)
To: ext Eliad Peller; +Cc: Luciano Coelho, linux-wireless
On Sun, 2010-12-26 at 10:27 +0200, ext Eliad Peller wrote:
> wl12xx "rejoins" upon every BSS_CHANGED_BSSID notification.
> However, there is no need to rejoin after disassociation, so just
> filter out the case when the new bssid is 00:00:00:00:00:00.
>
> Signed-off-by: Eliad Peller <eliad@wizery.com>
> ---
> drivers/net/wireless/wl12xx/main.c | 24 ++++++++++++++----------
> 1 files changed, 14 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/net/wireless/wl12xx/main.c b/drivers/net/wireless/wl12xx/main.c
> index 062247e..7aa783c 100644
> --- a/drivers/net/wireless/wl12xx/main.c
> +++ b/drivers/net/wireless/wl12xx/main.c
> @@ -1944,19 +1944,23 @@ static void wl1271_op_bss_info_changed(struct ieee80211_hw *hw,
> memcmp(wl->bssid, bss_conf->bssid, ETH_ALEN)) {
> memcpy(wl->bssid, bss_conf->bssid, ETH_ALEN);
>
> - ret = wl1271_cmd_build_null_data(wl);
> - if (ret < 0)
> - goto out_sleep;
> + if (!is_zero_ether_addr(wl->bssid)) {
> + ret = wl1271_cmd_build_null_data(wl);
> + if (ret < 0)
> + goto out_sleep;
>
> - ret = wl1271_build_qos_null_data(wl);
> - if (ret < 0)
> - goto out_sleep;
> + ret = wl1271_build_qos_null_data(wl);
> + if (ret < 0)
> + goto out_sleep;
>
> - /* filter out all packets not from this BSSID */
> - wl1271_configure_filters(wl, 0);
> + /* filter out all packets not from this BSSID */
> + wl1271_configure_filters(wl, 0);
>
> - /* Need to update the BSSID (for filtering etc) */
> - do_join = true;
> + /*
> + * Need to update the BSSID (for filtering etc)
> + */
> + do_join = true;
> + }
> }
>
> if (changed & BSS_CHANGED_ASSOC) {
The device still stays joined after disassoc, right? I guess the device
should be receiving/transmitting frames while not idle.
That is why we did have a specific dummy-join in disassoc, and also the
BSSID filters etc are cleared!
-Juuso
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] wl12xx: don't join upon disassociation
2011-01-04 12:53 ` Juuso Oikarinen
@ 2011-01-04 13:13 ` Eliad Peller
0 siblings, 0 replies; 4+ messages in thread
From: Eliad Peller @ 2011-01-04 13:13 UTC (permalink / raw)
To: Juuso Oikarinen; +Cc: Luciano Coelho, linux-wireless
On Tue, Jan 4, 2011 at 2:53 PM, Juuso Oikarinen
<juuso.oikarinen@nokia.com> wrote:
> On Sun, 2010-12-26 at 10:27 +0200, ext Eliad Peller wrote:
>> wl12xx "rejoins" upon every BSS_CHANGED_BSSID notification.
>> However, there is no need to rejoin after disassociation, so just
>> filter out the case when the new bssid is 00:00:00:00:00:00.
>>
>> Signed-off-by: Eliad Peller <eliad@wizery.com>
>> ---
>> drivers/net/wireless/wl12xx/main.c | 24 ++++++++++++++----------
>> 1 files changed, 14 insertions(+), 10 deletions(-)
>>
>> diff --git a/drivers/net/wireless/wl12xx/main.c b/drivers/net/wireless/wl12xx/main.c
>> index 062247e..7aa783c 100644
>> --- a/drivers/net/wireless/wl12xx/main.c
>> +++ b/drivers/net/wireless/wl12xx/main.c
>> @@ -1944,19 +1944,23 @@ static void wl1271_op_bss_info_changed(struct ieee80211_hw *hw,
>> memcmp(wl->bssid, bss_conf->bssid, ETH_ALEN)) {
>> memcpy(wl->bssid, bss_conf->bssid, ETH_ALEN);
>>
>> - ret = wl1271_cmd_build_null_data(wl);
>> - if (ret < 0)
>> - goto out_sleep;
>> + if (!is_zero_ether_addr(wl->bssid)) {
>> + ret = wl1271_cmd_build_null_data(wl);
>> + if (ret < 0)
>> + goto out_sleep;
>>
>> - ret = wl1271_build_qos_null_data(wl);
>> - if (ret < 0)
>> - goto out_sleep;
>> + ret = wl1271_build_qos_null_data(wl);
>> + if (ret < 0)
>> + goto out_sleep;
>>
>> - /* filter out all packets not from this BSSID */
>> - wl1271_configure_filters(wl, 0);
>> + /* filter out all packets not from this BSSID */
>> + wl1271_configure_filters(wl, 0);
>>
>> - /* Need to update the BSSID (for filtering etc) */
>> - do_join = true;
>> + /*
>> + * Need to update the BSSID (for filtering etc)
>> + */
>> + do_join = true;
>> + }
>> }
>>
>> if (changed & BSS_CHANGED_ASSOC) {
>
> The device still stays joined after disassoc, right? I guess the device
> should be receiving/transmitting frames while not idle.
>
> That is why we did have a specific dummy-join in disassoc, and also the
> BSSID filters etc are cleared!
>
the patch doesn't unjoin, it just prevents rejoining (and some other
configurations) to an "empty" bssid, so it shouldn't affect the
current join state.
the actual unjoin will only be only executed when the device goes idle.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] wl12xx: don't join upon disassociation
2010-12-26 8:27 [PATCH] wl12xx: don't join upon disassociation Eliad Peller
2011-01-04 12:53 ` Juuso Oikarinen
@ 2011-01-13 11:33 ` Luciano Coelho
1 sibling, 0 replies; 4+ messages in thread
From: Luciano Coelho @ 2011-01-13 11:33 UTC (permalink / raw)
To: Eliad Peller; +Cc: Luciano Coelho, linux-wireless@vger.kernel.org
On Sun, 2010-12-26 at 09:27 +0100, Eliad Peller wrote:
> wl12xx "rejoins" upon every BSS_CHANGED_BSSID notification.
> However, there is no need to rejoin after disassociation, so just
> filter out the case when the new bssid is 00:00:00:00:00:00.
>
> Signed-off-by: Eliad Peller <eliad@wizery.com>
> ---
Rebased to the latest tree and applied. Thank you!
--
Cheers,
Luca.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-01-13 11:32 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-26 8:27 [PATCH] wl12xx: don't join upon disassociation Eliad Peller
2011-01-04 12:53 ` Juuso Oikarinen
2011-01-04 13:13 ` Eliad Peller
2011-01-13 11:33 ` Luciano Coelho
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).