All of lore.kernel.org
 help / color / mirror / Atom feed
* mac80211: background scan issue
@ 2020-02-03 15:47 Cedric VONCKEN
  2020-02-03 22:29 ` Johannes Berg
  0 siblings, 1 reply; 2+ messages in thread
From: Cedric VONCKEN @ 2020-02-03 15:47 UTC (permalink / raw)
  To: linux-wireless

	I'm working on background scan algorithm.

	In backport 5.4-rc8-1 from openwrt I found an issue on background scan in mac80211.

	In background scan we must send a power save indication to the AP to avoid packets lost during the scan. The previous version of  mac80211 (a very old version) used a null function to send the power save status to the AP.
	In this backport (5.4-rc8-1) this null function was replaced by QOS null function, and this frame is never sent when the power save bit is set to 1.

	I found the origin of this issue and she still present in the latest version of mac80211.

	In the function ieee80211_tx_h_check_assoc from net/mac80211/tx.c a test is wrong. Please find below the part of the patch necessary to fix this issue (the other hunk in my patch concern my work).
	
@@ -297,7 +297,8 @@ ieee80211_tx_h_check_assoc(struct ieee80
       if (unlikely(test_bit(SCAN_SW_SCANNING, &tx->local->scanning)) &&
           test_bit(SDATA_STATE_OFFCHANNEL, &tx->sdata->state) &&
           !ieee80211_is_probe_req(hdr->frame_control) &&
-          !ieee80211_is_nullfunc(hdr->frame_control))
+          !ieee80211_is_nullfunc(hdr->frame_control) &&
+              !ieee80211_is_qos_nullfunc(hdr->frame_control))
               /*
                * When software scanning only nullfunc frames (to notify
                * the sleep state to the AP) and probe requests (for the

Sorry I know it is not correctly formated, but at this time I cannot generated a correct patch. This patch is very easy to apply in the main branch.

Regards.

Cédric Voncken



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

* Re: mac80211: background scan issue
  2020-02-03 15:47 mac80211: background scan issue Cedric VONCKEN
@ 2020-02-03 22:29 ` Johannes Berg
  0 siblings, 0 replies; 2+ messages in thread
From: Johannes Berg @ 2020-02-03 22:29 UTC (permalink / raw)
  To: Cedric VONCKEN, linux-wireless

Hi,

	
> @@ -297,7 +297,8 @@ ieee80211_tx_h_check_assoc(struct ieee80
>        if (unlikely(test_bit(SCAN_SW_SCANNING, &tx->local->scanning)) &&
>            test_bit(SDATA_STATE_OFFCHANNEL, &tx->sdata->state) &&
>            !ieee80211_is_probe_req(hdr->frame_control) &&
> -          !ieee80211_is_nullfunc(hdr->frame_control))
> +          !ieee80211_is_nullfunc(hdr->frame_control) &&
> +              !ieee80211_is_qos_nullfunc(hdr->frame_control))
>                /*
>                 * When software scanning only nullfunc frames (to notify
>                 * the sleep state to the AP) and probe requests (for the

yeah, Thomas also found it, we now have this in the tree:

        if (unlikely(test_bit(SCAN_SW_SCANNING, &tx->local->scanning)) &&
            test_bit(SDATA_STATE_OFFCHANNEL, &tx->sdata->state) &&
            !ieee80211_is_probe_req(hdr->frame_control) &&
            !ieee80211_is_any_nullfunc(hdr->frame_control))

johannes


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

end of thread, other threads:[~2020-02-03 22:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-03 15:47 mac80211: background scan issue Cedric VONCKEN
2020-02-03 22:29 ` Johannes Berg

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.