345-v6.4-wifi-mac80211-add-EHT-MU-MIMO-related-flags-in-ieee8.patch 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. From f4d1181e4759c9c6c97c86cda2cf2d1ddb6a74d2 Mon Sep 17 00:00:00 2001
  2. From: Ryder Lee <ryder.lee@mediatek.com>
  3. Date: Sat, 18 Feb 2023 01:48:59 +0800
  4. Subject: [PATCH] wifi: mac80211: add EHT MU-MIMO related flags in
  5. ieee80211_bss_conf
  6. Similar to VHT/HE. This is utilized to pass MU-MIMO configurations
  7. from user space (i.e. hostapd) to driver.
  8. Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
  9. Link: https://lore.kernel.org/r/8d9966c4c1e77cb1ade77d42bdc49905609192e9.1676628065.git.ryder.lee@mediatek.com
  10. [move into combined if statement, reset on !eht]
  11. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
  12. ---
  13. include/net/mac80211.h | 9 +++++++++
  14. net/mac80211/cfg.c | 16 ++++++++++++++++
  15. 2 files changed, 25 insertions(+)
  16. --- a/include/net/mac80211.h
  17. +++ b/include/net/mac80211.h
  18. @@ -676,6 +676,12 @@ struct ieee80211_fils_discovery {
  19. * @he_full_ul_mumimo: does this BSS support the reception (AP) or transmission
  20. * (non-AP STA) of an HE TB PPDU on an RU that spans the entire PPDU
  21. * bandwidth
  22. + * @eht_su_beamformer: in AP-mode, does this BSS enable operation as an EHT SU
  23. + * beamformer
  24. + * @eht_su_beamformee: in AP-mode, does this BSS enable operation as an EHT SU
  25. + * beamformee
  26. + * @eht_mu_beamformer: in AP-mode, does this BSS enable operation as an EHT MU
  27. + * beamformer
  28. */
  29. struct ieee80211_bss_conf {
  30. const u8 *bssid;
  31. @@ -764,6 +770,9 @@ struct ieee80211_bss_conf {
  32. bool he_su_beamformee;
  33. bool he_mu_beamformer;
  34. bool he_full_ul_mumimo;
  35. + bool eht_su_beamformer;
  36. + bool eht_su_beamformee;
  37. + bool eht_mu_beamformer;
  38. };
  39. /**
  40. --- a/net/mac80211/cfg.c
  41. +++ b/net/mac80211/cfg.c
  42. @@ -1310,6 +1310,22 @@ static int ieee80211_start_ap(struct wip
  43. if (params->eht_cap) {
  44. link_conf->eht_puncturing = params->punct_bitmap;
  45. changed |= BSS_CHANGED_EHT_PUNCTURING;
  46. +
  47. + link_conf->eht_su_beamformer =
  48. + params->eht_cap->fixed.phy_cap_info[0] &
  49. + IEEE80211_EHT_PHY_CAP0_SU_BEAMFORMER;
  50. + link_conf->eht_su_beamformee =
  51. + params->eht_cap->fixed.phy_cap_info[0] &
  52. + IEEE80211_EHT_PHY_CAP0_SU_BEAMFORMEE;
  53. + link_conf->eht_mu_beamformer =
  54. + params->eht_cap->fixed.phy_cap_info[7] &
  55. + (IEEE80211_EHT_PHY_CAP7_MU_BEAMFORMER_80MHZ |
  56. + IEEE80211_EHT_PHY_CAP7_MU_BEAMFORMER_160MHZ |
  57. + IEEE80211_EHT_PHY_CAP7_MU_BEAMFORMER_320MHZ);
  58. + } else {
  59. + link_conf->eht_su_beamformer = false;
  60. + link_conf->eht_su_beamformee = false;
  61. + link_conf->eht_mu_beamformer = false;
  62. }
  63. if (sdata->vif.type == NL80211_IFTYPE_AP &&