From 92af7ea7b3e5a633f2e7281fc9fed42a0f67b59a Mon Sep 17 00:00:00 2001 From: Balaji Pothunoori Date: Thu, 8 Dec 2022 19:59:27 +0530 Subject: [PATCH] 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 Change-Id: I5955ba524d3e77fb49d7acf4098fd0c564e138b0 CRs-Fixed: 3356605 --- core/hdd/src/wlan_hdd_ioctl.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/core/hdd/src/wlan_hdd_ioctl.c b/core/hdd/src/wlan_hdd_ioctl.c index f593f3ae84..2927a9771a 100644 --- a/core/hdd/src/wlan_hdd_ioctl.c +++ b/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;