0074-wifi-ath11k-MBSSID-parameter-configuration-in-AP-mod.patch 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. From c82dc33f252fd8883be66f2d0230af0fd734c683 Mon Sep 17 00:00:00 2001
  2. From: Aloka Dixit <quic_alokad@quicinc.com>
  3. Date: Fri, 5 May 2023 16:11:27 +0300
  4. Subject: [PATCH 74/77] wifi: ath11k: MBSSID parameter configuration in AP mode
  5. Include MBSSID parameters in WMI vdev up operation.
  6. Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.7.0.1-01744-QCAHKSWPL_SILICONZ-1
  7. Signed-off-by: Aloka Dixit <quic_alokad@quicinc.com>
  8. Co-developed-by: John Crispin <john@phrozen.org>
  9. Signed-off-by: John Crispin <john@phrozen.org>
  10. Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
  11. Link: https://lore.kernel.org/r/20230405221648.17950-5-quic_alokad@quicinc.com
  12. ---
  13. drivers/net/wireless/ath/ath11k/mac.c | 29 +++++++++++++++++++++------
  14. drivers/net/wireless/ath/ath11k/wmi.c | 8 +++++++-
  15. drivers/net/wireless/ath/ath11k/wmi.h | 3 ++-
  16. 3 files changed, 32 insertions(+), 8 deletions(-)
  17. --- a/drivers/net/wireless/ath/ath11k/mac.c
  18. +++ b/drivers/net/wireless/ath/ath11k/mac.c
  19. @@ -964,7 +964,7 @@ static int ath11k_mac_monitor_vdev_start
  20. return ret;
  21. }
  22. - ret = ath11k_wmi_vdev_up(ar, vdev_id, 0, ar->mac_addr);
  23. + ret = ath11k_wmi_vdev_up(ar, vdev_id, 0, ar->mac_addr, NULL, 0, 0);
  24. if (ret) {
  25. ath11k_warn(ar->ab, "failed to put up monitor vdev %i: %d\n",
  26. vdev_id, ret);
  27. @@ -1423,6 +1423,7 @@ static void ath11k_control_beaconing(str
  28. struct ieee80211_bss_conf *info)
  29. {
  30. struct ath11k *ar = arvif->ar;
  31. + struct ath11k_vif *tx_arvif = NULL;
  32. int ret = 0;
  33. lockdep_assert_held(&arvif->ar->conf_mutex);
  34. @@ -1451,8 +1452,14 @@ static void ath11k_control_beaconing(str
  35. ether_addr_copy(arvif->bssid, info->bssid);
  36. + if (arvif->vif->mbssid_tx_vif)
  37. + tx_arvif = (struct ath11k_vif *)arvif->vif->mbssid_tx_vif->drv_priv;
  38. +
  39. ret = ath11k_wmi_vdev_up(arvif->ar, arvif->vdev_id, arvif->aid,
  40. - arvif->bssid);
  41. + arvif->bssid,
  42. + tx_arvif ? tx_arvif->bssid : NULL,
  43. + info->bssid_index,
  44. + 1 << info->bssid_indicator);
  45. if (ret) {
  46. ath11k_warn(ar->ab, "failed to bring up vdev %d: %i\n",
  47. arvif->vdev_id, ret);
  48. @@ -2879,7 +2886,8 @@ static void ath11k_bss_assoc(struct ieee
  49. arvif->aid = vif->cfg.aid;
  50. ether_addr_copy(arvif->bssid, bss_conf->bssid);
  51. - ret = ath11k_wmi_vdev_up(ar, arvif->vdev_id, arvif->aid, arvif->bssid);
  52. + ret = ath11k_wmi_vdev_up(ar, arvif->vdev_id, arvif->aid, arvif->bssid,
  53. + NULL, 0, 0);
  54. if (ret) {
  55. ath11k_warn(ar->ab, "failed to set vdev %d up: %d\n",
  56. arvif->vdev_id, ret);
  57. @@ -7133,7 +7141,8 @@ ath11k_mac_update_vif_chan(struct ath11k
  58. int n_vifs)
  59. {
  60. struct ath11k_base *ab = ar->ab;
  61. - struct ath11k_vif *arvif;
  62. + struct ath11k_vif *arvif, *tx_arvif = NULL;
  63. + struct ieee80211_vif *mbssid_tx_vif;
  64. int ret;
  65. int i;
  66. bool monitor_vif = false;
  67. @@ -7187,8 +7196,15 @@ ath11k_mac_update_vif_chan(struct ath11k
  68. ath11k_warn(ab, "failed to update bcn tmpl during csa: %d\n",
  69. ret);
  70. + mbssid_tx_vif = arvif->vif->mbssid_tx_vif;
  71. + if (mbssid_tx_vif)
  72. + tx_arvif = (struct ath11k_vif *)mbssid_tx_vif->drv_priv;
  73. +
  74. ret = ath11k_wmi_vdev_up(arvif->ar, arvif->vdev_id, arvif->aid,
  75. - arvif->bssid);
  76. + arvif->bssid,
  77. + tx_arvif ? tx_arvif->bssid : NULL,
  78. + arvif->vif->bss_conf.bssid_index,
  79. + 1 << arvif->vif->bss_conf.bssid_indicator);
  80. if (ret) {
  81. ath11k_warn(ab, "failed to bring vdev up %d: %d\n",
  82. arvif->vdev_id, ret);
  83. @@ -7306,7 +7322,8 @@ static int ath11k_start_vdev_delay(struc
  84. }
  85. if (arvif->vdev_type == WMI_VDEV_TYPE_MONITOR) {
  86. - ret = ath11k_wmi_vdev_up(ar, arvif->vdev_id, 0, ar->mac_addr);
  87. + ret = ath11k_wmi_vdev_up(ar, arvif->vdev_id, 0, ar->mac_addr,
  88. + NULL, 0, 0);
  89. if (ret) {
  90. ath11k_warn(ab, "failed put monitor up: %d\n", ret);
  91. return ret;
  92. --- a/drivers/net/wireless/ath/ath11k/wmi.c
  93. +++ b/drivers/net/wireless/ath/ath11k/wmi.c
  94. @@ -1001,7 +1001,8 @@ int ath11k_wmi_vdev_start(struct ath11k
  95. return ret;
  96. }
  97. -int ath11k_wmi_vdev_up(struct ath11k *ar, u32 vdev_id, u32 aid, const u8 *bssid)
  98. +int ath11k_wmi_vdev_up(struct ath11k *ar, u32 vdev_id, u32 aid, const u8 *bssid,
  99. + u8 *tx_bssid, u32 nontx_profile_idx, u32 nontx_profile_cnt)
  100. {
  101. struct ath11k_pdev_wmi *wmi = ar->wmi;
  102. struct wmi_vdev_up_cmd *cmd;
  103. @@ -1025,6 +1026,11 @@ int ath11k_wmi_vdev_up(struct ath11k *ar
  104. ether_addr_copy(cmd->vdev_bssid.addr, bssid);
  105. + cmd->nontx_profile_idx = nontx_profile_idx;
  106. + cmd->nontx_profile_cnt = nontx_profile_cnt;
  107. + if (tx_bssid)
  108. + ether_addr_copy(cmd->tx_vdev_bssid.addr, tx_bssid);
  109. +
  110. if (arvif && arvif->vif->type == NL80211_IFTYPE_STATION) {
  111. bss_conf = &arvif->vif->bss_conf;
  112. --- a/drivers/net/wireless/ath/ath11k/wmi.h
  113. +++ b/drivers/net/wireless/ath/ath11k/wmi.h
  114. @@ -6301,7 +6301,8 @@ int ath11k_wmi_bcn_tmpl(struct ath11k *a
  115. struct sk_buff *bcn);
  116. int ath11k_wmi_vdev_down(struct ath11k *ar, u8 vdev_id);
  117. int ath11k_wmi_vdev_up(struct ath11k *ar, u32 vdev_id, u32 aid,
  118. - const u8 *bssid);
  119. + const u8 *bssid, u8 *tx_bssid, u32 nontx_profile_idx,
  120. + u32 nontx_profile_cnt);
  121. int ath11k_wmi_vdev_stop(struct ath11k *ar, u8 vdev_id);
  122. int ath11k_wmi_vdev_start(struct ath11k *ar, struct wmi_vdev_start_req_arg *arg,
  123. bool restart);