All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mac80211: HE STA disassoc due to QOS NULL not sent
@ 2019-07-03 13:18 Shay Bar
  2019-07-31  8:54 ` Johannes Berg
  0 siblings, 1 reply; 5+ messages in thread
From: Shay Bar @ 2019-07-03 13:18 UTC (permalink / raw)
  To: johannes; +Cc: linux-wireless, shay.bar

In case of HE AP-STA link, ieee80211_send_nullfunc() will not send the QOS NULL packet to check if AP is still associated.
In this case, probe_send_count will be non zero and ieee80211_sta_work() will later disassociate the AP.
(although it didn't really send a test QOS NULL packet).
Fix is to decrement probe_send_count and not call ieee80211_send_nullfunc() in case of HE link.

Signed-off-by: Shay Bar <shay.bar@celeno.com>
---
Hope I solved all the SMTP server problems and patch is better now :)

 net/mac80211/mlme.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 379d2ab6d327..bc5ed2dbe69b 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -2511,7 +2511,10 @@ static void ieee80211_mgd_probe_ap_send(struct ieee80211_sub_if_data *sdata)
 
 	if (ieee80211_hw_check(&sdata->local->hw, REPORTS_TX_ACK_STATUS)) {
 		ifmgd->nullfunc_failed = false;
-		ieee80211_send_nullfunc(sdata->local, sdata, false);
+		if (!(ifmgd->flags & IEEE80211_STA_DISABLE_HE))
+			ifmgd->probe_send_count--;
+		else
+			ieee80211_send_nullfunc(sdata->local, sdata, false);
 	} else {
 		int ssid_len;
 
-- 
2.22.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] mac80211: HE STA disassoc due to QOS NULL not sent
  2019-07-03 13:18 [PATCH] mac80211: HE STA disassoc due to QOS NULL not sent Shay Bar
@ 2019-07-31  8:54 ` Johannes Berg
  2019-07-31 10:12   ` Shay Bar
  0 siblings, 1 reply; 5+ messages in thread
From: Johannes Berg @ 2019-07-31  8:54 UTC (permalink / raw)
  To: Shay Bar; +Cc: linux-wireless

On Wed, 2019-07-03 at 16:18 +0300, Shay Bar wrote:
> In case of HE AP-STA link, ieee80211_send_nullfunc() will not send the QOS NULL packet to check if AP is still associated.
> In this case, probe_send_count will be non zero and ieee80211_sta_work() will later disassociate the AP.
> (although it didn't really send a test QOS NULL packet).
> Fix is to decrement probe_send_count and not call ieee80211_send_nullfunc() in case of HE link.
> 
> Signed-off-by: Shay Bar <shay.bar@celeno.com>
> ---
> Hope I solved all the SMTP server problems and patch is better now :)

Yep, thanks.
 
>  	if (ieee80211_hw_check(&sdata->local->hw, REPORTS_TX_ACK_STATUS)) {
>  		ifmgd->nullfunc_failed = false;
> -		ieee80211_send_nullfunc(sdata->local, sdata, false);
> +		if (!(ifmgd->flags & IEEE80211_STA_DISABLE_HE))
> +			ifmgd->probe_send_count--;
> +		else
> +			ieee80211_send_nullfunc(sdata->local, sdata, false);

Not sure that makes sense though.

Why go through all the motions of doing the counting and all, and the
run_again() etc. when all that will happen is that we'll disconnect
anyway?

johannes


^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: [PATCH] mac80211: HE STA disassoc due to QOS NULL not sent
  2019-07-31  8:54 ` Johannes Berg
@ 2019-07-31 10:12   ` Shay Bar
  2019-07-31 10:29     ` Johannes Berg
  0 siblings, 1 reply; 5+ messages in thread
From: Shay Bar @ 2019-07-31 10:12 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-wireless

Hi Johannes,
Station may receive a beacon from the AP that will rearm the bcn_mon_timer.
If it will not get a beacon within the timeout, it will disconnect.
In my test case, beacon arrived later (within the timeout).
Without this patch, STA (wrongly) kicked out the AP without even sending QOS NULL.
With this patch, STA keeps AP associated and will only disassoc if beacon timeout will pass.

Thanks,
Shay

-----Original Message-----
From: linux-wireless-owner@vger.kernel.org <linux-wireless-owner@vger.kernel.org> On Behalf Of Johannes Berg
Sent: Wednesday, 31 July 2019 11:54
To: Shay Bar <Shay.Bar@celeno.com>
Cc: linux-wireless@vger.kernel.org
Subject: Re: [PATCH] mac80211: HE STA disassoc due to QOS NULL not sent

External Email


On Wed, 2019-07-03 at 16:18 +0300, Shay Bar wrote:
> In case of HE AP-STA link, ieee80211_send_nullfunc() will not send the QOS NULL packet to check if AP is still associated.
> In this case, probe_send_count will be non zero and ieee80211_sta_work() will later disassociate the AP.
> (although it didn't really send a test QOS NULL packet).
> Fix is to decrement probe_send_count and not call ieee80211_send_nullfunc() in case of HE link.
>
> Signed-off-by: Shay Bar <shay.bar@celeno.com>
> ---
> Hope I solved all the SMTP server problems and patch is better now :)

Yep, thanks.

>       if (ieee80211_hw_check(&sdata->local->hw, REPORTS_TX_ACK_STATUS)) {
>               ifmgd->nullfunc_failed = false;
> -             ieee80211_send_nullfunc(sdata->local, sdata, false);
> +             if (!(ifmgd->flags & IEEE80211_STA_DISABLE_HE))
> +                     ifmgd->probe_send_count--;
> +             else
> +                     ieee80211_send_nullfunc(sdata->local, sdata, false);

Not sure that makes sense though.

Why go through all the motions of doing the counting and all, and the
run_again() etc. when all that will happen is that we'll disconnect
anyway?

johannes


----------

This email has been scanned for spam and viruses by Proofpoint Essentials. Visit the following link to report this email as spam:
https://eu1.proofpointessentials.com/index01.php?mod_id=11&mod_option=logitem&mail_id=1564563252-6zoAqEa3QRRO&r_address=shay.bar%40celeno.com&report=1
________________________________
The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any retransmission, dissemination, copying or other use of, or taking of any action in reliance upon this information is prohibited. If you received this in error, please contact the sender and delete the material from any computer. Nothing contained herein shall be deemed as a representation, warranty or a commitment by Celeno. No warranties are expressed or implied, including, but not limited to, any implied warranties of non-infringement, merchantability and fitness for a particular purpose.
________________________________


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] mac80211: HE STA disassoc due to QOS NULL not sent
  2019-07-31 10:12   ` Shay Bar
@ 2019-07-31 10:29     ` Johannes Berg
  0 siblings, 0 replies; 5+ messages in thread
From: Johannes Berg @ 2019-07-31 10:29 UTC (permalink / raw)
  To: Shay Bar; +Cc: linux-wireless

On Wed, 2019-07-31 at 10:12 +0000, Shay Bar wrote:
> Hi Johannes,
> Station may receive a beacon from the AP that will rearm the bcn_mon_timer.
> If it will not get a beacon within the timeout, it will disconnect.
> In my test case, beacon arrived later (within the timeout).
> Without this patch, STA (wrongly) kicked out the AP without even sending QOS NULL.
> With this patch, STA keeps AP associated and will only disassoc if beacon timeout will pass.

Ah, we still need the timeout, right.

johannes


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH] mac80211: HE STA disassoc due to QOS NULL not sent
@ 2019-07-02 12:20 Shay Bar
  0 siblings, 0 replies; 5+ messages in thread
From: Shay Bar @ 2019-07-02 12:20 UTC (permalink / raw)
  To: johannes; +Cc: linux-wireless, Shay Bar

In case of HE AP-STA link, ieee80211_send_nullfunc() will not send the QOS NULL packet to check if AP is still associated.
In this case, probe_send_count will be non zero and ieee80211_sta_work() will later disassociate the AP.
(although it didn't really send a test QOS NULL packet).
Fix is to decrement probe_send_count and not call ieee80211_send_nullfunc() in case of HE link.

Signed-off-by: Shay Bar <shay.bar@celeno.com>
---
 net/mac80211/mlme.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 379d2ab6d327..bc5ed2dbe69b 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -2511,7 +2511,10 @@ static void ieee80211_mgd_probe_ap_send(struct ieee80211_sub_if_data *sdata)

 if (ieee80211_hw_check(&sdata->local->hw, REPORTS_TX_ACK_STATUS)) {
 ifmgd->nullfunc_failed = false;
-ieee80211_send_nullfunc(sdata->local, sdata, false);
+if (!(ifmgd->flags & IEEE80211_STA_DISABLE_HE))
+ifmgd->probe_send_count--;
+else
+ieee80211_send_nullfunc(sdata->local, sdata, false);
 } else {
 int ssid_len;

--
2.22.0

________________________________
The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any retransmission, dissemination, copying or other use of, or taking of any action in reliance upon this information is prohibited. If you received this in error, please contact the sender and delete the material from any computer. Nothing contained herein shall be deemed as a representation, warranty or a commitment by Celeno. No warranties are expressed or implied, including, but not limited to, any implied warranties of non-infringement, merchantability and fitness for a particular purpose.
________________________________


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-07-31 10:29 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-03 13:18 [PATCH] mac80211: HE STA disassoc due to QOS NULL not sent Shay Bar
2019-07-31  8:54 ` Johannes Berg
2019-07-31 10:12   ` Shay Bar
2019-07-31 10:29     ` Johannes Berg
  -- strict thread matches above, loose matches on Subject: below --
2019-07-02 12:20 Shay Bar

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.