Procházet zdrojové kódy

qcacld-3.0: Fix STA at 20 MHz while AP in 320 MHz

Wrong chan width type is used for WLAN_MLME_PEER_BW_PUNCTURE.
Need convert wmi_host_channel_width to phy_ch_width type.

Change-Id: I9e5d4606715a99062229af36240d03580ad54891
CRs-Fixed: 3526099
Jianmin Zhu před 1 rokem
rodič
revize
4b104f3350
1 změnil soubory, kde provedl 8 přidání a 3 odebrání
  1. 8 3
      core/wma/src/wma_dev_if.c

+ 8 - 3
core/wma/src/wma_dev_if.c

@@ -113,6 +113,7 @@
 #include "target_if_vdev_mgr_tx_ops.h"
 #include "wlan_fwol_ucfg_api.h"
 #include "wlan_vdev_mgr_utils_api.h"
+#include "target_if.h"
 
 /*
  * FW only supports 8 clients in SAP/GO mode for D3 WoW feature
@@ -1001,6 +1002,7 @@ static void wma_peer_send_phymode(struct wlan_objmgr_vdev *vdev,
 	uint16_t puncture_bitmap = 0;
 	uint16_t new_puncture_bitmap = 0;
 	uint32_t bw_puncture = 0;
+	enum phy_ch_width new_bw;
 
 	if (wlan_peer_get_peer_type(peer) == WLAN_PEER_SELF)
 		return;
@@ -1045,14 +1047,17 @@ static void wma_peer_send_phymode(struct wlan_objmgr_vdev *vdev,
 	max_ch_width_supported =
 		wmi_get_ch_width_from_phy_mode(wma->wmi_handle,
 					       fw_phymode);
+	new_bw =
+	target_if_wmi_chan_width_to_phy_ch_width(max_ch_width_supported);
+
 	if (is_eht) {
 		wlan_reg_extract_puncture_by_bw(vdev_chan->ch_width,
 						puncture_bitmap,
 						vdev_chan->ch_freq,
 						vdev_chan->ch_freq_seg2,
-						max_ch_width_supported,
+						new_bw,
 						&new_puncture_bitmap);
-		QDF_SET_BITS(bw_puncture, 0, 8, max_ch_width_supported);
+		QDF_SET_BITS(bw_puncture, 0, 8, new_bw);
 		QDF_SET_BITS(bw_puncture, 8, 16, new_puncture_bitmap);
 		wlan_util_vdev_peer_set_param_send(vdev, peer_mac_addr,
 						   WLAN_MLME_PEER_BW_PUNCTURE,
@@ -1061,7 +1066,7 @@ static void wma_peer_send_phymode(struct wlan_objmgr_vdev *vdev,
 		wma_set_peer_param(wma, peer_mac_addr, WMI_HOST_PEER_CHWIDTH,
 				   max_ch_width_supported, vdev_id);
 	}
-	wma_debug("FW phymode %d old phymode %d new phymode %d bw %d punct: %d macaddr " QDF_MAC_ADDR_FMT,
+	wma_debug("FW phymode %d old phymode %d new phymode %d bw %d punct: 0x%x macaddr " QDF_MAC_ADDR_FMT,
 		  fw_phymode, old_peer_phymode, new_phymode,
 		  max_ch_width_supported, new_puncture_bitmap,
 		  QDF_MAC_ADDR_REF(peer_mac_addr));