Ver Fonte

qcacld-3.0: Update SET_FCC_CHANNEL command

If driver receives the command with parameter -1, the driver is enabling
all bands. Add check to see if the device supports 6G first, otherwise
don't change the band settings.

Change-Id: I2e0980015d8e8bad10fbdcd6f397ac1ca383a5bb
CRs-fixed: 3038801
Lincoln Tran há 3 anos atrás
pai
commit
af893f201c
1 ficheiros alterados com 5 adições e 3 exclusões
  1. 5 3
      core/hdd/src/wlan_hdd_ioctl.c

+ 5 - 3
core/hdd/src/wlan_hdd_ioctl.c

@@ -5987,10 +5987,12 @@ static int drv_cmd_set_fcc_channel(struct hdd_adapter *adapter,
 	}
 
 	if (!rf_test_mode) {
-		if (fcc_constraint)
+		if (fcc_constraint) {
 			band_bitmap |= (BIT(REG_BAND_5G) | BIT(REG_BAND_2G));
-		else
-			band_bitmap = REG_BAND_MASK_ALL;
+		} else {
+			if (wlan_reg_is_6ghz_supported(hdd_ctx->psoc))
+				band_bitmap = REG_BAND_MASK_ALL;
+		}
 		if (hdd_reg_set_band(adapter->dev, band_bitmap))
 			status_6G = QDF_STATUS_E_FAILURE;
 	}