diff --git a/core/hdd/inc/qc_sap_ioctl.h b/core/hdd/inc/qc_sap_ioctl.h index 0fd97013ba48..c29d49a80900 100644 --- a/core/hdd/inc/qc_sap_ioctl.h +++ b/core/hdd/inc/qc_sap_ioctl.h @@ -258,6 +258,7 @@ enum { QCASAP_SET_11AX_RATE, QCASAP_SET_PEER_RATE, QCASAP_PARAM_DCM, + QCASAP_PARAM_RANGE_EXT, }; int iw_get_channel_list(struct net_device *dev, diff --git a/core/hdd/src/wlan_hdd_hostapd.c b/core/hdd/src/wlan_hdd_hostapd.c index 1850419efa45..48d6c4338438 100644 --- a/core/hdd/src/wlan_hdd_hostapd.c +++ b/core/hdd/src/wlan_hdd_hostapd.c @@ -3321,6 +3321,12 @@ static __iw_softap_setparam(struct net_device *dev, WMI_VDEV_PARAM_HE_DCM, set_value, VDEV_CMD); break; + case QCASAP_PARAM_RANGE_EXT: + hdd_notice("Set WMI_VDEV_PARAM_HE_RANGE_EXT: %d", set_value); + ret = wma_cli_set_command(pHostapdAdapter->sessionId, + WMI_VDEV_PARAM_HE_RANGE_EXT, + set_value, VDEV_CMD); + break; default: hdd_err("Invalid setparam command %d value %d", sub_cmd, set_value); @@ -3634,6 +3640,13 @@ static __iw_softap_getparam(struct net_device *dev, VDEV_CMD); break; } + case QCASAP_PARAM_RANGE_EXT: + { + *value = wma_cli_get_command(pHostapdAdapter->sessionId, + WMI_VDEV_PARAM_HE_RANGE_EXT, + VDEV_CMD); + break; + } default: hdd_err("Invalid getparam command %d", sub_cmd); ret = -EINVAL; @@ -5806,6 +5819,12 @@ static const struct iw_priv_args hostapd_private_args[] = { 0, "enable_dcm" } , + { + QCASAP_PARAM_RANGE_EXT, + IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, + 0, "enable_range_ext" + } + , }; static const iw_handler hostapd_private[] = { diff --git a/core/hdd/src/wlan_hdd_wext.c b/core/hdd/src/wlan_hdd_wext.c index 808440cb79f4..a51f6d6951ef 100644 --- a/core/hdd/src/wlan_hdd_wext.c +++ b/core/hdd/src/wlan_hdd_wext.c @@ -1051,6 +1051,25 @@ static const hdd_freq_chan_map_t freq_chan_map[] = { */ #define WE_SET_DCM 92 +/* + * + * enable_range_ext - enable Range extension + * + * @INPUT: 0/1 + * + * @OUTPUT: None + * + * This IOCTL enables/disables Range extension. + * + * @E.g: iwpriv wlan0 enable_range_ext <0/1> + * + * Supported Feature: STA/SAP + * + * Usage: Internal + * + * + */ +#define WE_SET_RANGE_EXT 93 /* Private ioctls and their sub-ioctls */ #define WLAN_PRIV_SET_NONE_GET_INT (SIOCIWFIRSTPRIV + 1) @@ -1732,6 +1751,25 @@ static const hdd_freq_chan_map_t freq_chan_map[] = { */ #define WE_GET_DCM 60 +/* + * + * get_dcm - Get range extension enablement value + * + * @INPUT: None + * + * @OUTPUT: 0/1 + * wlan0 get_range_ext + * + * This IOCTL is used get range_extension value + * + * Supported Feature: STA/SAP + * + * Usage: Internal + * + * + */ +#define WE_GET_RANGE_EXT 61 + /* Private ioctls and their sub-ioctls */ #define WLAN_PRIV_SET_INT_GET_INT (SIOCIWFIRSTPRIV + 2) @@ -8619,6 +8657,12 @@ static int __iw_setint_getnone(struct net_device *dev, WMI_VDEV_PARAM_HE_DCM, set_value, VDEV_CMD); break; + case WE_SET_RANGE_EXT: + hdd_notice("Set WMI_VDEV_PARAM_HE_RANGE_EXT: %d", set_value); + ret = wma_cli_set_command(pAdapter->sessionId, + WMI_VDEV_PARAM_HE_RANGE_EXT, + set_value, VDEV_CMD); + break; default: { hdd_err("Invalid sub command %d", @@ -9334,6 +9378,12 @@ static int __iw_setnone_getint(struct net_device *dev, WMI_VDEV_PARAM_HE_DCM, VDEV_CMD); break; + case WE_GET_RANGE_EXT: + hdd_notice("GET WMI_VDEV_PARAM_HE_RANGE_EXT"); + *value = wma_cli_get_command(pAdapter->sessionId, + WMI_VDEV_PARAM_HE_RANGE_EXT, + VDEV_CMD); + break; default: { hdd_err("Invalid IOCTL get_value command %d", @@ -13214,6 +13264,10 @@ static const struct iw_priv_args we_private_args[] = { 0, IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, "get_dcm"}, + {WE_GET_RANGE_EXT, + 0, + IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, + "get_range_ext"}, /* handlers for main ioctl */ {WLAN_PRIV_SET_CHAR_GET_NONE, IW_PRIV_TYPE_CHAR | 512, @@ -13655,6 +13709,11 @@ static const struct iw_priv_args we_private_args[] = { 0, "enable_dcm"} , + {WE_SET_RANGE_EXT, + IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, + 0, + "enable_range_ext"} + , }; const struct iw_handler_def we_handler_def = { diff --git a/core/wma/inc/wma.h b/core/wma/inc/wma.h index 5e472963c1c7..f08df5bf8568 100644 --- a/core/wma/inc/wma.h +++ b/core/wma/inc/wma.h @@ -828,6 +828,7 @@ typedef struct { * @qpower_params: qpower parameters * @gtx_info: GTX offload info * @dcm: DCM enable/disable + * @range_ext: HE range extension enable/disable * * This structure stores vdev parameters. * Some of these parameters are set in fw and some @@ -856,6 +857,7 @@ typedef struct { gtx_config_t gtx_info; #ifdef WLAN_FEATURE_11AX uint8_t dcm; + uint8_t range_ext; #endif } vdev_cli_config_t; diff --git a/core/wma/src/wma_he.c b/core/wma/src/wma_he.c index eaf6905db335..8181593ed704 100644 --- a/core/wma/src/wma_he.c +++ b/core/wma/src/wma_he.c @@ -1129,6 +1129,9 @@ void wma_set_he_vdev_param(struct wma_txrx_node *intr, WMI_VDEV_PARAM param_id, case WMI_VDEV_PARAM_HE_DCM: intr->config.dcm = value; break; + case WMI_VDEV_PARAM_HE_RANGE_EXT: + intr->config.range_ext = value; + break; default: WMA_LOGE(FL("Unhandled HE vdev param: %0x"), param_id); break; @@ -1141,6 +1144,8 @@ uint32_t wma_get_he_vdev_param(struct wma_txrx_node *intr, switch (param_id) { case WMI_VDEV_PARAM_HE_DCM: return intr->config.dcm; + case WMI_VDEV_PARAM_HE_RANGE_EXT: + return intr->config.range_ext; default: WMA_LOGE(FL("Unhandled HE vdev param: %0x"), param_id); break; diff --git a/core/wma/src/wma_main.c b/core/wma/src/wma_main.c index 116e84ddff60..9f549f1102d4 100644 --- a/core/wma/src/wma_main.c +++ b/core/wma/src/wma_main.c @@ -377,6 +377,7 @@ int wma_cli_get_command(int vdev_id, int param_id, int vpdev) ret = intr[vdev_id].config.tx_rate; break; case WMI_VDEV_PARAM_HE_DCM: + case WMI_VDEV_PARAM_HE_RANGE_EXT: ret = wma_get_he_vdev_param(&intr[vdev_id], param_id); break; default: @@ -1411,6 +1412,7 @@ static void wma_process_cli_set_cmd(tp_wma_handle wma, intr[vid].config.erx_dri_sample = privcmd->param_value; break; case WMI_VDEV_PARAM_HE_DCM: + case WMI_VDEV_PARAM_HE_RANGE_EXT: wma_set_he_vdev_param(&intr[vid], privcmd->param_id, privcmd->param_value); break;