mirror of
https://github.com/Divested-Mobile/DivestOS-Build.git
synced 2024-12-20 13:24:30 -05:00
477 lines
22 KiB
Diff
477 lines
22 KiB
Diff
From 2d8b76ef0d269dd2939050c4eae4838803730c42 Mon Sep 17 00:00:00 2001
|
|
From: SaidiReddy Yenuga <c_saidir@qti.qualcomm.com>
|
|
Date: Thu, 26 May 2016 15:24:26 +0530
|
|
Subject: [PATCH] qcacld-2.0: Remove the support for setwpaie ioctl
|
|
|
|
This ioctl gets call during the start of SAP/hostapd with wext
|
|
interface and which is obsolete, currently using nl80211 interface
|
|
for the same
|
|
|
|
Remove the code related to setwpaie ioctl
|
|
|
|
Bug: 29915601
|
|
CRs-Fixed: 1000913
|
|
Change-Id: Ia45860d7143639aa62d02afe8c08e283e20ba27a
|
|
---
|
|
.../staging/qcacld-2.0/CORE/HDD/inc/qc_sap_ioctl.h | 2 +-
|
|
.../qcacld-2.0/CORE/HDD/src/wlan_hdd_hostapd.c | 419 ---------------------
|
|
2 files changed, 1 insertion(+), 420 deletions(-)
|
|
|
|
diff --git a/drivers/staging/qcacld-2.0/CORE/HDD/inc/qc_sap_ioctl.h b/drivers/staging/qcacld-2.0/CORE/HDD/inc/qc_sap_ioctl.h
|
|
index 256c14d8e2a49..010be1cb7fb7a 100644
|
|
--- a/drivers/staging/qcacld-2.0/CORE/HDD/inc/qc_sap_ioctl.h
|
|
+++ b/drivers/staging/qcacld-2.0/CORE/HDD/inc/qc_sap_ioctl.h
|
|
@@ -143,7 +143,7 @@ typedef struct
|
|
#define QCSAP_IOCTL_SET_NONE_GET_THREE (SIOCIWFIRSTPRIV+3)
|
|
#define WE_GET_TSF 1
|
|
#define QCSAP_IOCTL_GET_STAWPAIE (SIOCIWFIRSTPRIV+4)
|
|
-#define QCSAP_IOCTL_SETWPAIE (SIOCIWFIRSTPRIV+5)
|
|
+
|
|
#define QCSAP_IOCTL_STOPBSS (SIOCIWFIRSTPRIV+6)
|
|
#define QCSAP_IOCTL_VERSION (SIOCIWFIRSTPRIV+7)
|
|
#define QCSAP_IOCTL_GET_WPS_PBC_PROBE_REQ_IES (SIOCIWFIRSTPRIV+8)
|
|
diff --git a/drivers/staging/qcacld-2.0/CORE/HDD/src/wlan_hdd_hostapd.c b/drivers/staging/qcacld-2.0/CORE/HDD/src/wlan_hdd_hostapd.c
|
|
index 354d69cc522c9..024b3135ee74f 100644
|
|
--- a/drivers/staging/qcacld-2.0/CORE/HDD/src/wlan_hdd_hostapd.c
|
|
+++ b/drivers/staging/qcacld-2.0/CORE/HDD/src/wlan_hdd_hostapd.c
|
|
@@ -5241,422 +5241,6 @@ static int iw_get_mode(struct net_device *dev,
|
|
}
|
|
|
|
|
|
-static int __iw_softap_setwpsie(struct net_device *dev,
|
|
- struct iw_request_info *info,
|
|
- union iwreq_data *wrqu,
|
|
- char *extra)
|
|
-{
|
|
- hdd_adapter_t *pHostapdAdapter = (netdev_priv(dev));
|
|
-#ifndef WLAN_FEATURE_MBSSID
|
|
- v_CONTEXT_t pVosContext;
|
|
-#endif
|
|
- hdd_hostapd_state_t *pHostapdState;
|
|
- eHalStatus halStatus= eHAL_STATUS_SUCCESS;
|
|
- u_int8_t *wps_genie;
|
|
- u_int8_t *fwps_genie;
|
|
- u_int8_t *pos;
|
|
- tpSap_WPSIE pSap_WPSIe;
|
|
- u_int8_t WPSIeType;
|
|
- u_int16_t length;
|
|
- struct iw_point s_priv_data;
|
|
- hdd_context_t *hdd_ctx;
|
|
- int ret;
|
|
-
|
|
- ENTER();
|
|
-
|
|
- if (!capable(CAP_NET_ADMIN)) {
|
|
- VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
|
|
- FL("permission check failed"));
|
|
- return -EPERM;
|
|
- }
|
|
-
|
|
- hdd_ctx = WLAN_HDD_GET_CTX(pHostapdAdapter);
|
|
- ret = wlan_hdd_validate_context(hdd_ctx);
|
|
- if (0 != ret)
|
|
- return ret;
|
|
-
|
|
-#ifndef WLAN_FEATURE_MBSSID
|
|
- pVosContext = hdd_ctx->pvosContext;
|
|
- if (NULL == pVosContext) {
|
|
- VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
|
|
- "%s: VOS context is not valid ", __func__);
|
|
- return -EINVAL;
|
|
- }
|
|
-#endif
|
|
-
|
|
- /* helper function to get iwreq_data with compat handling. */
|
|
- if (hdd_priv_get_data(&s_priv_data, wrqu)) {
|
|
- return -EINVAL;
|
|
- }
|
|
-
|
|
- if ((NULL == s_priv_data.pointer) ||
|
|
- (s_priv_data.length < QCSAP_MAX_WSC_IE)) {
|
|
- return -EINVAL;
|
|
- }
|
|
-
|
|
- wps_genie = mem_alloc_copy_from_user_helper(s_priv_data.pointer,
|
|
- s_priv_data.length);
|
|
-
|
|
- if (NULL == wps_genie) {
|
|
- hddLog(LOG1,
|
|
- "%s: failed to alloc memory and copy data from user buffer",
|
|
- __func__);
|
|
- return -EFAULT;
|
|
- }
|
|
-
|
|
- fwps_genie = wps_genie;
|
|
-
|
|
- pSap_WPSIe = vos_mem_malloc(sizeof(tSap_WPSIE));
|
|
- if (NULL == pSap_WPSIe)
|
|
- {
|
|
- hddLog(LOGE, "VOS unable to allocate memory");
|
|
- kfree(fwps_genie);
|
|
- return -ENOMEM;
|
|
- }
|
|
- vos_mem_zero(pSap_WPSIe, sizeof(tSap_WPSIE));
|
|
-
|
|
- hddLog(LOG1,"%s WPS IE type[0x%X] IE[0x%X], LEN[%d]", __func__, wps_genie[0], wps_genie[1], wps_genie[2]);
|
|
- WPSIeType = wps_genie[0];
|
|
- if ( wps_genie[0] == eQC_WPS_BEACON_IE)
|
|
- {
|
|
- pSap_WPSIe->sapWPSIECode = eSAP_WPS_BEACON_IE;
|
|
- wps_genie = wps_genie + 1;
|
|
- switch ( wps_genie[0] )
|
|
- {
|
|
- case DOT11F_EID_WPA:
|
|
- if (wps_genie[1] < DOT11F_EID_HEADER_LEN ||
|
|
- wps_genie[1] > DOT11F_IE_WPA_MAX_LEN + DOT11F_EID_HEADER_LEN)
|
|
- {
|
|
- ret = -EINVAL;
|
|
- goto exit;
|
|
- }
|
|
- else if (memcmp(&wps_genie[2], "\x00\x50\xf2\x04", 4) == 0)
|
|
- {
|
|
- hddLog (LOG1, "%s Set WPS BEACON IE(len %d)",__func__, wps_genie[1]+2);
|
|
- pos = &wps_genie[6];
|
|
- while (((size_t)pos - (size_t)&wps_genie[6]) < (wps_genie[1] - 4) )
|
|
- {
|
|
- switch((u_int16_t)(*pos<<8) | *(pos+1))
|
|
- {
|
|
- case HDD_WPS_ELEM_VERSION:
|
|
- pos += 4;
|
|
- pSap_WPSIe->sapwpsie.sapWPSBeaconIE.Version = *pos;
|
|
- hddLog(LOG1, "WPS version %d", pSap_WPSIe->sapwpsie.sapWPSBeaconIE.Version);
|
|
- pSap_WPSIe->sapwpsie.sapWPSBeaconIE.FieldPresent |= WPS_BEACON_VER_PRESENT;
|
|
- pos += 1;
|
|
- break;
|
|
-
|
|
- case HDD_WPS_ELEM_WPS_STATE:
|
|
- pos +=4;
|
|
- pSap_WPSIe->sapwpsie.sapWPSBeaconIE.wpsState = *pos;
|
|
- hddLog(LOG1, "WPS State %d", pSap_WPSIe->sapwpsie.sapWPSBeaconIE.wpsState);
|
|
- pSap_WPSIe->sapwpsie.sapWPSBeaconIE.FieldPresent |= WPS_BEACON_STATE_PRESENT;
|
|
- pos += 1;
|
|
- break;
|
|
- case HDD_WPS_ELEM_APSETUPLOCK:
|
|
- pos += 4;
|
|
- pSap_WPSIe->sapwpsie.sapWPSBeaconIE.APSetupLocked = *pos;
|
|
- hddLog(LOG1, "AP setup lock %d", pSap_WPSIe->sapwpsie.sapWPSBeaconIE.APSetupLocked);
|
|
- pSap_WPSIe->sapwpsie.sapWPSBeaconIE.FieldPresent |= WPS_BEACON_APSETUPLOCK_PRESENT;
|
|
- pos += 1;
|
|
- break;
|
|
- case HDD_WPS_ELEM_SELECTEDREGISTRA:
|
|
- pos += 4;
|
|
- pSap_WPSIe->sapwpsie.sapWPSBeaconIE.SelectedRegistra = *pos;
|
|
- hddLog(LOG1, "Selected Registra %d", pSap_WPSIe->sapwpsie.sapWPSBeaconIE.SelectedRegistra);
|
|
- pSap_WPSIe->sapwpsie.sapWPSBeaconIE.FieldPresent |= WPS_BEACON_SELECTEDREGISTRA_PRESENT;
|
|
- pos += 1;
|
|
- break;
|
|
- case HDD_WPS_ELEM_DEVICE_PASSWORD_ID:
|
|
- pos += 4;
|
|
- pSap_WPSIe->sapwpsie.sapWPSBeaconIE.DevicePasswordID = (*pos<<8) | *(pos+1);
|
|
- hddLog(LOG1, "Password ID: %x", pSap_WPSIe->sapwpsie.sapWPSBeaconIE.DevicePasswordID);
|
|
- pSap_WPSIe->sapwpsie.sapWPSBeaconIE.FieldPresent |= WPS_BEACON_DEVICEPASSWORDID_PRESENT;
|
|
- pos += 2;
|
|
- break;
|
|
- case HDD_WPS_ELEM_REGISTRA_CONF_METHODS:
|
|
- pos += 4;
|
|
- pSap_WPSIe->sapwpsie.sapWPSBeaconIE.SelectedRegistraCfgMethod = (*pos<<8) | *(pos+1);
|
|
- hddLog(LOG1, "Select Registra Config Methods: %x", pSap_WPSIe->sapwpsie.sapWPSBeaconIE.SelectedRegistraCfgMethod);
|
|
- pSap_WPSIe->sapwpsie.sapWPSBeaconIE.FieldPresent |= WPS_BEACON_SELECTEDREGISTRACFGMETHOD_PRESENT;
|
|
- pos += 2;
|
|
- break;
|
|
-
|
|
- case HDD_WPS_ELEM_UUID_E:
|
|
- pos += 2;
|
|
- length = *pos<<8 | *(pos+1);
|
|
- pos += 2;
|
|
- if (length > sizeof(pSap_WPSIe->sapwpsie.sapWPSBeaconIE.UUID_E))
|
|
- {
|
|
- ret = -EINVAL;
|
|
- goto exit;
|
|
- }
|
|
- vos_mem_copy(pSap_WPSIe->sapwpsie.sapWPSBeaconIE.UUID_E, pos, length);
|
|
- pSap_WPSIe->sapwpsie.sapWPSBeaconIE.FieldPresent |= WPS_BEACON_UUIDE_PRESENT;
|
|
- pos += length;
|
|
- break;
|
|
- case HDD_WPS_ELEM_RF_BANDS:
|
|
- pos += 4;
|
|
- pSap_WPSIe->sapwpsie.sapWPSBeaconIE.RFBand = *pos;
|
|
- hddLog(LOG1, "RF band: %d", pSap_WPSIe->sapwpsie.sapWPSBeaconIE.RFBand);
|
|
- pSap_WPSIe->sapwpsie.sapWPSBeaconIE.FieldPresent |= WPS_BEACON_RF_BANDS_PRESENT;
|
|
- pos += 1;
|
|
- break;
|
|
-
|
|
- default:
|
|
- hddLog (LOGW, "UNKNOWN TLV in WPS IE(%x)", (*pos<<8 | *(pos+1)));
|
|
- ret = -EINVAL;
|
|
- goto exit;
|
|
- }
|
|
- }
|
|
- }
|
|
- else {
|
|
- hddLog (LOGE, "%s WPS IE Mismatch %X",
|
|
- __func__, wps_genie[0]);
|
|
- }
|
|
- break;
|
|
-
|
|
- default:
|
|
- hddLog (LOGE, "%s Set UNKNOWN IE %X",__func__, wps_genie[0]);
|
|
- ret = -EINVAL;
|
|
- goto exit;
|
|
- }
|
|
- }
|
|
- else if( wps_genie[0] == eQC_WPS_PROBE_RSP_IE)
|
|
- {
|
|
- pSap_WPSIe->sapWPSIECode = eSAP_WPS_PROBE_RSP_IE;
|
|
- wps_genie = wps_genie + 1;
|
|
- switch ( wps_genie[0] )
|
|
- {
|
|
- case DOT11F_EID_WPA:
|
|
- if (wps_genie[1] < DOT11F_EID_HEADER_LEN ||
|
|
- wps_genie[1] > DOT11F_IE_WPA_MAX_LEN + DOT11F_EID_HEADER_LEN)
|
|
- {
|
|
- ret = -EINVAL;
|
|
- goto exit;
|
|
- }
|
|
- else if (memcmp(&wps_genie[2], "\x00\x50\xf2\x04", 4) == 0)
|
|
- {
|
|
- hddLog (LOG1, "%s Set WPS PROBE RSP IE(len %d)",__func__, wps_genie[1]+2);
|
|
- pos = &wps_genie[6];
|
|
- while (((size_t)pos - (size_t)&wps_genie[6]) < (wps_genie[1] - 4) )
|
|
- {
|
|
- switch((u_int16_t)(*pos<<8) | *(pos+1))
|
|
- {
|
|
- case HDD_WPS_ELEM_VERSION:
|
|
- pos += 4;
|
|
- pSap_WPSIe->sapwpsie.sapWPSProbeRspIE.Version = *pos;
|
|
- hddLog(LOG1, "WPS version %d", pSap_WPSIe->sapwpsie.sapWPSProbeRspIE.Version);
|
|
- pSap_WPSIe->sapwpsie.sapWPSProbeRspIE.FieldPresent |= WPS_PROBRSP_VER_PRESENT;
|
|
- pos += 1;
|
|
- break;
|
|
-
|
|
- case HDD_WPS_ELEM_WPS_STATE:
|
|
- pos +=4;
|
|
- pSap_WPSIe->sapwpsie.sapWPSProbeRspIE.wpsState = *pos;
|
|
- hddLog(LOG1, "WPS State %d", pSap_WPSIe->sapwpsie.sapWPSProbeRspIE.wpsState);
|
|
- pSap_WPSIe->sapwpsie.sapWPSProbeRspIE.FieldPresent |= WPS_PROBRSP_STATE_PRESENT;
|
|
- pos += 1;
|
|
- break;
|
|
- case HDD_WPS_ELEM_APSETUPLOCK:
|
|
- pos += 4;
|
|
- pSap_WPSIe->sapwpsie.sapWPSProbeRspIE.APSetupLocked = *pos;
|
|
- hddLog(LOG1, "AP setup lock %d", pSap_WPSIe->sapwpsie.sapWPSProbeRspIE.APSetupLocked);
|
|
- pSap_WPSIe->sapwpsie.sapWPSProbeRspIE.FieldPresent |= WPS_PROBRSP_APSETUPLOCK_PRESENT;
|
|
- pos += 1;
|
|
- break;
|
|
- case HDD_WPS_ELEM_SELECTEDREGISTRA:
|
|
- pos += 4;
|
|
- pSap_WPSIe->sapwpsie.sapWPSProbeRspIE.SelectedRegistra = *pos;
|
|
- hddLog(LOG1, "Selected Registra %d", pSap_WPSIe->sapwpsie.sapWPSProbeRspIE.SelectedRegistra);
|
|
- pSap_WPSIe->sapwpsie.sapWPSProbeRspIE.FieldPresent |= WPS_PROBRSP_SELECTEDREGISTRA_PRESENT;
|
|
- pos += 1;
|
|
- break;
|
|
- case HDD_WPS_ELEM_DEVICE_PASSWORD_ID:
|
|
- pos += 4;
|
|
- pSap_WPSIe->sapwpsie.sapWPSProbeRspIE.DevicePasswordID = (*pos<<8) | *(pos+1);
|
|
- hddLog(LOG1, "Password ID: %d", pSap_WPSIe->sapwpsie.sapWPSProbeRspIE.DevicePasswordID);
|
|
- pSap_WPSIe->sapwpsie.sapWPSProbeRspIE.FieldPresent |= WPS_PROBRSP_DEVICEPASSWORDID_PRESENT;
|
|
- pos += 2;
|
|
- break;
|
|
- case HDD_WPS_ELEM_REGISTRA_CONF_METHODS:
|
|
- pos += 4;
|
|
- pSap_WPSIe->sapwpsie.sapWPSProbeRspIE.SelectedRegistraCfgMethod = (*pos<<8) | *(pos+1);
|
|
- hddLog(LOG1, "Select Registra Config Methods: %x", pSap_WPSIe->sapwpsie.sapWPSProbeRspIE.SelectedRegistraCfgMethod);
|
|
- pSap_WPSIe->sapwpsie.sapWPSProbeRspIE.FieldPresent |= WPS_PROBRSP_SELECTEDREGISTRACFGMETHOD_PRESENT;
|
|
- pos += 2;
|
|
- break;
|
|
- case HDD_WPS_ELEM_RSP_TYPE:
|
|
- pos += 4;
|
|
- pSap_WPSIe->sapwpsie.sapWPSProbeRspIE.ResponseType = *pos;
|
|
- hddLog(LOG1, "Config Methods: %d", pSap_WPSIe->sapwpsie.sapWPSProbeRspIE.ResponseType);
|
|
- pSap_WPSIe->sapwpsie.sapWPSProbeRspIE.FieldPresent |= WPS_PROBRSP_RESPONSETYPE_PRESENT;
|
|
- pos += 1;
|
|
- break;
|
|
- case HDD_WPS_ELEM_UUID_E:
|
|
- pos += 2;
|
|
- length = *pos<<8 | *(pos+1);
|
|
- pos += 2;
|
|
- if (length > (sizeof(pSap_WPSIe->sapwpsie.sapWPSProbeRspIE.UUID_E)))
|
|
- {
|
|
- ret = -EINVAL;
|
|
- goto exit;
|
|
- }
|
|
- vos_mem_copy(pSap_WPSIe->sapwpsie.sapWPSProbeRspIE.UUID_E, pos, length);
|
|
- pSap_WPSIe->sapwpsie.sapWPSProbeRspIE.FieldPresent |= WPS_PROBRSP_UUIDE_PRESENT;
|
|
- pos += length;
|
|
- break;
|
|
-
|
|
- case HDD_WPS_ELEM_MANUFACTURER:
|
|
- pos += 2;
|
|
- length = *pos<<8 | *(pos+1);
|
|
- pos += 2;
|
|
- if (length > (sizeof(pSap_WPSIe->sapwpsie.sapWPSProbeRspIE.Manufacture.name)))
|
|
- {
|
|
- ret = -EINVAL;
|
|
- goto exit;
|
|
- }
|
|
- pSap_WPSIe->sapwpsie.sapWPSProbeRspIE.Manufacture.num_name = length;
|
|
- vos_mem_copy(pSap_WPSIe->sapwpsie.sapWPSProbeRspIE.Manufacture.name, pos, length);
|
|
- pSap_WPSIe->sapwpsie.sapWPSProbeRspIE.FieldPresent |= WPS_PROBRSP_MANUFACTURE_PRESENT;
|
|
- pos += length;
|
|
- break;
|
|
-
|
|
- case HDD_WPS_ELEM_MODEL_NAME:
|
|
- pos += 2;
|
|
- length = *pos<<8 | *(pos+1);
|
|
- pos += 2;
|
|
- if (length > (sizeof(pSap_WPSIe->sapwpsie.sapWPSProbeRspIE.ModelName.text)))
|
|
- {
|
|
- ret = -EINVAL;
|
|
- goto exit;
|
|
- }
|
|
- pSap_WPSIe->sapwpsie.sapWPSProbeRspIE.ModelName.num_text = length;
|
|
- vos_mem_copy(pSap_WPSIe->sapwpsie.sapWPSProbeRspIE.ModelName.text, pos, length);
|
|
- pSap_WPSIe->sapwpsie.sapWPSProbeRspIE.FieldPresent |= WPS_PROBRSP_MODELNAME_PRESENT;
|
|
- pos += length;
|
|
- break;
|
|
- case HDD_WPS_ELEM_MODEL_NUM:
|
|
- pos += 2;
|
|
- length = *pos<<8 | *(pos+1);
|
|
- pos += 2;
|
|
- if (length > (sizeof(pSap_WPSIe->sapwpsie.sapWPSProbeRspIE.ModelNumber.text)))
|
|
- {
|
|
- ret = -EINVAL;
|
|
- goto exit;
|
|
- }
|
|
- pSap_WPSIe->sapwpsie.sapWPSProbeRspIE.ModelNumber.num_text = length;
|
|
- vos_mem_copy(pSap_WPSIe->sapwpsie.sapWPSProbeRspIE.ModelNumber.text, pos, length);
|
|
- pSap_WPSIe->sapwpsie.sapWPSProbeRspIE.FieldPresent |= WPS_PROBRSP_MODELNUMBER_PRESENT;
|
|
- pos += length;
|
|
- break;
|
|
- case HDD_WPS_ELEM_SERIAL_NUM:
|
|
- pos += 2;
|
|
- length = *pos<<8 | *(pos+1);
|
|
- pos += 2;
|
|
- if (length > (sizeof(pSap_WPSIe->sapwpsie.sapWPSProbeRspIE.SerialNumber.text)))
|
|
- {
|
|
- ret = -EINVAL;
|
|
- goto exit;
|
|
- }
|
|
- pSap_WPSIe->sapwpsie.sapWPSProbeRspIE.SerialNumber.num_text = length;
|
|
- vos_mem_copy(pSap_WPSIe->sapwpsie.sapWPSProbeRspIE.SerialNumber.text, pos, length);
|
|
- pSap_WPSIe->sapwpsie.sapWPSProbeRspIE.FieldPresent |= WPS_PROBRSP_SERIALNUMBER_PRESENT;
|
|
- pos += length;
|
|
- break;
|
|
- case HDD_WPS_ELEM_PRIMARY_DEVICE_TYPE:
|
|
- pos += 4;
|
|
- pSap_WPSIe->sapwpsie.sapWPSProbeRspIE.PrimaryDeviceCategory = (*pos<<8 | *(pos+1));
|
|
- hddLog(LOG1, "primary dev category: %d", pSap_WPSIe->sapwpsie.sapWPSProbeRspIE.PrimaryDeviceCategory);
|
|
- pos += 2;
|
|
-
|
|
- vos_mem_copy(pSap_WPSIe->sapwpsie.sapWPSProbeRspIE.PrimaryDeviceOUI, pos, HDD_WPS_DEVICE_OUI_LEN);
|
|
- hddLog(LOG1, "primary dev oui: %02x, %02x, %02x, %02x", pos[0], pos[1], pos[2], pos[3]);
|
|
- pos += 4;
|
|
- pSap_WPSIe->sapwpsie.sapWPSProbeRspIE.DeviceSubCategory = (*pos<<8 | *(pos+1));
|
|
- hddLog(LOG1, "primary dev sub category: %d", pSap_WPSIe->sapwpsie.sapWPSProbeRspIE.DeviceSubCategory);
|
|
- pos += 2;
|
|
- pSap_WPSIe->sapwpsie.sapWPSProbeRspIE.FieldPresent |= WPS_PROBRSP_PRIMARYDEVICETYPE_PRESENT;
|
|
- break;
|
|
- case HDD_WPS_ELEM_DEVICE_NAME:
|
|
- pos += 2;
|
|
- length = *pos<<8 | *(pos+1);
|
|
- pos += 2;
|
|
- if (length > (sizeof(pSap_WPSIe->sapwpsie.sapWPSProbeRspIE.DeviceName.text)))
|
|
- {
|
|
- ret = -EINVAL;
|
|
- goto exit;
|
|
- }
|
|
- pSap_WPSIe->sapwpsie.sapWPSProbeRspIE.DeviceName.num_text = length;
|
|
- vos_mem_copy(pSap_WPSIe->sapwpsie.sapWPSProbeRspIE.DeviceName.text, pos, length);
|
|
- pos += length;
|
|
- pSap_WPSIe->sapwpsie.sapWPSProbeRspIE.FieldPresent |= WPS_PROBRSP_DEVICENAME_PRESENT;
|
|
- break;
|
|
- case HDD_WPS_ELEM_CONFIG_METHODS:
|
|
- pos += 4;
|
|
- pSap_WPSIe->sapwpsie.sapWPSProbeRspIE.ConfigMethod = (*pos<<8) | *(pos+1);
|
|
- hddLog(LOG1, "Config Methods: %d", pSap_WPSIe->sapwpsie.sapWPSProbeRspIE.SelectedRegistraCfgMethod);
|
|
- pos += 2;
|
|
- pSap_WPSIe->sapwpsie.sapWPSProbeRspIE.FieldPresent |= WPS_PROBRSP_CONFIGMETHODS_PRESENT;
|
|
- break;
|
|
-
|
|
- case HDD_WPS_ELEM_RF_BANDS:
|
|
- pos += 4;
|
|
- pSap_WPSIe->sapwpsie.sapWPSProbeRspIE.RFBand = *pos;
|
|
- hddLog(LOG1, "RF band: %d", pSap_WPSIe->sapwpsie.sapWPSProbeRspIE.RFBand);
|
|
- pos += 1;
|
|
- pSap_WPSIe->sapwpsie.sapWPSProbeRspIE.FieldPresent |= WPS_PROBRSP_RF_BANDS_PRESENT;
|
|
- break;
|
|
- } // switch
|
|
- }
|
|
- }
|
|
- else
|
|
- {
|
|
- hddLog (LOGE, "%s WPS IE Mismatch %X",__func__, wps_genie[0]);
|
|
- }
|
|
-
|
|
- } // switch
|
|
- }
|
|
-
|
|
-#ifdef WLAN_FEATURE_MBSSID
|
|
- halStatus = WLANSAP_Set_WpsIe(WLAN_HDD_GET_SAP_CTX_PTR(pHostapdAdapter), pSap_WPSIe);
|
|
-#else
|
|
- halStatus = WLANSAP_Set_WpsIe(pVosContext, pSap_WPSIe);
|
|
-#endif
|
|
- if (halStatus != eHAL_STATUS_SUCCESS)
|
|
- ret = -EINVAL;
|
|
- pHostapdState = WLAN_HDD_GET_HOSTAP_STATE_PTR(pHostapdAdapter);
|
|
- if( pHostapdState->bCommit && WPSIeType == eQC_WPS_PROBE_RSP_IE)
|
|
- {
|
|
- //hdd_adapter_t *pHostapdAdapter = (netdev_priv(dev));
|
|
- //v_CONTEXT_t pVosContext = pHostapdAdapter->pvosContext;
|
|
-#ifdef WLAN_FEATURE_MBSSID
|
|
- WLANSAP_Update_WpsIe ( WLAN_HDD_GET_SAP_CTX_PTR(pHostapdAdapter) );
|
|
-#else
|
|
- WLANSAP_Update_WpsIe ( pVosContext );
|
|
-#endif
|
|
- }
|
|
-exit:
|
|
- vos_mem_free(pSap_WPSIe);
|
|
- kfree(fwps_genie);
|
|
- EXIT();
|
|
- return ret;
|
|
-}
|
|
-
|
|
-static int iw_softap_setwpsie(struct net_device *dev,
|
|
- struct iw_request_info *info,
|
|
- union iwreq_data *wrqu,
|
|
- char *extra)
|
|
-{
|
|
- int ret;
|
|
-
|
|
- vos_ssr_protect(__func__);
|
|
- ret = __iw_softap_setwpsie(dev, info, wrqu, extra);
|
|
- vos_ssr_unprotect(__func__);
|
|
-
|
|
- return ret;
|
|
-}
|
|
-
|
|
static int __iw_softap_stopbss(struct net_device *dev,
|
|
struct iw_request_info *info,
|
|
union iwreq_data *wrqu,
|
|
@@ -6719,8 +6303,6 @@ static const struct iw_priv_args hostapd_private_args[] = {
|
|
|
|
{ QCSAP_IOCTL_GET_STAWPAIE,
|
|
IW_PRIV_TYPE_BYTE | IW_PRIV_SIZE_FIXED | 1, 0, "get_staWPAIE" },
|
|
- { QCSAP_IOCTL_SETWPAIE,
|
|
- IW_PRIV_TYPE_BYTE | QCSAP_MAX_WSC_IE | IW_PRIV_SIZE_FIXED, 0, "setwpaie" },
|
|
{ QCSAP_IOCTL_STOPBSS,
|
|
IW_PRIV_TYPE_BYTE | IW_PRIV_SIZE_FIXED, 0, "stopbss" },
|
|
{ QCSAP_IOCTL_VERSION, 0,
|
|
@@ -6884,7 +6466,6 @@ static const iw_handler hostapd_private[] = {
|
|
[QCSAP_IOCTL_GETPARAM - SIOCIWFIRSTPRIV] = iw_softap_getparam, //get priv ioctl
|
|
[QCSAP_IOCTL_SET_NONE_GET_THREE - SIOCIWFIRSTPRIV] = iw_softap_get_three,
|
|
[QCSAP_IOCTL_GET_STAWPAIE - SIOCIWFIRSTPRIV] = iw_get_genie, //get station genIE
|
|
- [QCSAP_IOCTL_SETWPAIE - SIOCIWFIRSTPRIV] = iw_softap_setwpsie,
|
|
[QCSAP_IOCTL_STOPBSS - SIOCIWFIRSTPRIV] = iw_softap_stopbss, // stop bss
|
|
[QCSAP_IOCTL_VERSION - SIOCIWFIRSTPRIV] = iw_softap_version, // get driver version
|
|
[QCSAP_IOCTL_GET_WPS_PBC_PROBE_REQ_IES - SIOCIWFIRSTPRIV] = iw_get_WPSPBCProbeReqIEs,
|