<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/net/mac80211/airtime.c, branch linux-rolling-stable</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-rolling-stable</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-rolling-stable'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2024-09-06T10:58:36Z</updated>
<entry>
<title>wifi: mac80211: introduce EHT rate support in AQL airtime</title>
<updated>2024-09-06T10:58:36Z</updated>
<author>
<name>Ming Yen Hsieh</name>
</author>
<published>2024-09-04T11:12:56Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3702a33216e6b76361690630e3ab1a33b0ef03af'/>
<id>urn:sha1:3702a33216e6b76361690630e3ab1a33b0ef03af</id>
<content type='text'>
Add definitions related to EHT mode and airtime calculation
according to the 802.11BE_D4.0.

Co-developed-by: Bo Jiao &lt;Bo.Jiao@mediatek.com&gt;
Signed-off-by: Bo Jiao &lt;Bo.Jiao@mediatek.com&gt;
Signed-off-by: Deren Wu &lt;deren.wu@mediatek.com&gt;
Signed-off-by: Quan Zhou &lt;quan.zhou@mediatek.com&gt;
Signed-off-by: Ming Yen Hsieh &lt;mingyen.hsieh@mediatek.com&gt;
Link: https://patch.msgid.link/20240904111256.11734-1-mingyen.hsieh@mediatek.com
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
</content>
</entry>
<entry>
<title>wifi: mac80211: Sanity check tx bitrate if not provided by driver</title>
<updated>2023-09-13T14:24:05Z</updated>
<author>
<name>Stephen Douthit</name>
</author>
<published>2023-02-13T20:40:24Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3e99b4d282195435a9271fb738c4b146a9d35a5a'/>
<id>urn:sha1:3e99b4d282195435a9271fb738c4b146a9d35a5a</id>
<content type='text'>
If the driver doesn't fill NL80211_STA_INFO_TX_BITRATE in sta_set_sinfo()
then as a fallback sta-&gt;deflink.tx_stats.last_rate is used.  Unfortunately
there's no guarantee that this has actually been set before it's used.

Originally found when 'iw &lt;dev&gt; link' would always return a tx rate of
6Mbps regardless of actual link speed for the QCA9337 running firmware
WLAN.TF.2.1-00021-QCARMSWP-1 in my netbook.

Use the sanity check logic from ieee80211_fill_rx_status() and refactor
that to use the new inline function.

Signed-off-by: Stephen Douthit &lt;stephen.douthit@gmail.com&gt;
Link: https://lore.kernel.org/r/20230213204024.3377-1-stephen.douthit@gmail.com
[change to bool ..._rate_valid() instead of int ..._rate_invalid()]
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
</content>
</entry>
<entry>
<title>wifi: mac80211: remove shifted rate support</title>
<updated>2023-09-13T09:22:16Z</updated>
<author>
<name>Johannes Berg</name>
</author>
<published>2023-08-29T10:17:44Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2400dfe23fa91612c18c6c8d8a5b8164ff98836c'/>
<id>urn:sha1:2400dfe23fa91612c18c6c8d8a5b8164ff98836c</id>
<content type='text'>
We really cannot even get into this as we can't have
a BSS with a 5/10 MHz (scan) width, and therefore all
the code handling shifted rates cannot happen. Remove
it all, since it's broken anyway, at least with MLO.

Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
</content>
</entry>
<entry>
<title>wifi: mac8021: fix possible oob access in ieee80211_get_rate_duration</title>
<updated>2022-11-25T11:45:53Z</updated>
<author>
<name>Lorenzo Bianconi</name>
</author>
<published>2022-11-08T15:19:26Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3e8f7abcc3473bc9603323803aeaed4ffcc3a2ab'/>
<id>urn:sha1:3e8f7abcc3473bc9603323803aeaed4ffcc3a2ab</id>
<content type='text'>
Fix possible out-of-bound access in ieee80211_get_rate_duration routine
as reported by the following UBSAN report:

UBSAN: array-index-out-of-bounds in net/mac80211/airtime.c:455:47
index 15 is out of range for type 'u16 [12]'
CPU: 2 PID: 217 Comm: kworker/u32:10 Not tainted 6.1.0-060100rc3-generic
Hardware name: Acer Aspire TC-281/Aspire TC-281, BIOS R01-A2 07/18/2017
Workqueue: mt76 mt76u_tx_status_data [mt76_usb]
Call Trace:
 &lt;TASK&gt;
 show_stack+0x4e/0x61
 dump_stack_lvl+0x4a/0x6f
 dump_stack+0x10/0x18
 ubsan_epilogue+0x9/0x43
 __ubsan_handle_out_of_bounds.cold+0x42/0x47
ieee80211_get_rate_duration.constprop.0+0x22f/0x2a0 [mac80211]
 ? ieee80211_tx_status_ext+0x32e/0x640 [mac80211]
 ieee80211_calc_rx_airtime+0xda/0x120 [mac80211]
 ieee80211_calc_tx_airtime+0xb4/0x100 [mac80211]
 mt76x02_send_tx_status+0x266/0x480 [mt76x02_lib]
 mt76x02_tx_status_data+0x52/0x80 [mt76x02_lib]
 mt76u_tx_status_data+0x67/0xd0 [mt76_usb]
 process_one_work+0x225/0x400
 worker_thread+0x50/0x3e0
 ? process_one_work+0x400/0x400
 kthread+0xe9/0x110
 ? kthread_complete_and_exit+0x20/0x20
 ret_from_fork+0x22/0x30

Fixes: db3e1c40cf2f ("mac80211: Import airtime calculation code from mt76")
Signed-off-by: Lorenzo Bianconi &lt;lorenzo@kernel.org&gt;
Acked-by: Toke Høiland-Jørgensen &lt;toke@toke.dk&gt;
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
</content>
</entry>
<entry>
<title>wifi: mac80211: move some future per-link data to bss_conf</title>
<updated>2022-06-20T10:55:01Z</updated>
<author>
<name>Johannes Berg</name>
</author>
<published>2022-05-10T11:26:44Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d0a9123ef548def5c8880e83e5df948eb5b55c62'/>
<id>urn:sha1:d0a9123ef548def5c8880e83e5df948eb5b55c62</id>
<content type='text'>
To add MLD, reuse the bss_conf structure later for per-link
information, so move some things into it that are per link.

Most transformations were done with the following spatch:

    @@
    expression sdata;
    identifier var = { chanctx_conf, mu_mimo_owner, csa_active, color_change_active, color_change_color };
    @@
    -sdata-&gt;vif.var
    +sdata-&gt;vif.bss_conf.var

    @@
    struct ieee80211_vif *vif;
    identifier var = { chanctx_conf, mu_mimo_owner, csa_active, color_change_active, color_change_color };
    @@
    -vif-&gt;var
    +vif-&gt;bss_conf.var

Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
</content>
</entry>
<entry>
<title>mac80211: prepare sta handling for MLO support</title>
<updated>2022-04-11T14:42:03Z</updated>
<author>
<name>Sriram R</name>
</author>
<published>2022-04-04T15:41:23Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=046d2e7c50e3087a32a85fd384c21f896dbccf83'/>
<id>urn:sha1:046d2e7c50e3087a32a85fd384c21f896dbccf83</id>
<content type='text'>
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-&gt;
  -    var
  +    deflink.var
  |
   si-&gt;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-&gt;
  -    var
  +    deflink.var
  )

Signed-off-by: Sriram R &lt;quic_srirrama@quicinc.com&gt;
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 &lt;johannes.berg@intel.com&gt;
</content>
</entry>
<entry>
<title>mac80211: correct legacy rates check in ieee80211_calc_rx_airtime</title>
<updated>2022-03-11T10:45:36Z</updated>
<author>
<name>MeiChia Chiu</name>
</author>
<published>2022-03-08T02:16:45Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=022143d0c52b6e63d49ffc3542dc9d3ae15a5178'/>
<id>urn:sha1:022143d0c52b6e63d49ffc3542dc9d3ae15a5178</id>
<content type='text'>
There are no legacy rates on 60GHz or sub-1GHz band, so modify the check.

Signed-off-by: Ryder Lee &lt;ryder.lee@mediatek.com&gt;
Signed-off-by: MeiChia Chiu &lt;MeiChia.Chiu@mediatek.com&gt;
Link: https://lore.kernel.org/r/20220308021645.16272-1-MeiChia.Chiu@mediatek.com
[Ghz -&gt;  GHz]
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
</content>
</entry>
<entry>
<title>mac80211: remove unused macros</title>
<updated>2022-02-04T15:26:27Z</updated>
<author>
<name>Johannes Berg</name>
</author>
<published>2022-02-02T08:49:45Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=453a2a82050e918c7770aee55b0b6329fcaddd13'/>
<id>urn:sha1:453a2a82050e918c7770aee55b0b6329fcaddd13</id>
<content type='text'>
Various macros in mac80211 aren't used, remove them. In one
case it's used under ifdef, so ifdef it for the W=2 warning.

Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
Signed-off-by: Luca Coelho &lt;luciano.coelho@intel.com&gt;
Link: https://lore.kernel.org/r/iwlwifi.20220202104617.5172d7fd878e.I2f1fce686a2b71003f083b2566fb09cf16b8165a@changeid
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
</content>
</entry>
<entry>
<title>mac80211: airtime: avoid variable shadowing</title>
<updated>2022-02-04T15:25:55Z</updated>
<author>
<name>Johannes Berg</name>
</author>
<published>2022-02-02T08:49:43Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ae962e5f630fe453b3f93a042f6fbce7ad3e6179'/>
<id>urn:sha1:ae962e5f630fe453b3f93a042f6fbce7ad3e6179</id>
<content type='text'>
This isn't very dangerous, since the outer 'rate' variable
isn't even a pointer, but it's still confusing, so use a
different variable inside.

Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
Signed-off-by: Luca Coelho &lt;luciano.coelho@intel.com&gt;
Link: https://lore.kernel.org/r/iwlwifi.20220202104617.8e9b2bfaa0f5.I41c53f754eef28206d04dafc7263ccb99b63d490@changeid
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
</content>
</entry>
<entry>
<title>mac80211: add AQL support for VHT160 tx rates</title>
<updated>2020-09-18T09:36:03Z</updated>
<author>
<name>Felix Fietkau</name>
</author>
<published>2020-09-15T08:59:45Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8e280369b9076dc08ce13c802c1687b81b4cccd4'/>
<id>urn:sha1:8e280369b9076dc08ce13c802c1687b81b4cccd4</id>
<content type='text'>
When converting from struct ieee80211_tx_rate to ieee80211_rx_status,
there was one check missing to fill in the bandwidth for 160 MHz

Signed-off-by: Felix Fietkau &lt;nbd@nbd.name&gt;
Acked-by: Toke Høiland-Jørgensen &lt;toke@redhat.com&gt;
Link: https://lore.kernel.org/r/20200915085945.3782-2-nbd@nbd.name
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
</content>
</entry>
</feed>
