mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-25 14:13:01 -04:00
Merge "qcacld-3.0: Remove obsolete support for SIOCGIWMODE" into wlan-cld3.driver.lnx.2.0-dev
This commit is contained in:
commit
728fa4c99e
2 changed files with 2 additions and 131 deletions
|
|
@ -5003,62 +5003,6 @@ static int iw_get_ap_freq(struct net_device *dev,
|
|||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* __iw_get_mode() - get mode
|
||||
* @dev - Pointer to the net device.
|
||||
* @info - Pointer to the iw_request_info.
|
||||
* @wrqu - Pointer to the iwreq_data.
|
||||
* @extra - Pointer to the data.
|
||||
*
|
||||
* Return: 0 for success, non zero for failure.
|
||||
*/
|
||||
static int __iw_get_mode(struct net_device *dev,
|
||||
struct iw_request_info *info,
|
||||
union iwreq_data *wrqu, char *extra) {
|
||||
|
||||
struct hdd_adapter *adapter;
|
||||
struct hdd_context *hdd_ctx;
|
||||
int ret;
|
||||
|
||||
ENTER_DEV(dev);
|
||||
|
||||
adapter = WLAN_HDD_GET_PRIV_PTR(dev);
|
||||
hdd_ctx = WLAN_HDD_GET_CTX(adapter);
|
||||
ret = wlan_hdd_validate_context(hdd_ctx);
|
||||
if (0 != ret)
|
||||
return ret;
|
||||
|
||||
ret = hdd_check_standard_wext_control(hdd_ctx, info);
|
||||
if (0 != ret)
|
||||
return ret;
|
||||
|
||||
wrqu->mode = IW_MODE_MASTER;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* iw_get_mode() - Wrapper function to protect __iw_get_mode from the SSR.
|
||||
* @dev - Pointer to the net device.
|
||||
* @info - Pointer to the iw_request_info.
|
||||
* @wrqu - Pointer to the iwreq_data.
|
||||
* @extra - Pointer to the data.
|
||||
*
|
||||
* Return: 0 for success, non zero for failure.
|
||||
*/
|
||||
static int iw_get_mode(struct net_device *dev,
|
||||
struct iw_request_info *info,
|
||||
union iwreq_data *wrqu, char *extra)
|
||||
{
|
||||
int ret;
|
||||
|
||||
cds_ssr_protect(__func__);
|
||||
ret = __iw_get_mode(dev, info, wrqu, extra);
|
||||
cds_ssr_unprotect(__func__);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int
|
||||
__iw_softap_stopbss(struct net_device *dev,
|
||||
struct iw_request_info *info,
|
||||
|
|
@ -5482,7 +5426,7 @@ static const iw_handler hostapd_handler[] = {
|
|||
(iw_handler) NULL, /* SIOCSIWFREQ */
|
||||
(iw_handler) iw_get_ap_freq, /* SIOCGIWFREQ */
|
||||
(iw_handler) NULL, /* SIOCSIWMODE */
|
||||
(iw_handler) iw_get_mode, /* SIOCGIWMODE */
|
||||
(iw_handler) NULL, /* SIOCGIWMODE */
|
||||
(iw_handler) NULL, /* SIOCSIWSENS */
|
||||
(iw_handler) NULL, /* SIOCGIWSENS */
|
||||
(iw_handler) NULL, /* SIOCSIWRANGE */
|
||||
|
|
|
|||
|
|
@ -4737,79 +4737,6 @@ static int iw_set_mode(struct net_device *dev, struct iw_request_info *info,
|
|||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* __iw_get_mode() - SIOCGIWMODE ioctl handler
|
||||
* @dev: device upon which the ioctl was received
|
||||
* @info: ioctl request information
|
||||
* @wrqu: ioctl request data
|
||||
* @extra: ioctl extra data
|
||||
*
|
||||
* Return: 0 on success, non-zero on error
|
||||
*/
|
||||
static int
|
||||
__iw_get_mode(struct net_device *dev, struct iw_request_info *info,
|
||||
union iwreq_data *wrqu, char *extra)
|
||||
{
|
||||
struct hdd_wext_state *pWextState;
|
||||
struct hdd_adapter *adapter = WLAN_HDD_GET_PRIV_PTR(dev);
|
||||
struct hdd_context *hdd_ctx;
|
||||
int ret;
|
||||
|
||||
ENTER_DEV(dev);
|
||||
|
||||
hdd_ctx = WLAN_HDD_GET_CTX(adapter);
|
||||
ret = wlan_hdd_validate_context(hdd_ctx);
|
||||
if (0 != ret)
|
||||
return ret;
|
||||
|
||||
ret = hdd_check_standard_wext_control(hdd_ctx, info);
|
||||
if (0 != ret)
|
||||
return ret;
|
||||
|
||||
pWextState = WLAN_HDD_GET_WEXT_STATE_PTR(adapter);
|
||||
|
||||
switch (pWextState->roamProfile.BSSType) {
|
||||
case eCSR_BSS_TYPE_INFRASTRUCTURE:
|
||||
hdd_debug("returns IW_MODE_INFRA");
|
||||
wrqu->mode = IW_MODE_INFRA;
|
||||
break;
|
||||
case eCSR_BSS_TYPE_IBSS:
|
||||
case eCSR_BSS_TYPE_START_IBSS:
|
||||
hdd_debug("returns IW_MODE_ADHOC");
|
||||
wrqu->mode = IW_MODE_ADHOC;
|
||||
break;
|
||||
case eCSR_BSS_TYPE_ANY:
|
||||
default:
|
||||
hdd_debug("returns IW_MODE_AUTO");
|
||||
wrqu->mode = IW_MODE_AUTO;
|
||||
break;
|
||||
}
|
||||
|
||||
EXIT();
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* iw_get_mode() - SSR wrapper for __iw_get_mode()
|
||||
* @dev: pointer to net_device
|
||||
* @info: pointer to iw_request_info
|
||||
* @wrqu: pointer to iwreq_data
|
||||
* @extra: pointer to extra ioctl payload
|
||||
*
|
||||
* Return: 0 on success, error number otherwise
|
||||
*/
|
||||
static int iw_get_mode(struct net_device *dev, struct iw_request_info *info,
|
||||
union iwreq_data *wrqu, char *extra)
|
||||
{
|
||||
int ret;
|
||||
|
||||
cds_ssr_protect(__func__);
|
||||
ret = __iw_get_mode(dev, info, wrqu, extra);
|
||||
cds_ssr_unprotect(__func__);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* __iw_set_freq() - SIOCSIWFREQ ioctl handler
|
||||
* @dev: device upon which the ioctl was received
|
||||
|
|
@ -11218,7 +11145,7 @@ static const iw_handler we_handler[] = {
|
|||
(iw_handler) iw_set_freq, /* SIOCSIWFREQ */
|
||||
(iw_handler) iw_get_freq, /* SIOCGIWFREQ */
|
||||
(iw_handler) iw_set_mode, /* SIOCSIWMODE */
|
||||
(iw_handler) iw_get_mode, /* SIOCGIWMODE */
|
||||
(iw_handler) NULL, /* SIOCGIWMODE */
|
||||
(iw_handler) NULL, /* SIOCSIWSENS */
|
||||
(iw_handler) NULL, /* SIOCGIWSENS */
|
||||
(iw_handler) NULL, /* SIOCSIWRANGE */
|
||||
|
|
|
|||
Loading…
Reference in a new issue