Browse Source

qcacmn: Fix puncture bitmap validation on 5 GHz band

Fix puncture bitmap validation on on 5 GHz band by
deriving the band bitmap based on primary frequency.

Change-Id: Ic1d482716a905812e08d21dbbfb2472f83b95491
CRs-Fixed: 3396325
Venkateswara Swamy Bandaru 2 years ago
parent
commit
db310c83ec
1 changed files with 4 additions and 1 deletions
  1. 4 1
      umac/scan/core/src/wlan_scan_filter.c

+ 4 - 1
umac/scan/core/src/wlan_scan_filter.c

@@ -785,7 +785,7 @@ static bool util_eht_puncture_valid(struct wlan_objmgr_pdev *pdev,
 	uint16_t new_puncture_bitmap = 0;
 	QDF_STATUS status;
 	uint32_t cfreq1;
-	uint8_t band_mask = BIT(REG_BAND_6G);
+	uint8_t band_mask;
 
 	eht_ops = (struct wlan_ie_ehtops *)util_scan_entry_ehtop(db_entry);
 	if (!eht_ops)
@@ -811,6 +811,9 @@ static bool util_eht_puncture_valid(struct wlan_objmgr_pdev *pdev,
 	orig_width = QDF_GET_BITS(eht_ops->control,
 				  EHTOP_INFO_CHAN_WIDTH_IDX,
 				  EHTOP_INFO_CHAN_WIDTH_BITS);
+
+	band_mask = BIT(wlan_reg_freq_to_band(db_entry->channel.chan_freq));
+
 	/* Check if CCFS bits are present */
 	if (QDF_GET_BITS(eht_ops->ehtop_param,
 			 EHTOP_INFO_PRESENT_IDX, EHTOP_INFO_PRESENT_BITS))