1. 23 Apr, 2022 9 commits
  2. 13 Apr, 2022 4 commits
  3. 12 Apr, 2022 22 commits
  4. 11 Apr, 2022 5 commits
    • Sriram R's avatar
      mac80211: prepare sta handling for MLO support · 046d2e7c
      Sriram R authored
      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: default avatarSriram 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: default avatarJohannes Berg <johannes.berg@intel.com>
      046d2e7c
    • Peter Seiderer's avatar
      mac80211: minstrel_ht: fix where rate stats are stored (fixes debugfs output) · 5c6dd7bd
      Peter Seiderer authored
      Using an ath9k card the debugfs output of minstrel_ht looks like the following
      (note the zero values for the first four rates sum-of success/attempts):
      
                   best    ____________rate__________    ____statistics___    _____last____    ______sum-of________
      mode guard #  rate   [name   idx airtime  max_tp]  [avg(tp) avg(prob)]  [retry|suc|att]  [#success | #attempts]
      OFDM       1    DP     6.0M  272    1640     5.2       3.1      53.8       3     0 0             0   0
      OFDM       1   C       9.0M  273    1104     7.7       4.6      53.8       4     0 0             0   0
      OFDM       1  B       12.0M  274     836    10.0       6.0      53.8       4     0 0             0   0
      OFDM       1 A    S   18.0M  275     568    14.3       8.5      53.8       5     0 0             0   0
      OFDM       1      S   24.0M  276     436    18.1       0.0       0.0       5     0 1            80   1778
      OFDM       1          36.0M  277     300    24.9       0.0       0.0       0     0 1             0   107
      OFDM       1      S   48.0M  278     236    30.4       0.0       0.0       0     0 0             0   75
      OFDM       1          54.0M  279     212    33.0       0.0       0.0       0     0 0             0   72
      
      Total packet count::    ideal 16582      lookaround 885
      Average # of aggregated frames per A-MPDU: 1.0
      
      Debugging showed that the rate statistics for the first four rates where
      stored in the MINSTREL_CCK_GROUP instead of the MINSTREL_OFDM_GROUP because
      in minstrel_ht_get_stats() the supported check was not honoured as done in
      various other places, e.g net/mac80211/rc80211_minstrel_ht_debugfs.c:
      
       74                 if (!(mi->supported[i] & BIT(j)))
       75                         continue;
      
      With the patch applied the output looks good:
      
                    best    ____________rate__________    ____statistics___    _____last____    ______sum-of________
      mode guard #  rate   [name   idx airtime  max_tp]  [avg(tp) avg(prob)]  [retry|suc|att]  [#success | #attempts]
      OFDM       1    D      6.0M  272    1640     5.2       5.2     100.0       3     0 0             1   1
      OFDM       1   C       9.0M  273    1104     7.7       7.7     100.0       4     0 0            38   38
      OFDM       1  B       12.0M  274     836    10.0       9.9      89.5       4     2 2           372   395
      OFDM       1 A   P    18.0M  275     568    14.3      14.3      97.2       5    52 53         6956   7181
      OFDM       1      S   24.0M  276     436    18.1       0.0       0.0       0     0 1             6   163
      OFDM       1          36.0M  277     300    24.9       0.0       0.0       0     0 1             0   35
      OFDM       1      S   48.0M  278     236    30.4       0.0       0.0       0     0 0             0   38
      OFDM       1      S   54.0M  279     212    33.0       0.0       0.0       0     0 0             0   38
      
      Total packet count::    ideal 7097      lookaround 287
      Average # of aggregated frames per A-MPDU: 1.0
      Signed-off-by: default avatarPeter Seiderer <ps.report@gmx.net>
      Link: https://lore.kernel.org/r/20220404165414.1036-1-ps.report@gmx.netSigned-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      5c6dd7bd
    • Johannes Berg's avatar
      nl80211: show SSID for P2P_GO interfaces · a75971bc
      Johannes Berg authored
      There's no real reason not to send the SSID to userspace
      when it requests information about P2P_GO, it is, in that
      respect, exactly the same as AP interfaces. Fix that.
      
      Fixes: 44905265 ("nl80211: don't expose wdev->ssid for most interfaces")
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      Link: https://lore.kernel.org/r/20220318134656.14354ae223f0.Ia25e85a512281b92e1645d4160766a4b1a471597@changeidSigned-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      a75971bc
    • Lorenzo Bianconi's avatar
      mac80211: introduce BSS color collision detection · 6d945a33
      Lorenzo Bianconi authored
      Add ieee80211_rx_check_bss_color_collision routine in order to introduce
      BSS color collision detection in mac80211 if it is not supported in HW/FW
      (e.g. for mt7915 chipset).
      Add IEEE80211_HW_DETECTS_COLOR_COLLISION flag to let the driver notify
      BSS color collision detection is supported in HW/FW. Set this for ath11k
      which apparently didn't need this code.
      Tested-by: default avatarPeter Chiu <Chui-Hao.Chiu@mediatek.com>
      Co-developed-by: default avatarRyder Lee <ryder.lee@mediatek.com>
      Signed-off-by: default avatarRyder Lee <ryder.lee@mediatek.com>
      Signed-off-by: default avatarLorenzo Bianconi <lorenzo@kernel.org>
      Link: https://lore.kernel.org/r/a05eeeb1841a84560dc5aaec77894fcb69a54f27.1648204871.git.lorenzo@kernel.org
      [clarify commit message a bit, move flag to mac80211]
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      6d945a33
    • Toke Høiland-Jørgensen's avatar
      mac80211: Improve confusing comment around tx_info clearing · e5c95ca0
      Toke Høiland-Jørgensen authored
      The comment above the ieee80211_tx_info_clear_status() helper was somewhat
      confusing as to which fields it was or wasn't clearing. So replace it by
      something that is hopefully more, well, clear.
      Signed-off-by: default avatarToke Høiland-Jørgensen <toke@toke.dk>
      Link: https://lore.kernel.org/r/20220404210108.2684907-1-toke@toke.dkSigned-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      e5c95ca0