Browse Source

qcacld-3.0: Set 160 MHz chan width for 6 GHz band channel

Currently 160 MHz chan width set for 6 GHz band channel is not
allowing.
This change is to set 160 MHz chan width if 6 GHz band channel support.

Example cmd: hostapd_cli DRIVER CHANNEL_SWITCH <Channel> <BW>

Change-Id: I5955ba524d3e77fb49d7acf4098fd0c564e138b0
CRs-Fixed: 3356605
Balaji Pothunoori 2 years ago
parent
commit
92af7ea7b3
1 changed files with 6 additions and 3 deletions
  1. 6 3
      core/hdd/src/wlan_hdd_ioctl.c

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

@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 2012-2021 The Linux Foundation. All rights reserved.
- * Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved.
  *
  * Permission to use, copy, modify, and/or distribute this software for
  * any purpose with or without fee is hereby granted, provided that the
@@ -6163,12 +6163,15 @@ static int drv_cmd_set_channel_switch(struct hdd_adapter *adapter,
 		return status;
 	}
 
-	if ((chan_bw != 20) && (chan_bw != 40) && (chan_bw != 80)) {
+	if ((chan_bw != 20) && (chan_bw != 40) && (chan_bw != 80) &&
+	    (chan_bw != 160)) {
 		hdd_err("BW %d is not allowed for CHANNEL_SWITCH", chan_bw);
 		return -EINVAL;
 	}
 
-	if (chan_bw == 80)
+	if (chan_bw == 160)
+		width = CH_WIDTH_160MHZ;
+	else if (chan_bw == 80)
 		width = CH_WIDTH_80MHZ;
 	else if (chan_bw == 40)
 		width = CH_WIDTH_40MHZ;