2019-06-04 10:11:33 +02:00
|
|
|
|
2007-05-05 11:45:53 -07:00
|
|
|
|
|
|
|
|
|
2014-09-03 15:24:57 +03:00
|
|
|
|
2017-04-26 12:14:59 +02:00
|
|
|
|
2026-01-30 16:21:07 +01:00
|
|
|
|
2007-05-05 11:45:53 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
mac80211: async station powersave handling
Some devices require that all frames to a station
are flushed when that station goes into powersave
mode before being able to send frames to that
station again when it wakes up or polls -- all in
order to avoid reordering and too many or too few
frames being sent to the station when it polls.
Normally, this is the case unless the station
goes to sleep and wakes up very quickly again.
But in that case, frames for it may be pending
on the hardware queues, and thus races could
happen in the case of multiple hardware queues
used for QoS/WMM. Normally this isn't a problem,
but with the iwlwifi mechanism we need to make
sure the race doesn't happen.
This makes mac80211 able to cope with the race
with driver help by a new WLAN_STA_PS_DRIVER
per-station flag that can be controlled by the
driver and tells mac80211 whether it can transmit
frames or not. This flag must be set according to
very specific rules outlined in the documentation
for the function that controls it.
When we buffer new frames for the station, we
normally set the TIM bit right away, but while
the driver has blocked transmission to that sta
we need to avoid that as well since we cannot
respond to the station if it wakes up due to the
TIM bit. Once the driver unblocks, we can set
the TIM bit.
Similarly, when the station just wakes up, we
need to wait until all other frames are flushed
before we can transmit frames to that station,
so the same applies here, we need to wait for
the driver to give the OK.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-11-06 11:35:50 +01:00
|
|
|
|
2010-12-02 19:12:43 +09:00
|
|
|
|
2017-04-26 14:51:20 +02:00
|
|
|
|
2012-03-01 15:22:09 +01:00
|
|
|
|
2015-02-13 21:55:15 +01:00
|
|
|
|
2016-03-31 20:02:09 +03:00
|
|
|
|
2008-04-08 15:14:40 -04:00
|
|
|
|
2007-05-05 11:45:53 -07:00
|
|
|
|
2008-01-28 17:19:37 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-09-29 16:04:36 +02:00
|
|
|
|
|
|
|
|
|
2008-01-28 17:19:37 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
mac80211: async station powersave handling
Some devices require that all frames to a station
are flushed when that station goes into powersave
mode before being able to send frames to that
station again when it wakes up or polls -- all in
order to avoid reordering and too many or too few
frames being sent to the station when it polls.
Normally, this is the case unless the station
goes to sleep and wakes up very quickly again.
But in that case, frames for it may be pending
on the hardware queues, and thus races could
happen in the case of multiple hardware queues
used for QoS/WMM. Normally this isn't a problem,
but with the iwlwifi mechanism we need to make
sure the race doesn't happen.
This makes mac80211 able to cope with the race
with driver help by a new WLAN_STA_PS_DRIVER
per-station flag that can be controlled by the
driver and tells mac80211 whether it can transmit
frames or not. This flag must be set according to
very specific rules outlined in the documentation
for the function that controls it.
When we buffer new frames for the station, we
normally set the TIM bit right away, but while
the driver has blocked transmission to that sta
we need to avoid that as well since we cannot
respond to the station if it wakes up due to the
TIM bit. Once the driver unblocks, we can set
the TIM bit.
Similarly, when the station just wakes up, we
need to wait until all other frames are flushed
before we can transmit frames to that station,
so the same applies here, we need to wait for
the driver to give the OK.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-11-06 11:35:50 +01:00
|
|
|
|
2008-01-28 17:19:37 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-02-20 23:59:33 +01:00
|
|
|
|
2008-05-15 12:55:29 +02:00
|
|
|
|
2008-02-20 23:59:33 +01:00
|
|
|
|
2009-01-08 13:31:59 +02:00
|
|
|
|
2010-04-06 11:18:46 +02:00
|
|
|
|
2010-04-06 11:18:47 +02:00
|
|
|
|
mac80211: async station powersave handling
Some devices require that all frames to a station
are flushed when that station goes into powersave
mode before being able to send frames to that
station again when it wakes up or polls -- all in
order to avoid reordering and too many or too few
frames being sent to the station when it polls.
Normally, this is the case unless the station
goes to sleep and wakes up very quickly again.
But in that case, frames for it may be pending
on the hardware queues, and thus races could
happen in the case of multiple hardware queues
used for QoS/WMM. Normally this isn't a problem,
but with the iwlwifi mechanism we need to make
sure the race doesn't happen.
This makes mac80211 able to cope with the race
with driver help by a new WLAN_STA_PS_DRIVER
per-station flag that can be controlled by the
driver and tells mac80211 whether it can transmit
frames or not. This flag must be set according to
very specific rules outlined in the documentation
for the function that controls it.
When we buffer new frames for the station, we
normally set the TIM bit right away, but while
the driver has blocked transmission to that sta
we need to avoid that as well since we cannot
respond to the station if it wakes up due to the
TIM bit. Once the driver unblocks, we can set
the TIM bit.
Similarly, when the station just wakes up, we
need to wait until all other frames are flushed
before we can transmit frames to that station,
so the same applies here, we need to wait for
the driver to give the OK.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-11-06 11:35:50 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-09-28 14:12:54 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-07-17 17:14:17 +03:00
|
|
|
|
|
|
|
|
|
2014-11-09 18:50:15 +02:00
|
|
|
|
2014-11-09 18:50:19 +02:00
|
|
|
|
|
|
|
|
|
2015-06-10 20:42:59 +03:00
|
|
|
|
|
|
|
|
|
2011-09-29 16:04:33 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-09-29 16:04:35 +02:00
|
|
|
|
2011-11-04 11:18:20 +01:00
|
|
|
|
2012-01-12 09:31:10 +01:00
|
|
|
|
2012-01-20 13:55:23 +01:00
|
|
|
|
2012-03-31 11:31:32 -07:00
|
|
|
|
2013-01-30 18:14:08 +01:00
|
|
|
|
|
|
|
|
|
mac80211: fix station/driver powersave race
It is currently possible to have a race due to the station PS
unblock work like this:
* station goes to sleep with frames buffered in the driver
* driver blocks wakeup
* station wakes up again
* driver flushes/returns frames, and unblocks, which schedules
the unblock work
* unblock work starts to run, and checks that the station is
awake (i.e. that the WLAN_STA_PS_STA flag isn't set)
* we process a received frame with PM=1, setting the flag again
* ieee80211_sta_ps_deliver_wakeup() runs, delivering all frames
to the driver, and then clearing the WLAN_STA_PS_DRIVER and
WLAN_STA_PS_STA flags
In this scenario, mac80211 will think that the station is awake,
while it really is asleep, and any TX'ed frames should be filtered
by the device (it will know that the station is sleeping) but then
passed to mac80211 again, which will not buffer it either as it
thinks the station is awake, and eventually the packets will be
dropped.
Fix this by moving the clearing of the flags to exactly where we
learn about the situation. This creates a problem of reordering,
so introduce another flag indicating that delivery is being done,
this new flag also queues frames and is cleared only while the
spinlock is held (which the queuing code also holds) so that any
concurrent delivery/TX is handled correctly.
Reported-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2014-05-27 16:32:27 +02:00
|
|
|
|
|
|
|
|
|
2020-04-24 12:39:46 +02:00
|
|
|
|
|
|
|
|
|
2020-12-18 19:47:18 +01:00
|
|
|
|
2016-03-17 15:02:54 +02:00
|
|
|
|
|
|
|
|
|
2008-01-28 17:19:37 +01:00
|
|
|
|
|
|
|
|
|
2011-09-29 16:04:36 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-07-17 17:14:17 +03:00
|
|
|
|
2014-11-09 18:50:15 +02:00
|
|
|
|
2014-11-09 18:50:19 +02:00
|
|
|
|
2015-06-10 20:42:59 +03:00
|
|
|
|
2011-09-29 16:04:36 +02:00
|
|
|
|
|
|
|
|
|
2011-11-04 11:18:20 +01:00
|
|
|
|
2012-01-12 09:31:10 +01:00
|
|
|
|
2012-01-20 13:55:23 +01:00
|
|
|
|
2012-03-31 11:31:32 -07:00
|
|
|
|
2013-01-30 18:14:08 +01:00
|
|
|
|
|
|
|
|
|
mac80211: fix station/driver powersave race
It is currently possible to have a race due to the station PS
unblock work like this:
* station goes to sleep with frames buffered in the driver
* driver blocks wakeup
* station wakes up again
* driver flushes/returns frames, and unblocks, which schedules
the unblock work
* unblock work starts to run, and checks that the station is
awake (i.e. that the WLAN_STA_PS_STA flag isn't set)
* we process a received frame with PM=1, setting the flag again
* ieee80211_sta_ps_deliver_wakeup() runs, delivering all frames
to the driver, and then clearing the WLAN_STA_PS_DRIVER and
WLAN_STA_PS_STA flags
In this scenario, mac80211 will think that the station is awake,
while it really is asleep, and any TX'ed frames should be filtered
by the device (it will know that the station is sleeping) but then
passed to mac80211 again, which will not buffer it either as it
thinks the station is awake, and eventually the packets will be
dropped.
Fix this by moving the clearing of the flags to exactly where we
learn about the situation. This creates a problem of reordering,
so introduce another flag indicating that delivery is being done,
this new flag also queues frames and is cleared only while the
spinlock is held (which the queuing code also holds) so that any
concurrent delivery/TX is handled correctly.
Reported-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2014-05-27 16:32:27 +02:00
|
|
|
|
2020-03-26 15:09:42 +02:00
|
|
|
|
2020-12-18 19:47:18 +01:00
|
|
|
|
2016-03-17 15:02:54 +02:00
|
|
|
|
|
|
|
|
|
2008-01-28 17:19:37 +01:00
|
|
|
|
2011-12-14 12:35:30 +01:00
|
|
|
|
2007-12-25 17:00:32 +02:00
|
|
|
|
2011-12-17 19:39:35 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-12-25 17:00:32 +02:00
|
|
|
|
2010-06-10 10:21:39 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-06-10 10:21:42 +02:00
|
|
|
|
|
|
|
|
|
2017-05-27 00:27:25 +02:00
|
|
|
|
|
|
|
|
|
2020-03-26 15:09:38 +02:00
|
|
|
|
2008-01-28 14:07:16 +02:00
|
|
|
|
2018-04-16 20:18:41 +05:30
|
|
|
|
2012-07-18 13:31:31 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-12-18 17:02:08 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-12-06 09:09:27 +03:00
|
|
|
|
2022-06-25 23:24:06 +02:00
|
|
|
|
mac80211: Implement Airtime-based Queue Limit (AQL)
In order for the Fq_CoDel algorithm integrated in mac80211 layer to operate
effectively to control excessive queueing latency, the CoDel algorithm
requires an accurate measure of how long packets stays in the queue, AKA
sojourn time. The sojourn time measured at the mac80211 layer doesn't
include queueing latency in the lower layer (firmware/hardware) and CoDel
expects lower layer to have a short queue. However, most 802.11ac chipsets
offload tasks such TX aggregation to firmware or hardware, thus have a deep
lower layer queue.
Without a mechanism to control the lower layer queue size, packets only
stay in mac80211 layer transiently before being sent to firmware queue.
As a result, the sojourn time measured by CoDel in the mac80211 layer is
almost always lower than the CoDel latency target, hence CoDel does little
to control the latency, even when the lower layer queue causes excessive
latency.
The Byte Queue Limits (BQL) mechanism is commonly used to address the
similar issue with wired network interface. However, this method cannot be
applied directly to the wireless network interface. "Bytes" is not a
suitable measure of queue depth in the wireless network, as the data rate
can vary dramatically from station to station in the same network, from a
few Mbps to over Gbps.
This patch implements an Airtime-based Queue Limit (AQL) to make CoDel work
effectively with wireless drivers that utilized firmware/hardware
offloading. AQL allows each txq to release just enough packets to the lower
layer to form 1-2 large aggregations to keep hardware fully utilized and
retains the rest of the frames in mac80211 layer to be controlled by the
CoDel algorithm.
Signed-off-by: Kan Yan <kyan@google.com>
[ Toke: Keep API to set pending airtime internal, fix nits in commit msg ]
Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
Link: https://lore.kernel.org/r/20191119060610.76681-4-kyan@google.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2019-11-18 22:06:09 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-12-18 17:02:08 -08:00
|
|
|
|
|
|
|
|
|
mac80211: Implement Airtime-based Queue Limit (AQL)
In order for the Fq_CoDel algorithm integrated in mac80211 layer to operate
effectively to control excessive queueing latency, the CoDel algorithm
requires an accurate measure of how long packets stays in the queue, AKA
sojourn time. The sojourn time measured at the mac80211 layer doesn't
include queueing latency in the lower layer (firmware/hardware) and CoDel
expects lower layer to have a short queue. However, most 802.11ac chipsets
offload tasks such TX aggregation to firmware or hardware, thus have a deep
lower layer queue.
Without a mechanism to control the lower layer queue size, packets only
stay in mac80211 layer transiently before being sent to firmware queue.
As a result, the sojourn time measured by CoDel in the mac80211 layer is
almost always lower than the CoDel latency target, hence CoDel does little
to control the latency, even when the lower layer queue causes excessive
latency.
The Byte Queue Limits (BQL) mechanism is commonly used to address the
similar issue with wired network interface. However, this method cannot be
applied directly to the wireless network interface. "Bytes" is not a
suitable measure of queue depth in the wireless network, as the data rate
can vary dramatically from station to station in the same network, from a
few Mbps to over Gbps.
This patch implements an Airtime-based Queue Limit (AQL) to make CoDel work
effectively with wireless drivers that utilized firmware/hardware
offloading. AQL allows each txq to release just enough packets to the lower
layer to form 1-2 large aggregations to keep hardware fully utilized and
retains the rest of the frames in mac80211 layer to be controlled by the
CoDel algorithm.
Signed-off-by: Kan Yan <kyan@google.com>
[ Toke: Keep API to set pending airtime internal, fix nits in commit msg ]
Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
Link: https://lore.kernel.org/r/20191119060610.76681-4-kyan@google.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2019-11-18 22:06:09 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-10-17 13:25:45 -07:00
|
|
|
|
|
|
|
|
|
2008-01-28 14:07:16 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-06-10 10:21:39 +02:00
|
|
|
|
2011-11-22 21:50:28 -05:00
|
|
|
|
2008-01-28 14:07:16 +02:00
|
|
|
|
2009-03-23 17:28:41 +01:00
|
|
|
|
2017-10-17 13:25:45 -07:00
|
|
|
|
2008-03-26 20:36:03 +02:00
|
|
|
|
2010-12-15 07:47:10 +05:30
|
|
|
|
2017-10-17 13:25:45 -07:00
|
|
|
|
2010-06-10 10:21:39 +02:00
|
|
|
|
2012-03-18 22:58:06 +01:00
|
|
|
|
2010-06-10 10:21:39 +02:00
|
|
|
|
2010-10-05 19:37:40 +02:00
|
|
|
|
2011-01-18 13:51:05 +01:00
|
|
|
|
2011-08-28 21:11:01 +02:00
|
|
|
|
|
|
|
|
|
2024-09-13 11:49:19 +03:00
|
|
|
|
2021-11-29 09:19:49 +01:00
|
|
|
|
2026-03-05 14:43:04 +05:30
|
|
|
|
2010-06-10 10:21:39 +02:00
|
|
|
|
2010-11-29 11:09:16 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-01-28 14:07:16 +02:00
|
|
|
|
|
|
|
|
|
2010-06-10 10:21:39 +02:00
|
|
|
|
2011-11-22 21:50:28 -05:00
|
|
|
|
2008-01-28 14:07:16 +02:00
|
|
|
|
2009-03-23 17:28:41 +01:00
|
|
|
|
2017-10-17 13:25:45 -07:00
|
|
|
|
2010-06-10 10:21:39 +02:00
|
|
|
|
2012-03-18 22:58:06 +01:00
|
|
|
|
2010-12-15 07:47:10 +05:30
|
|
|
|
2008-03-26 20:36:03 +02:00
|
|
|
|
2010-06-10 10:21:39 +02:00
|
|
|
|
2010-10-05 19:37:40 +02:00
|
|
|
|
2018-06-09 09:14:44 +03:00
|
|
|
|
2021-11-24 10:40:24 +01:00
|
|
|
|
2011-08-28 21:11:01 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-08-16 11:13:22 +03:00
|
|
|
|
2026-03-05 14:43:04 +05:30
|
|
|
|
2017-10-17 13:25:45 -07:00
|
|
|
|
2008-01-28 14:07:16 +02:00
|
|
|
|
2007-12-25 17:00:32 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-01-28 16:19:25 +02:00
|
|
|
|
|
|
|
|
|
2007-12-25 17:00:32 +02:00
|
|
|
|
2010-08-05 01:36:41 +02:00
|
|
|
|
2017-10-17 13:25:45 -07:00
|
|
|
|
2012-03-18 22:58:06 +01:00
|
|
|
|
2008-03-26 23:21:47 +01:00
|
|
|
|
|
|
|
|
|
2008-03-26 20:36:03 +02:00
|
|
|
|
|
|
|
|
|
2009-02-10 21:25:45 +01:00
|
|
|
|
2017-10-17 13:25:45 -07:00
|
|
|
|
2010-06-10 10:21:38 +02:00
|
|
|
|
2010-08-05 01:36:41 +02:00
|
|
|
|
2014-09-02 14:05:10 +02:00
|
|
|
|
|
|
|
|
|
2015-04-01 14:20:42 +02:00
|
|
|
|
2017-02-06 15:28:42 +02:00
|
|
|
|
2026-06-04 17:56:27 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-06-10 10:21:38 +02:00
|
|
|
|
2010-11-29 11:09:16 +01:00
|
|
|
|
|
|
|
|
|
2010-08-05 01:36:41 +02:00
|
|
|
|
2010-11-29 11:09:16 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-12-25 17:00:32 +02:00
|
|
|
|
|
|
|
|
|
2010-06-10 10:21:38 +02:00
|
|
|
|
2010-08-05 01:36:41 +02:00
|
|
|
|
2016-01-28 16:19:25 +02:00
|
|
|
|
2017-10-17 13:25:45 -07:00
|
|
|
|
2007-12-25 17:00:32 +02:00
|
|
|
|
2010-08-05 01:36:41 +02:00
|
|
|
|
2012-03-18 22:58:06 +01:00
|
|
|
|
2008-03-26 23:21:47 +01:00
|
|
|
|
|
|
|
|
|
2008-03-26 20:36:03 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-10-17 13:25:45 -07:00
|
|
|
|
2017-02-06 15:28:42 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2026-06-04 17:56:27 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-12-25 17:00:32 +02:00
|
|
|
|
|
|
|
|
|
2010-05-31 11:40:23 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-06-10 10:21:38 +02:00
|
|
|
|
2016-10-18 23:12:08 +03:00
|
|
|
|
2010-06-10 10:21:44 +02:00
|
|
|
|
|
|
|
|
|
2011-05-22 16:10:21 +03:00
|
|
|
|
|
|
|
|
|
2017-05-30 16:34:46 +02:00
|
|
|
|
|
|
|
|
|
2015-12-08 19:09:05 +02:00
|
|
|
|
2016-08-29 23:25:18 +03:00
|
|
|
|
|
|
|
|
|
2015-12-08 19:09:05 +02:00
|
|
|
|
|
|
|
|
|
2023-08-28 14:00:04 +02:00
|
|
|
|
|
|
|
|
|
2015-12-08 19:09:05 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-05-31 11:40:23 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-11-14 23:22:21 +01:00
|
|
|
|
2016-10-18 23:12:08 +03:00
|
|
|
|
2012-11-14 23:22:21 +01:00
|
|
|
|
|
|
|
|
|
2017-05-30 16:34:46 +02:00
|
|
|
|
2015-12-08 19:09:05 +02:00
|
|
|
|
2016-08-29 23:25:18 +03:00
|
|
|
|
2010-05-31 11:40:23 +02:00
|
|
|
|
2023-08-28 13:59:35 +02:00
|
|
|
|
2012-11-14 23:22:21 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-05-31 11:40:23 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-11-19 13:47:38 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-04-10 14:03:17 +02:00
|
|
|
|
|
|
|
|
|
2015-03-21 15:25:43 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-04-10 14:03:17 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-03-21 15:25:43 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-04-10 14:03:17 +02:00
|
|
|
|
2016-05-19 17:34:38 +02:00
|
|
|
|
2015-03-21 15:25:43 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-03-31 20:02:10 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-03-31 20:02:11 +03:00
|
|
|
|
2016-03-31 20:02:10 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-03-31 20:02:11 +03:00
|
|
|
|
|
|
|
|
|
2016-03-31 20:02:10 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-02-14 12:27:16 -08:00
|
|
|
|
|
|
|
|
|
2019-01-15 15:31:56 -08:00
|
|
|
|
2017-02-14 12:27:16 -08:00
|
|
|
|
2015-06-17 10:31:00 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-07-14 08:31:58 -04:00
|
|
|
|
2015-06-17 10:31:00 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-10-05 10:39:10 -07:00
|
|
|
|
2015-06-17 10:31:00 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-10-25 15:48:53 -04:00
|
|
|
|
2020-06-11 16:02:38 +02:00
|
|
|
|
2015-06-18 16:20:08 +02:00
|
|
|
|
2019-01-15 15:31:56 -08:00
|
|
|
|
2015-06-17 10:31:00 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-10-05 10:39:10 -07:00
|
|
|
|
2015-06-17 10:31:00 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-07-14 08:31:58 -04:00
|
|
|
|
2015-06-17 10:31:00 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-10-25 15:48:53 -04:00
|
|
|
|
2020-06-11 16:02:38 +02:00
|
|
|
|
2015-06-17 10:31:00 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-06-18 16:20:08 +02:00
|
|
|
|
|
|
|
|
|
2017-02-14 12:27:16 -08:00
|
|
|
|
2019-01-15 15:31:56 -08:00
|
|
|
|
|
|
|
|
|
2015-06-17 10:31:00 +02:00
|
|
|
|
|
|
|
|
|
2017-02-15 09:49:26 +01:00
|
|
|
|
2015-07-13 12:26:46 +02:00
|
|
|
|
2016-03-31 20:02:11 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-06-09 09:14:44 +03:00
|
|
|
|
2016-03-31 20:02:11 +03:00
|
|
|
|
2026-01-24 04:38:40 +08:00
|
|
|
|
|
|
|
|
|
2016-03-31 20:02:11 +03:00
|
|
|
|
|
|
|
|
|
2021-05-11 20:02:47 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-05-11 20:02:49 +02:00
|
|
|
|
|
|
|
|
|
2021-05-11 20:02:47 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
mac80211: prepare sta handling for MLO support
Currently in mac80211 each STA object is represented
using sta_info datastructure with the associated
STA specific information and drivers access ieee80211_sta
part of it.
With MLO (Multi Link Operation) support being added
in 802.11be standard, though the association is logically
with a single Multi Link capable STA, at the physical level
communication can happen via different advertised
links (uniquely identified by Channel, operating class,
BSSID) and hence the need to handle multiple link
STA parameters within a composite sta_info object
called the MLD STA. The different link STA part of
MLD STA are identified using the link address which can
be same or different as the MLD STA address and unique
link id based on the link vif.
To support extension of such a model, the sta_info
datastructure is modified to hold multiple link STA
objects with link specific params currently within
sta_info moved to this new structure. Similarly this is
done for ieee80211_sta as well which will be accessed
within mac80211 as well as by drivers, hence trivial
driver changes are expected to support this.
For current non MLO supported drivers, only one link STA
is present and link information is accessed via 'deflink'
member.
For MLO drivers, we still need to define the APIs etc. to
get the correct link ID and access the correct part of
the station info.
Currently in mac80211, all link STA info are accessed directly
via deflink. These will be updated to access via link pointers
indexed by link id with MLO support patches, with link id
being 0 for non MLO supported cases.
Except for couple of macro related changes, below spatch takes
care of updating mac80211 and driver code to access to the
link STA info via deflink.
@ieee80211_sta@
struct ieee80211_sta *s;
struct sta_info *si;
identifier var = {supp_rates, ht_cap, vht_cap, he_cap, he_6ghz_capa, eht_cap, rx_nss, bandwidth, txpwr};
@@
(
s->
- var
+ deflink.var
|
si->sta.
- var
+ deflink.var
)
@sta_info@
struct sta_info *si;
identifier var = {gtk, pcpu_rx_stats, rx_stats, rx_stats_avg, status_stats, tx_stats, cur_max_bandwidth};
@@
(
si->
- var
+ deflink.var
)
Signed-off-by: Sriram R <quic_srirrama@quicinc.com>
Link: https://lore.kernel.org/r/1649086883-13246-1-git-send-email-quic_srirrama@quicinc.com
[remove MLO-drivers notes from commit message, not clear yet; run spatch]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2022-04-04 21:11:23 +05:30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-02-28 12:01:57 +01:00
|
|
|
|
|
|
|
|
|
2022-06-14 13:07:42 +02:00
|
|
|
|
mac80211: prepare sta handling for MLO support
Currently in mac80211 each STA object is represented
using sta_info datastructure with the associated
STA specific information and drivers access ieee80211_sta
part of it.
With MLO (Multi Link Operation) support being added
in 802.11be standard, though the association is logically
with a single Multi Link capable STA, at the physical level
communication can happen via different advertised
links (uniquely identified by Channel, operating class,
BSSID) and hence the need to handle multiple link
STA parameters within a composite sta_info object
called the MLD STA. The different link STA part of
MLD STA are identified using the link address which can
be same or different as the MLD STA address and unique
link id based on the link vif.
To support extension of such a model, the sta_info
datastructure is modified to hold multiple link STA
objects with link specific params currently within
sta_info moved to this new structure. Similarly this is
done for ieee80211_sta as well which will be accessed
within mac80211 as well as by drivers, hence trivial
driver changes are expected to support this.
For current non MLO supported drivers, only one link STA
is present and link information is accessed via 'deflink'
member.
For MLO drivers, we still need to define the APIs etc. to
get the correct link ID and access the correct part of
the station info.
Currently in mac80211, all link STA info are accessed directly
via deflink. These will be updated to access via link pointers
indexed by link id with MLO support patches, with link id
being 0 for non MLO supported cases.
Except for couple of macro related changes, below spatch takes
care of updating mac80211 and driver code to access to the
link STA info via deflink.
@ieee80211_sta@
struct ieee80211_sta *s;
struct sta_info *si;
identifier var = {supp_rates, ht_cap, vht_cap, he_cap, he_6ghz_capa, eht_cap, rx_nss, bandwidth, txpwr};
@@
(
s->
- var
+ deflink.var
|
si->sta.
- var
+ deflink.var
)
@sta_info@
struct sta_info *si;
identifier var = {gtk, pcpu_rx_stats, rx_stats, rx_stats_avg, status_stats, tx_stats, cur_max_bandwidth};
@@
(
si->
- var
+ deflink.var
)
Signed-off-by: Sriram R <quic_srirrama@quicinc.com>
Link: https://lore.kernel.org/r/1649086883-13246-1-git-send-email-quic_srirrama@quicinc.com
[remove MLO-drivers notes from commit message, not clear yet; run spatch]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2022-04-04 21:11:23 +05:30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2026-04-15 14:42:17 +02:00
|
|
|
|
2026-03-26 12:14:38 +02:00
|
|
|
|
|
|
|
|
|
2025-01-01 07:05:21 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2026-05-29 10:25:07 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2026-05-29 10:25:08 +02:00
|
|
|
|
|
|
|
|
|
2022-09-06 14:26:52 +02:00
|
|
|
|
2022-06-15 09:20:45 +02:00
|
|
|
|
mac80211: prepare sta handling for MLO support
Currently in mac80211 each STA object is represented
using sta_info datastructure with the associated
STA specific information and drivers access ieee80211_sta
part of it.
With MLO (Multi Link Operation) support being added
in 802.11be standard, though the association is logically
with a single Multi Link capable STA, at the physical level
communication can happen via different advertised
links (uniquely identified by Channel, operating class,
BSSID) and hence the need to handle multiple link
STA parameters within a composite sta_info object
called the MLD STA. The different link STA part of
MLD STA are identified using the link address which can
be same or different as the MLD STA address and unique
link id based on the link vif.
To support extension of such a model, the sta_info
datastructure is modified to hold multiple link STA
objects with link specific params currently within
sta_info moved to this new structure. Similarly this is
done for ieee80211_sta as well which will be accessed
within mac80211 as well as by drivers, hence trivial
driver changes are expected to support this.
For current non MLO supported drivers, only one link STA
is present and link information is accessed via 'deflink'
member.
For MLO drivers, we still need to define the APIs etc. to
get the correct link ID and access the correct part of
the station info.
Currently in mac80211, all link STA info are accessed directly
via deflink. These will be updated to access via link pointers
indexed by link id with MLO support patches, with link id
being 0 for non MLO supported cases.
Except for couple of macro related changes, below spatch takes
care of updating mac80211 and driver code to access to the
link STA info via deflink.
@ieee80211_sta@
struct ieee80211_sta *s;
struct sta_info *si;
identifier var = {supp_rates, ht_cap, vht_cap, he_cap, he_6ghz_capa, eht_cap, rx_nss, bandwidth, txpwr};
@@
(
s->
- var
+ deflink.var
|
si->sta.
- var
+ deflink.var
)
@sta_info@
struct sta_info *si;
identifier var = {gtk, pcpu_rx_stats, rx_stats, rx_stats_avg, status_stats, tx_stats, cur_max_bandwidth};
@@
(
si->
- var
+ deflink.var
)
Signed-off-by: Sriram R <quic_srirrama@quicinc.com>
Link: https://lore.kernel.org/r/1649086883-13246-1-git-send-email-quic_srirrama@quicinc.com
[remove MLO-drivers notes from commit message, not clear yet; run spatch]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2022-04-04 21:11:23 +05:30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-02-28 12:01:57 +01:00
|
|
|
|
|
|
|
|
|
2022-06-14 13:07:42 +02:00
|
|
|
|
mac80211: prepare sta handling for MLO support
Currently in mac80211 each STA object is represented
using sta_info datastructure with the associated
STA specific information and drivers access ieee80211_sta
part of it.
With MLO (Multi Link Operation) support being added
in 802.11be standard, though the association is logically
with a single Multi Link capable STA, at the physical level
communication can happen via different advertised
links (uniquely identified by Channel, operating class,
BSSID) and hence the need to handle multiple link
STA parameters within a composite sta_info object
called the MLD STA. The different link STA part of
MLD STA are identified using the link address which can
be same or different as the MLD STA address and unique
link id based on the link vif.
To support extension of such a model, the sta_info
datastructure is modified to hold multiple link STA
objects with link specific params currently within
sta_info moved to this new structure. Similarly this is
done for ieee80211_sta as well which will be accessed
within mac80211 as well as by drivers, hence trivial
driver changes are expected to support this.
For current non MLO supported drivers, only one link STA
is present and link information is accessed via 'deflink'
member.
For MLO drivers, we still need to define the APIs etc. to
get the correct link ID and access the correct part of
the station info.
Currently in mac80211, all link STA info are accessed directly
via deflink. These will be updated to access via link pointers
indexed by link id with MLO support patches, with link id
being 0 for non MLO supported cases.
Except for couple of macro related changes, below spatch takes
care of updating mac80211 and driver code to access to the
link STA info via deflink.
@ieee80211_sta@
struct ieee80211_sta *s;
struct sta_info *si;
identifier var = {supp_rates, ht_cap, vht_cap, he_cap, he_6ghz_capa, eht_cap, rx_nss, bandwidth, txpwr};
@@
(
s->
- var
+ deflink.var
|
si->sta.
- var
+ deflink.var
)
@sta_info@
struct sta_info *si;
identifier var = {gtk, pcpu_rx_stats, rx_stats, rx_stats_avg, status_stats, tx_stats, cur_max_bandwidth};
@@
(
si->
- var
+ deflink.var
)
Signed-off-by: Sriram R <quic_srirrama@quicinc.com>
Link: https://lore.kernel.org/r/1649086883-13246-1-git-send-email-quic_srirrama@quicinc.com
[remove MLO-drivers notes from commit message, not clear yet; run spatch]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2022-04-04 21:11:23 +05:30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2026-04-15 14:42:17 +02:00
|
|
|
|
2025-01-01 07:05:21 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2026-05-29 10:25:07 +02:00
|
|
|
|
2022-06-15 09:20:45 +02:00
|
|
|
|
2026-05-29 10:25:08 +02:00
|
|
|
|
|
|
|
|
|
2022-09-06 14:26:52 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-06-15 09:20:45 +02:00
|
|
|
|
mac80211: prepare sta handling for MLO support
Currently in mac80211 each STA object is represented
using sta_info datastructure with the associated
STA specific information and drivers access ieee80211_sta
part of it.
With MLO (Multi Link Operation) support being added
in 802.11be standard, though the association is logically
with a single Multi Link capable STA, at the physical level
communication can happen via different advertised
links (uniquely identified by Channel, operating class,
BSSID) and hence the need to handle multiple link
STA parameters within a composite sta_info object
called the MLD STA. The different link STA part of
MLD STA are identified using the link address which can
be same or different as the MLD STA address and unique
link id based on the link vif.
To support extension of such a model, the sta_info
datastructure is modified to hold multiple link STA
objects with link specific params currently within
sta_info moved to this new structure. Similarly this is
done for ieee80211_sta as well which will be accessed
within mac80211 as well as by drivers, hence trivial
driver changes are expected to support this.
For current non MLO supported drivers, only one link STA
is present and link information is accessed via 'deflink'
member.
For MLO drivers, we still need to define the APIs etc. to
get the correct link ID and access the correct part of
the station info.
Currently in mac80211, all link STA info are accessed directly
via deflink. These will be updated to access via link pointers
indexed by link id with MLO support patches, with link id
being 0 for non MLO supported cases.
Except for couple of macro related changes, below spatch takes
care of updating mac80211 and driver code to access to the
link STA info via deflink.
@ieee80211_sta@
struct ieee80211_sta *s;
struct sta_info *si;
identifier var = {supp_rates, ht_cap, vht_cap, he_cap, he_6ghz_capa, eht_cap, rx_nss, bandwidth, txpwr};
@@
(
s->
- var
+ deflink.var
|
si->sta.
- var
+ deflink.var
)
@sta_info@
struct sta_info *si;
identifier var = {gtk, pcpu_rx_stats, rx_stats, rx_stats_avg, status_stats, tx_stats, cur_max_bandwidth};
@@
(
si->
- var
+ deflink.var
)
Signed-off-by: Sriram R <quic_srirrama@quicinc.com>
Link: https://lore.kernel.org/r/1649086883-13246-1-git-send-email-quic_srirrama@quicinc.com
[remove MLO-drivers notes from commit message, not clear yet; run spatch]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2022-04-04 21:11:23 +05:30
|
|
|
|
|
|
|
|
|
2025-05-28 11:14:16 +05:30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-02-25 16:27:48 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-12-04 23:12:31 +01:00
|
|
|
|
2015-02-13 21:55:15 +01:00
|
|
|
|
2015-06-16 16:22:12 +02:00
|
|
|
|
|
|
|
|
|
2008-02-25 16:27:48 +01:00
|
|
|
|
2008-10-23 08:51:20 +02:00
|
|
|
|
2013-03-24 14:23:27 +02:00
|
|
|
|
|
|
|
|
|
2008-10-23 08:51:20 +02:00
|
|
|
|
2015-05-06 16:00:32 +02:00
|
|
|
|
|
|
|
|
|
2008-10-23 08:51:20 +02:00
|
|
|
|
2008-07-03 13:52:18 -07:00
|
|
|
|
|
|
|
|
|
mac80211: fix station/driver powersave race
It is currently possible to have a race due to the station PS
unblock work like this:
* station goes to sleep with frames buffered in the driver
* driver blocks wakeup
* station wakes up again
* driver flushes/returns frames, and unblocks, which schedules
the unblock work
* unblock work starts to run, and checks that the station is
awake (i.e. that the WLAN_STA_PS_STA flag isn't set)
* we process a received frame with PM=1, setting the flag again
* ieee80211_sta_ps_deliver_wakeup() runs, delivering all frames
to the driver, and then clearing the WLAN_STA_PS_DRIVER and
WLAN_STA_PS_STA flags
In this scenario, mac80211 will think that the station is awake,
while it really is asleep, and any TX'ed frames should be filtered
by the device (it will know that the station is sleeping) but then
passed to mac80211 again, which will not buffer it either as it
thinks the station is awake, and eventually the packets will be
dropped.
Fix this by moving the clearing of the flags to exactly where we
learn about the situation. This creates a problem of reordering,
so introduce another flag indicating that delivery is being done,
this new flag also queues frames and is cleared only while the
spinlock is held (which the queuing code also holds) so that any
concurrent delivery/TX is handled correctly.
Reported-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2014-05-27 16:32:27 +02:00
|
|
|
|
2008-10-23 08:51:20 +02:00
|
|
|
|
2011-09-29 16:04:36 +02:00
|
|
|
|
mac80211: fix AP powersave TX vs. wakeup race
There is a race between the TX path and the STA wakeup: while
a station is sleeping, mac80211 buffers frames until it wakes
up, then the frames are transmitted. However, the RX and TX
path are concurrent, so the packet indicating wakeup can be
processed while a packet is being transmitted.
This can lead to a situation where the buffered frames list
is emptied on the one side, while a frame is being added on
the other side, as the station is still seen as sleeping in
the TX path.
As a result, the newly added frame will not be send anytime
soon. It might be sent much later (and out of order) when the
station goes to sleep and wakes up the next time.
Additionally, it can lead to the crash below.
Fix all this by synchronising both paths with a new lock.
Both path are not fastpath since they handle PS situations.
In a later patch we'll remove the extra skb queue locks to
reduce locking overhead.
BUG: unable to handle kernel
NULL pointer dereference at 000000b0
IP: [<ff6f1791>] ieee80211_report_used_skb+0x11/0x3e0 [mac80211]
*pde = 00000000
Oops: 0000 [#1] SMP DEBUG_PAGEALLOC
EIP: 0060:[<ff6f1791>] EFLAGS: 00210282 CPU: 1
EIP is at ieee80211_report_used_skb+0x11/0x3e0 [mac80211]
EAX: e5900da0 EBX: 00000000 ECX: 00000001 EDX: 00000000
ESI: e41d00c0 EDI: e5900da0 EBP: ebe458e4 ESP: ebe458b0
DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068
CR0: 8005003b CR2: 000000b0 CR3: 25a78000 CR4: 000407d0
DR0: 00000000 DR1: 00000000 DR2: 00000000 DR3: 00000000
DR6: ffff0ff0 DR7: 00000400
Process iperf (pid: 3934, ti=ebe44000 task=e757c0b0 task.ti=ebe44000)
iwlwifi 0000:02:00.0: I iwl_pcie_enqueue_hcmd Sending command LQ_CMD (#4e), seq: 0x0903, 92 bytes at 3[3]:9
Stack:
e403b32c ebe458c4 00200002 00200286 e403b338 ebe458cc c10960bb e5900da0
ff76a6ec ebe458d8 00000000 e41d00c0 e5900da0 ebe458f0 ff6f1b75 e403b210
ebe4598c ff723dc1 00000000 ff76a6ec e597c978 e403b758 00000002 00000002
Call Trace:
[<ff6f1b75>] ieee80211_free_txskb+0x15/0x20 [mac80211]
[<ff723dc1>] invoke_tx_handlers+0x1661/0x1780 [mac80211]
[<ff7248a5>] ieee80211_tx+0x75/0x100 [mac80211]
[<ff7249bf>] ieee80211_xmit+0x8f/0xc0 [mac80211]
[<ff72550e>] ieee80211_subif_start_xmit+0x4fe/0xe20 [mac80211]
[<c149ef70>] dev_hard_start_xmit+0x450/0x950
[<c14b9aa9>] sch_direct_xmit+0xa9/0x250
[<c14b9c9b>] __qdisc_run+0x4b/0x150
[<c149f732>] dev_queue_xmit+0x2c2/0xca0
Cc: stable@vger.kernel.org
Reported-by: Yaara Rozenblum <yaara.rozenblum@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Reviewed-by: Stanislaw Gruszka <sgruszka@redhat.com>
[reword commit log, use a separate lock]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2014-02-20 09:22:11 +02:00
|
|
|
|
2011-09-29 16:04:29 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-03-27 21:30:37 +01:00
|
|
|
|
2019-08-09 11:00:01 -07:00
|
|
|
|
2011-04-08 21:24:24 +05:30
|
|
|
|
2015-06-16 15:58:22 +02:00
|
|
|
|
|
|
|
|
|
2008-10-23 08:51:20 +02:00
|
|
|
|
2019-01-29 11:31:26 +01:00
|
|
|
|
|
|
|
|
|
2022-06-25 23:24:05 +02:00
|
|
|
|
2008-10-23 08:51:20 +02:00
|
|
|
|
2015-06-17 10:31:00 +02:00
|
|
|
|
2016-04-05 11:59:05 +02:00
|
|
|
|
mac80211: async station powersave handling
Some devices require that all frames to a station
are flushed when that station goes into powersave
mode before being able to send frames to that
station again when it wakes up or polls -- all in
order to avoid reordering and too many or too few
frames being sent to the station when it polls.
Normally, this is the case unless the station
goes to sleep and wakes up very quickly again.
But in that case, frames for it may be pending
on the hardware queues, and thus races could
happen in the case of multiple hardware queues
used for QoS/WMM. Normally this isn't a problem,
but with the iwlwifi mechanism we need to make
sure the race doesn't happen.
This makes mac80211 able to cope with the race
with driver help by a new WLAN_STA_PS_DRIVER
per-station flag that can be controlled by the
driver and tells mac80211 whether it can transmit
frames or not. This flag must be set according to
very specific rules outlined in the documentation
for the function that controls it.
When we buffer new frames for the station, we
normally set the TIM bit right away, but while
the driver has blocked transmission to that sta
we need to avoid that as well since we cannot
respond to the station if it wakes up due to the
TIM bit. Once the driver unblocks, we can set
the TIM bit.
Similarly, when the station just wakes up, we
need to wait until all other frames are flushed
before we can transmit frames to that station,
so the same applies here, we need to wait for
the driver to give the OK.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-11-06 11:35:50 +01:00
|
|
|
|
2015-11-17 10:24:37 +02:00
|
|
|
|
2010-02-03 13:59:58 +01:00
|
|
|
|
2011-08-17 15:18:15 +03:00
|
|
|
|
2011-12-14 12:35:30 +01:00
|
|
|
|
2013-02-08 09:06:36 +01:00
|
|
|
|
2014-11-19 13:47:38 +02:00
|
|
|
|
2023-03-23 16:24:54 +07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-03-21 15:25:43 +01:00
|
|
|
|
2016-03-31 20:02:10 +03:00
|
|
|
|
2015-06-10 20:41:23 +03:00
|
|
|
|
|
|
|
|
|
2021-05-11 20:02:47 +02:00
|
|
|
|
2022-09-02 16:12:54 +02:00
|
|
|
|
|
|
|
|
|
mac80211: prepare sta handling for MLO support
Currently in mac80211 each STA object is represented
using sta_info datastructure with the associated
STA specific information and drivers access ieee80211_sta
part of it.
With MLO (Multi Link Operation) support being added
in 802.11be standard, though the association is logically
with a single Multi Link capable STA, at the physical level
communication can happen via different advertised
links (uniquely identified by Channel, operating class,
BSSID) and hence the need to handle multiple link
STA parameters within a composite sta_info object
called the MLD STA. The different link STA part of
MLD STA are identified using the link address which can
be same or different as the MLD STA address and unique
link id based on the link vif.
To support extension of such a model, the sta_info
datastructure is modified to hold multiple link STA
objects with link specific params currently within
sta_info moved to this new structure. Similarly this is
done for ieee80211_sta as well which will be accessed
within mac80211 as well as by drivers, hence trivial
driver changes are expected to support this.
For current non MLO supported drivers, only one link STA
is present and link information is accessed via 'deflink'
member.
For MLO drivers, we still need to define the APIs etc. to
get the correct link ID and access the correct part of
the station info.
Currently in mac80211, all link STA info are accessed directly
via deflink. These will be updated to access via link pointers
indexed by link id with MLO support patches, with link id
being 0 for non MLO supported cases.
Except for couple of macro related changes, below spatch takes
care of updating mac80211 and driver code to access to the
link STA info via deflink.
@ieee80211_sta@
struct ieee80211_sta *s;
struct sta_info *si;
identifier var = {supp_rates, ht_cap, vht_cap, he_cap, he_6ghz_capa, eht_cap, rx_nss, bandwidth, txpwr};
@@
(
s->
- var
+ deflink.var
|
si->sta.
- var
+ deflink.var
)
@sta_info@
struct sta_info *si;
identifier var = {gtk, pcpu_rx_stats, rx_stats, rx_stats_avg, status_stats, tx_stats, cur_max_bandwidth};
@@
(
si->
- var
+ deflink.var
)
Signed-off-by: Sriram R <quic_srirrama@quicinc.com>
Link: https://lore.kernel.org/r/1649086883-13246-1-git-send-email-quic_srirrama@quicinc.com
[remove MLO-drivers notes from commit message, not clear yet; run spatch]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2022-04-04 21:11:23 +05:30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-05-28 11:14:16 +05:30
|
|
|
|
2008-02-25 16:27:48 +01:00
|
|
|
|
2007-05-05 11:45:53 -07:00
|
|
|
|
2008-02-25 16:27:48 +01:00
|
|
|
|
2013-12-04 23:12:31 +01:00
|
|
|
|
2012-09-09 14:43:51 +03:00
|
|
|
|
2016-09-19 19:00:10 +08:00
|
|
|
|
2015-06-16 16:22:12 +02:00
|
|
|
|
2007-05-05 11:45:53 -07:00
|
|
|
|
2008-02-25 16:27:46 +01:00
|
|
|
|
2013-03-24 14:23:27 +02:00
|
|
|
|
|
|
|
|
|
2007-05-05 11:45:53 -07:00
|
|
|
|
|
|
|
|
|
2015-03-05 16:10:08 +01:00
|
|
|
|
2008-05-03 01:02:02 +02:00
|
|
|
|
2008-09-11 00:02:02 +02:00
|
|
|
|
2015-03-21 15:25:43 +01:00
|
|
|
|
2016-03-31 20:02:10 +03:00
|
|
|
|
2015-03-21 15:25:43 +01:00
|
|
|
|
2015-06-17 10:31:00 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
mac80211: fix station/driver powersave race
It is currently possible to have a race due to the station PS
unblock work like this:
* station goes to sleep with frames buffered in the driver
* driver blocks wakeup
* station wakes up again
* driver flushes/returns frames, and unblocks, which schedules
the unblock work
* unblock work starts to run, and checks that the station is
awake (i.e. that the WLAN_STA_PS_STA flag isn't set)
* we process a received frame with PM=1, setting the flag again
* ieee80211_sta_ps_deliver_wakeup() runs, delivering all frames
to the driver, and then clearing the WLAN_STA_PS_DRIVER and
WLAN_STA_PS_STA flags
In this scenario, mac80211 will think that the station is awake,
while it really is asleep, and any TX'ed frames should be filtered
by the device (it will know that the station is sleeping) but then
passed to mac80211 again, which will not buffer it either as it
thinks the station is awake, and eventually the packets will be
dropped.
Fix this by moving the clearing of the flags to exactly where we
learn about the situation. This creates a problem of reordering,
so introduce another flag indicating that delivery is being done,
this new flag also queues frames and is cleared only while the
spinlock is held (which the queuing code also holds) so that any
concurrent delivery/TX is handled correctly.
Reported-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2014-05-27 16:32:27 +02:00
|
|
|
|
mac80211: async station powersave handling
Some devices require that all frames to a station
are flushed when that station goes into powersave
mode before being able to send frames to that
station again when it wakes up or polls -- all in
order to avoid reordering and too many or too few
frames being sent to the station when it polls.
Normally, this is the case unless the station
goes to sleep and wakes up very quickly again.
But in that case, frames for it may be pending
on the hardware queues, and thus races could
happen in the case of multiple hardware queues
used for QoS/WMM. Normally this isn't a problem,
but with the iwlwifi mechanism we need to make
sure the race doesn't happen.
This makes mac80211 able to cope with the race
with driver help by a new WLAN_STA_PS_DRIVER
per-station flag that can be controlled by the
driver and tells mac80211 whether it can transmit
frames or not. This flag must be set according to
very specific rules outlined in the documentation
for the function that controls it.
When we buffer new frames for the station, we
normally set the TIM bit right away, but while
the driver has blocked transmission to that sta
we need to avoid that as well since we cannot
respond to the station if it wakes up due to the
TIM bit. Once the driver unblocks, we can set
the TIM bit.
Similarly, when the station just wakes up, we
need to wait until all other frames are flushed
before we can transmit frames to that station,
so the same applies here, we need to wait for
the driver to give the OK.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-11-06 11:35:50 +01:00
|
|
|
|
2007-05-05 11:45:53 -07:00
|
|
|
|
2007-05-05 11:46:38 -07:00
|
|
|
|
mac80211: async station powersave handling
Some devices require that all frames to a station
are flushed when that station goes into powersave
mode before being able to send frames to that
station again when it wakes up or polls -- all in
order to avoid reordering and too many or too few
frames being sent to the station when it polls.
Normally, this is the case unless the station
goes to sleep and wakes up very quickly again.
But in that case, frames for it may be pending
on the hardware queues, and thus races could
happen in the case of multiple hardware queues
used for QoS/WMM. Normally this isn't a problem,
but with the iwlwifi mechanism we need to make
sure the race doesn't happen.
This makes mac80211 able to cope with the race
with driver help by a new WLAN_STA_PS_DRIVER
per-station flag that can be controlled by the
driver and tells mac80211 whether it can transmit
frames or not. This flag must be set according to
very specific rules outlined in the documentation
for the function that controls it.
When we buffer new frames for the station, we
normally set the TIM bit right away, but while
the driver has blocked transmission to that sta
we need to avoid that as well since we cannot
respond to the station if it wakes up due to the
TIM bit. Once the driver unblocks, we can set
the TIM bit.
Similarly, when the station just wakes up, we
need to wait until all other frames are flushed
before we can transmit frames to that station,
so the same applies here, we need to wait for
the driver to give the OK.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-11-06 11:35:50 +01:00
|
|
|
|
2015-11-17 10:24:37 +02:00
|
|
|
|
mac80211: async station powersave handling
Some devices require that all frames to a station
are flushed when that station goes into powersave
mode before being able to send frames to that
station again when it wakes up or polls -- all in
order to avoid reordering and too many or too few
frames being sent to the station when it polls.
Normally, this is the case unless the station
goes to sleep and wakes up very quickly again.
But in that case, frames for it may be pending
on the hardware queues, and thus races could
happen in the case of multiple hardware queues
used for QoS/WMM. Normally this isn't a problem,
but with the iwlwifi mechanism we need to make
sure the race doesn't happen.
This makes mac80211 able to cope with the race
with driver help by a new WLAN_STA_PS_DRIVER
per-station flag that can be controlled by the
driver and tells mac80211 whether it can transmit
frames or not. This flag must be set according to
very specific rules outlined in the documentation
for the function that controls it.
When we buffer new frames for the station, we
normally set the TIM bit right away, but while
the driver has blocked transmission to that sta
we need to avoid that as well since we cannot
respond to the station if it wakes up due to the
TIM bit. Once the driver unblocks, we can set
the TIM bit.
Similarly, when the station just wakes up, we
need to wait until all other frames are flushed
before we can transmit frames to that station,
so the same applies here, we need to wait for
the driver to give the OK.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-11-06 11:35:50 +01:00
|
|
|
|
2010-02-03 13:59:58 +01:00
|
|
|
|
2008-02-25 16:27:46 +01:00
|
|
|
|
2011-12-14 12:35:30 +01:00
|
|
|
|
|
|
|
|
|
2011-09-29 16:04:36 +02:00
|
|
|
|
|
|
|
|
|
2008-02-25 16:27:48 +01:00
|
|
|
|
mac80211: fix AP powersave TX vs. wakeup race
There is a race between the TX path and the STA wakeup: while
a station is sleeping, mac80211 buffers frames until it wakes
up, then the frames are transmitted. However, the RX and TX
path are concurrent, so the packet indicating wakeup can be
processed while a packet is being transmitted.
This can lead to a situation where the buffered frames list
is emptied on the one side, while a frame is being added on
the other side, as the station is still seen as sleeping in
the TX path.
As a result, the newly added frame will not be send anytime
soon. It might be sent much later (and out of order) when the
station goes to sleep and wakes up the next time.
Additionally, it can lead to the crash below.
Fix all this by synchronising both paths with a new lock.
Both path are not fastpath since they handle PS situations.
In a later patch we'll remove the extra skb queue locks to
reduce locking overhead.
BUG: unable to handle kernel
NULL pointer dereference at 000000b0
IP: [<ff6f1791>] ieee80211_report_used_skb+0x11/0x3e0 [mac80211]
*pde = 00000000
Oops: 0000 [#1] SMP DEBUG_PAGEALLOC
EIP: 0060:[<ff6f1791>] EFLAGS: 00210282 CPU: 1
EIP is at ieee80211_report_used_skb+0x11/0x3e0 [mac80211]
EAX: e5900da0 EBX: 00000000 ECX: 00000001 EDX: 00000000
ESI: e41d00c0 EDI: e5900da0 EBP: ebe458e4 ESP: ebe458b0
DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068
CR0: 8005003b CR2: 000000b0 CR3: 25a78000 CR4: 000407d0
DR0: 00000000 DR1: 00000000 DR2: 00000000 DR3: 00000000
DR6: ffff0ff0 DR7: 00000400
Process iperf (pid: 3934, ti=ebe44000 task=e757c0b0 task.ti=ebe44000)
iwlwifi 0000:02:00.0: I iwl_pcie_enqueue_hcmd Sending command LQ_CMD (#4e), seq: 0x0903, 92 bytes at 3[3]:9
Stack:
e403b32c ebe458c4 00200002 00200286 e403b338 ebe458cc c10960bb e5900da0
ff76a6ec ebe458d8 00000000 e41d00c0 e5900da0 ebe458f0 ff6f1b75 e403b210
ebe4598c ff723dc1 00000000 ff76a6ec e597c978 e403b758 00000002 00000002
Call Trace:
[<ff6f1b75>] ieee80211_free_txskb+0x15/0x20 [mac80211]
[<ff723dc1>] invoke_tx_handlers+0x1661/0x1780 [mac80211]
[<ff7248a5>] ieee80211_tx+0x75/0x100 [mac80211]
[<ff7249bf>] ieee80211_xmit+0x8f/0xc0 [mac80211]
[<ff72550e>] ieee80211_subif_start_xmit+0x4fe/0xe20 [mac80211]
[<c149ef70>] dev_hard_start_xmit+0x450/0x950
[<c14b9aa9>] sch_direct_xmit+0xa9/0x250
[<c14b9c9b>] __qdisc_run+0x4b/0x150
[<c149f732>] dev_queue_xmit+0x2c2/0xca0
Cc: stable@vger.kernel.org
Reported-by: Yaara Rozenblum <yaara.rozenblum@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Reviewed-by: Stanislaw Gruszka <sgruszka@redhat.com>
[reword commit log, use a separate lock]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2014-02-20 09:22:11 +02:00
|
|
|
|
|
|
|
|
|
2011-09-29 16:04:29 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-03-27 21:30:37 +01:00
|
|
|
|
2008-02-25 16:27:48 +01:00
|
|
|
|
2019-08-09 11:00:01 -07:00
|
|
|
|
2011-04-08 21:24:24 +05:30
|
|
|
|
2013-04-22 16:29:31 +02:00
|
|
|
|
2011-07-07 18:45:03 +02:00
|
|
|
|
2012-11-14 23:22:21 +01:00
|
|
|
|
2008-02-25 16:27:48 +01:00
|
|
|
|
2008-07-10 11:21:26 +02:00
|
|
|
|
2008-02-25 16:27:48 +01:00
|
|
|
|
2018-12-18 17:02:08 -08:00
|
|
|
|
2022-06-25 23:24:05 +02:00
|
|
|
|
2018-12-18 17:02:08 -08:00
|
|
|
|
2008-02-25 16:27:48 +01:00
|
|
|
|
2008-05-03 01:02:02 +02:00
|
|
|
|
2008-02-25 16:27:48 +01:00
|
|
|
|
2007-12-25 17:00:32 +02:00
|
|
|
|
2008-02-25 16:27:48 +01:00
|
|
|
|
2007-05-05 11:46:38 -07:00
|
|
|
|
2016-04-05 11:59:05 +02:00
|
|
|
|
2007-05-05 11:46:38 -07:00
|
|
|
|
2008-09-11 00:02:02 +02:00
|
|
|
|
2014-11-19 13:47:38 +02:00
|
|
|
|
2023-02-13 11:08:55 +01:00
|
|
|
|
2014-11-19 13:47:38 +02:00
|
|
|
|
2015-06-10 20:41:23 +03:00
|
|
|
|
|
|
|
|
|
2021-05-11 20:02:47 +02:00
|
|
|
|
|
|
|
|
|
2022-09-02 16:12:54 +02:00
|
|
|
|
mac80211: prepare sta handling for MLO support
Currently in mac80211 each STA object is represented
using sta_info datastructure with the associated
STA specific information and drivers access ieee80211_sta
part of it.
With MLO (Multi Link Operation) support being added
in 802.11be standard, though the association is logically
with a single Multi Link capable STA, at the physical level
communication can happen via different advertised
links (uniquely identified by Channel, operating class,
BSSID) and hence the need to handle multiple link
STA parameters within a composite sta_info object
called the MLD STA. The different link STA part of
MLD STA are identified using the link address which can
be same or different as the MLD STA address and unique
link id based on the link vif.
To support extension of such a model, the sta_info
datastructure is modified to hold multiple link STA
objects with link specific params currently within
sta_info moved to this new structure. Similarly this is
done for ieee80211_sta as well which will be accessed
within mac80211 as well as by drivers, hence trivial
driver changes are expected to support this.
For current non MLO supported drivers, only one link STA
is present and link information is accessed via 'deflink'
member.
For MLO drivers, we still need to define the APIs etc. to
get the correct link ID and access the correct part of
the station info.
Currently in mac80211, all link STA info are accessed directly
via deflink. These will be updated to access via link pointers
indexed by link id with MLO support patches, with link id
being 0 for non MLO supported cases.
Except for couple of macro related changes, below spatch takes
care of updating mac80211 and driver code to access to the
link STA info via deflink.
@ieee80211_sta@
struct ieee80211_sta *s;
struct sta_info *si;
identifier var = {supp_rates, ht_cap, vht_cap, he_cap, he_6ghz_capa, eht_cap, rx_nss, bandwidth, txpwr};
@@
(
s->
- var
+ deflink.var
|
si->sta.
- var
+ deflink.var
)
@sta_info@
struct sta_info *si;
identifier var = {gtk, pcpu_rx_stats, rx_stats, rx_stats_avg, status_stats, tx_stats, cur_max_bandwidth};
@@
(
si->
- var
+ deflink.var
)
Signed-off-by: Sriram R <quic_srirrama@quicinc.com>
Link: https://lore.kernel.org/r/1649086883-13246-1-git-send-email-quic_srirrama@quicinc.com
[remove MLO-drivers notes from commit message, not clear yet; run spatch]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2022-04-04 21:11:23 +05:30
|
|
|
|
2022-06-15 09:20:45 +02:00
|
|
|
|
2025-05-28 11:14:16 +05:30
|
|
|
|
mac80211: prepare sta handling for MLO support
Currently in mac80211 each STA object is represented
using sta_info datastructure with the associated
STA specific information and drivers access ieee80211_sta
part of it.
With MLO (Multi Link Operation) support being added
in 802.11be standard, though the association is logically
with a single Multi Link capable STA, at the physical level
communication can happen via different advertised
links (uniquely identified by Channel, operating class,
BSSID) and hence the need to handle multiple link
STA parameters within a composite sta_info object
called the MLD STA. The different link STA part of
MLD STA are identified using the link address which can
be same or different as the MLD STA address and unique
link id based on the link vif.
To support extension of such a model, the sta_info
datastructure is modified to hold multiple link STA
objects with link specific params currently within
sta_info moved to this new structure. Similarly this is
done for ieee80211_sta as well which will be accessed
within mac80211 as well as by drivers, hence trivial
driver changes are expected to support this.
For current non MLO supported drivers, only one link STA
is present and link information is accessed via 'deflink'
member.
For MLO drivers, we still need to define the APIs etc. to
get the correct link ID and access the correct part of
the station info.
Currently in mac80211, all link STA info are accessed directly
via deflink. These will be updated to access via link pointers
indexed by link id with MLO support patches, with link id
being 0 for non MLO supported cases.
Except for couple of macro related changes, below spatch takes
care of updating mac80211 and driver code to access to the
link STA info via deflink.
@ieee80211_sta@
struct ieee80211_sta *s;
struct sta_info *si;
identifier var = {supp_rates, ht_cap, vht_cap, he_cap, he_6ghz_capa, eht_cap, rx_nss, bandwidth, txpwr};
@@
(
s->
- var
+ deflink.var
|
si->sta.
- var
+ deflink.var
)
@sta_info@
struct sta_info *si;
identifier var = {gtk, pcpu_rx_stats, rx_stats, rx_stats_avg, status_stats, tx_stats, cur_max_bandwidth};
@@
(
si->
- var
+ deflink.var
)
Signed-off-by: Sriram R <quic_srirrama@quicinc.com>
Link: https://lore.kernel.org/r/1649086883-13246-1-git-send-email-quic_srirrama@quicinc.com
[remove MLO-drivers notes from commit message, not clear yet; run spatch]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2022-04-04 21:11:23 +05:30
|
|
|
|
2008-09-11 00:02:02 +02:00
|
|
|
|
|
|
|
|
|
2007-05-05 11:45:53 -07:00
|
|
|
|
|
|
|
|
|
2024-06-12 14:35:56 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-05-13 10:45:43 -07:00
|
|
|
|
2008-02-25 16:24:38 +01:00
|
|
|
|
|
|
|
|
|
2015-06-17 10:31:00 +02:00
|
|
|
|
2008-02-25 16:24:38 +01:00
|
|
|
|
2011-05-13 10:45:43 -07:00
|
|
|
|
2008-02-25 16:24:38 +01:00
|
|
|
|
|
|
|
|
|
2011-09-29 16:04:36 +02:00
|
|
|
|
|
|
|
|
|
2008-05-03 01:02:02 +02:00
|
|
|
|
2011-12-14 12:35:30 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-09-29 16:04:36 +02:00
|
|
|
|
2008-05-03 01:02:02 +02:00
|
|
|
|
|
|
|
|
|
2011-09-29 16:04:36 +02:00
|
|
|
|
|
|
|
|
|
2008-05-03 01:02:02 +02:00
|
|
|
|
2011-12-14 12:35:30 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-09-29 16:04:36 +02:00
|
|
|
|
2008-05-03 01:02:02 +02:00
|
|
|
|
|
|
|
|
|
2011-09-29 16:04:36 +02:00
|
|
|
|
|
|
|
|
|
2008-05-03 01:02:02 +02:00
|
|
|
|
2011-09-29 16:04:36 +02:00
|
|
|
|
2008-05-03 01:02:02 +02:00
|
|
|
|
|
|
|
|
|
2011-09-29 16:04:36 +02:00
|
|
|
|
|
|
|
|
|
2008-05-03 01:02:02 +02:00
|
|
|
|
2011-12-14 12:35:30 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-09-29 16:04:36 +02:00
|
|
|
|
2008-05-03 01:02:02 +02:00
|
|
|
|
|
|
|
|
|
2011-11-04 11:18:20 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-12-14 12:35:30 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-11-04 11:18:20 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-01-12 09:31:10 +01:00
|
|
|
|
|
|
|
|
|
2011-12-14 12:35:30 +01:00
|
|
|
|
2012-01-12 09:31:10 +01:00
|
|
|
|
|
|
|
|
|
2011-12-14 12:35:30 +01:00
|
|
|
|
2012-01-12 09:31:10 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-12-14 12:35:30 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-05-13 13:35:40 +02:00
|
|
|
|
|
|
|
|
|
2007-05-05 11:45:53 -07:00
|
|
|
|
2023-08-28 14:00:04 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-05-05 11:45:53 -07:00
|
|
|
|
2011-09-29 16:04:29 +02:00
|
|
|
|
|
|
|
|
|
2007-05-05 11:45:53 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-09-19 19:00:10 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-02-25 16:27:46 +01:00
|
|
|
|
2009-11-25 17:46:18 +01:00
|
|
|
|
2008-02-25 16:27:46 +01:00
|
|
|
|
2009-11-25 17:46:18 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-01-08 18:10:58 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-08-28 14:00:01 +02:00
|
|
|
|
2019-11-12 14:08:35 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-09-19 19:00:10 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-11-25 17:46:18 +01:00
|
|
|
|
2022-06-14 13:07:42 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-02-25 16:27:46 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-11-16 12:00:37 +01:00
|
|
|
|
|
|
|
|
|
2008-02-25 16:27:46 +01:00
|
|
|
|
2008-02-25 16:27:47 +01:00
|
|
|
|
|
|
|
|
|
2008-02-25 16:27:46 +01:00
|
|
|
|
2008-02-25 16:27:47 +01:00
|
|
|
|
2022-07-14 23:40:47 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-12-14 12:35:30 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-02-25 16:27:47 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-02-03 13:59:58 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-02-25 16:27:47 +01:00
|
|
|
|
|
|
|
|
|
2010-02-03 13:59:58 +01:00
|
|
|
|
|
|
|
|
|
2012-01-12 09:31:10 +01:00
|
|
|
|
2010-02-03 13:59:58 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-05-05 11:45:53 -07:00
|
|
|
|
2011-09-29 16:04:27 +02:00
|
|
|
|
2008-02-20 11:21:35 +01:00
|
|
|
|
2015-02-13 21:55:15 +01:00
|
|
|
|
2008-02-25 16:27:46 +01:00
|
|
|
|
2012-12-13 23:49:02 +01:00
|
|
|
|
|
|
|
|
|
2020-10-23 18:33:08 +02:00
|
|
|
|
2012-12-13 23:49:02 +01:00
|
|
|
|
2024-04-19 10:21:27 +02:00
|
|
|
|
2012-12-13 23:49:02 +01:00
|
|
|
|
|
|
|
|
|
2013-12-04 23:18:37 +01:00
|
|
|
|
2024-02-05 21:59:51 +05:30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-12-24 19:27:29 +02:00
|
|
|
|
2012-12-13 23:49:02 +01:00
|
|
|
|
2024-02-05 21:59:51 +05:30
|
|
|
|
2024-12-24 19:27:29 +02:00
|
|
|
|
2013-12-04 23:18:37 +01:00
|
|
|
|
2020-10-23 18:33:08 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-04-19 10:21:27 +02:00
|
|
|
|
2020-10-23 18:33:08 +02:00
|
|
|
|
|
|
|
|
|
2024-02-05 21:59:51 +05:30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-10-23 18:33:08 +02:00
|
|
|
|
2024-02-05 21:59:51 +05:30
|
|
|
|
|
|
|
|
|
2013-12-04 23:18:37 +01:00
|
|
|
|
2024-12-24 19:27:29 +02:00
|
|
|
|
2013-12-04 23:18:37 +01:00
|
|
|
|
2012-12-13 23:49:02 +01:00
|
|
|
|
2012-03-05 15:31:48 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-05-18 11:40:44 +02:00
|
|
|
|
|
|
|
|
|
2014-06-04 17:31:56 +02:00
|
|
|
|
2025-05-28 11:14:16 +05:30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-07-11 17:15:24 +03:00
|
|
|
|
|
|
|
|
|
2008-09-11 00:01:46 +02:00
|
|
|
|
|
|
|
|
|
2008-02-25 16:27:46 +01:00
|
|
|
|
2022-05-31 23:20:08 +02:00
|
|
|
|
2022-06-14 17:27:03 +03:00
|
|
|
|
2022-05-31 23:20:08 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
mac80211: async station powersave handling
Some devices require that all frames to a station
are flushed when that station goes into powersave
mode before being able to send frames to that
station again when it wakes up or polls -- all in
order to avoid reordering and too many or too few
frames being sent to the station when it polls.
Normally, this is the case unless the station
goes to sleep and wakes up very quickly again.
But in that case, frames for it may be pending
on the hardware queues, and thus races could
happen in the case of multiple hardware queues
used for QoS/WMM. Normally this isn't a problem,
but with the iwlwifi mechanism we need to make
sure the race doesn't happen.
This makes mac80211 able to cope with the race
with driver help by a new WLAN_STA_PS_DRIVER
per-station flag that can be controlled by the
driver and tells mac80211 whether it can transmit
frames or not. This flag must be set according to
very specific rules outlined in the documentation
for the function that controls it.
When we buffer new frames for the station, we
normally set the TIM bit right away, but while
the driver has blocked transmission to that sta
we need to avoid that as well since we cannot
respond to the station if it wakes up due to the
TIM bit. Once the driver unblocks, we can set
the TIM bit.
Similarly, when the station just wakes up, we
need to wait until all other frames are flushed
before we can transmit frames to that station,
so the same applies here, we need to wait for
the driver to give the OK.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-11-06 11:35:50 +01:00
|
|
|
|
|
|
|
|
|
2011-09-29 16:04:33 +02:00
|
|
|
|
mac80211: async station powersave handling
Some devices require that all frames to a station
are flushed when that station goes into powersave
mode before being able to send frames to that
station again when it wakes up or polls -- all in
order to avoid reordering and too many or too few
frames being sent to the station when it polls.
Normally, this is the case unless the station
goes to sleep and wakes up very quickly again.
But in that case, frames for it may be pending
on the hardware queues, and thus races could
happen in the case of multiple hardware queues
used for QoS/WMM. Normally this isn't a problem,
but with the iwlwifi mechanism we need to make
sure the race doesn't happen.
This makes mac80211 able to cope with the race
with driver help by a new WLAN_STA_PS_DRIVER
per-station flag that can be controlled by the
driver and tells mac80211 whether it can transmit
frames or not. This flag must be set according to
very specific rules outlined in the documentation
for the function that controls it.
When we buffer new frames for the station, we
normally set the TIM bit right away, but while
the driver has blocked transmission to that sta
we need to avoid that as well since we cannot
respond to the station if it wakes up due to the
TIM bit. Once the driver unblocks, we can set
the TIM bit.
Similarly, when the station just wakes up, we
need to wait until all other frames are flushed
before we can transmit frames to that station,
so the same applies here, we need to wait for
the driver to give the OK.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-11-06 11:35:50 +01:00
|
|
|
|
wifi: mac80211: add support towards MLO handling of station statistics
Currently, in supporting API's to fill sinfo structure from sta
structure, is mapped to fill the fields from sta->deflink. However,
for multi-link (ML) station, sinfo structure should be filled from
corresponding link_id.
Therefore, add link_id as an additional argument in supporting API's
for filling sinfo structure correctly. Link_id is set to -1 for non-ML
station and corresponding link_id for ML stations. In supporting API's
for filling sinfo structure, check for link_id, if link_id < 0, fill
the sinfo structure from sta->deflink, otherwise fill from
sta->link[link_id].
Current, changes are done at the deflink level i.e, pass -1 as link_id.
Actual link_id will be added in subsequent patches to support
station statistics for MLO.
Signed-off-by: Sarika Sharma <quic_sarishar@quicinc.com>
Link: https://patch.msgid.link/20250528054420.3050133-2-quic_sarishar@quicinc.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2025-05-28 11:14:11 +05:30
|
|
|
|
2016-03-31 20:02:07 +03:00
|
|
|
|
2026-04-15 14:42:08 +02:00
|
|
|
|
|
|
|
|
|
2022-07-13 18:08:03 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-10-05 13:52:26 +02:00
|
|
|
|
|
|
|
|
|
2026-04-15 14:42:17 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2026-05-29 10:25:06 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-04-26 14:51:20 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-06-09 09:14:44 +03:00
|
|
|
|
2020-10-05 09:45:22 -07:00
|
|
|
|
2023-01-09 13:07:21 +02:00
|
|
|
|
2026-01-30 16:21:07 +01:00
|
|
|
|
2017-04-26 14:51:20 +02:00
|
|
|
|
|
|
|
|
|
2026-01-30 16:21:07 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2026-06-02 16:22:24 +10:00
|
|
|
|
2026-01-30 16:21:07 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2026-06-02 16:22:24 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-04-26 14:51:20 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-03-31 20:02:08 +03:00
|
|
|
|
|
|
|
|
|
2017-04-26 14:51:20 +02:00
|
|
|
|
2016-03-31 20:02:08 +03:00
|
|
|
|
2018-06-09 09:14:44 +03:00
|
|
|
|
2016-03-31 20:02:08 +03:00
|
|
|
|
2017-04-26 14:51:20 +02:00
|
|
|
|
2016-03-31 20:02:08 +03:00
|
|
|
|
2026-01-30 16:21:07 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2026-06-02 16:22:24 +10:00
|
|
|
|
2026-01-30 16:21:07 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-03-31 20:02:08 +03:00
|
|
|
|
2017-04-26 12:14:59 +02:00
|
|
|
|
|
|
|
|
|
2017-04-26 14:51:20 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-04-26 12:14:59 +02:00
|
|
|
|
|
|
|
|
|
2017-04-26 14:51:20 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-04-26 12:14:59 +02:00
|
|
|
|
2018-06-09 09:14:44 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-01-09 13:07:21 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2026-01-30 16:21:07 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2026-06-02 16:22:24 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-04-26 12:14:59 +02:00
|
|
|
|
|
|
|
|
|
2017-04-26 14:51:20 +02:00
|
|
|
|
2017-04-26 12:14:59 +02:00
|
|
|
|
2016-03-31 20:02:08 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-05-05 11:45:53 -07:00
|
|
|
|