mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-12 15:49:17 -04:00
qcacld-3.0: wlan: Cleanup North-Bound load/unload logs
qcacld-2.0 to qcacld-3.0 propagation If IOCTLs or CFG callbacks are issued continuously during driver load/unload or during SSR, observing stability issues because of excessive logging. Hence move log level to INFO from ERROR in wlan_hdd_validate_context function and don't print return status in its caller functions. Change-Id: I8fd9b25e0c774e1e12b01128eb86783c9dec2ab7 CRs-Fixed: 800631
This commit is contained in:
parent
75deb33157
commit
2db50edd69
12 changed files with 379 additions and 376 deletions
|
|
@ -1791,16 +1791,16 @@ __wlan_hdd_cfg80211_get_supported_features(struct wiphy *wiphy,
|
|||
uint32_t fset = 0;
|
||||
int ret;
|
||||
|
||||
ENTER();
|
||||
|
||||
if (CDF_FTM_MODE == hdd_get_conparam()) {
|
||||
hdd_err("Command not allowed in FTM mode");
|
||||
return -EPERM;
|
||||
}
|
||||
|
||||
ret = wlan_hdd_validate_context(pHddCtx);
|
||||
if (0 != ret) {
|
||||
hddLog(LOGE, FL("Hdd context not valid"));
|
||||
if (0 != ret)
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (wiphy->interface_modes & BIT(NL80211_IFTYPE_STATION)) {
|
||||
hddLog(LOG1, FL("Infra Station mode is supported by driver"));
|
||||
|
|
@ -1877,7 +1877,9 @@ __wlan_hdd_cfg80211_get_supported_features(struct wiphy *wiphy,
|
|||
hddLog(LOGE, FL("nla put fail"));
|
||||
goto nla_put_failure;
|
||||
}
|
||||
return cfg80211_vendor_cmd_reply(skb);
|
||||
ret = cfg80211_vendor_cmd_reply(skb);
|
||||
EXIT();
|
||||
return ret;
|
||||
nla_put_failure:
|
||||
kfree_skb(skb);
|
||||
return -EINVAL;
|
||||
|
|
@ -1938,10 +1940,8 @@ __wlan_hdd_cfg80211_set_scanning_mac_oui(struct wiphy *wiphy,
|
|||
}
|
||||
|
||||
ret = wlan_hdd_validate_context(pHddCtx);
|
||||
if (0 != ret) {
|
||||
hddLog(LOGE, FL("HDD context is not valid"));
|
||||
if (0 != ret)
|
||||
return ret;
|
||||
}
|
||||
|
||||
if (false == pHddCtx->config->enable_mac_spoofing) {
|
||||
hddLog(LOGW, FL("MAC address spoofing is not enabled"));
|
||||
|
|
@ -3741,10 +3741,8 @@ __wlan_hdd_cfg80211_offloaded_packets(struct wiphy *wiphy,
|
|||
}
|
||||
|
||||
ret = wlan_hdd_validate_context(hdd_ctx);
|
||||
if (0 != ret) {
|
||||
hddLog(LOGE, FL("HDD context is not valid"));
|
||||
if (0 != ret)
|
||||
return ret;
|
||||
}
|
||||
|
||||
if (!sme_is_feature_supported_by_fw(WLAN_PERIODIC_TX_PTRN)) {
|
||||
hddLog(LOGE,
|
||||
|
|
@ -3854,10 +3852,8 @@ __wlan_hdd_cfg80211_monitor_rssi(struct wiphy *wiphy,
|
|||
ENTER();
|
||||
|
||||
ret = wlan_hdd_validate_context(hdd_ctx);
|
||||
if (0 != ret) {
|
||||
hddLog(LOGE, FL("HDD context is not valid"));
|
||||
if (0 != ret)
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (!hdd_conn_is_connected(WLAN_HDD_GET_STATION_CTX_PTR(adapter))) {
|
||||
hddLog(LOGE, FL("Not in Connected state!"));
|
||||
|
|
@ -3975,9 +3971,10 @@ void hdd_rssi_threshold_breached(void *hddctx,
|
|||
|
||||
ENTER();
|
||||
|
||||
if (wlan_hdd_validate_context(hdd_ctx) || !data) {
|
||||
hddLog(LOGE, FL("HDD context is invalid or data(%p) is null"),
|
||||
data);
|
||||
if (wlan_hdd_validate_context(hdd_ctx))
|
||||
return;
|
||||
if (!data) {
|
||||
hddLog(LOGE, FL("data is null"));
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -5356,10 +5353,8 @@ static int __wlan_hdd_cfg80211_change_bss(struct wiphy *wiphy,
|
|||
|
||||
pHddCtx = WLAN_HDD_GET_CTX(pAdapter);
|
||||
ret = wlan_hdd_validate_context(pHddCtx);
|
||||
if (0 != ret) {
|
||||
hddLog(CDF_TRACE_LEVEL_ERROR, FL("HDD context is not valid"));
|
||||
if (0 != ret)
|
||||
return ret;
|
||||
}
|
||||
|
||||
if (!(pAdapter->device_mode == WLAN_HDD_SOFTAP ||
|
||||
pAdapter->device_mode == WLAN_HDD_P2P_GO)) {
|
||||
|
|
@ -5503,10 +5498,8 @@ static int __wlan_hdd_cfg80211_change_iface(struct wiphy *wiphy,
|
|||
|
||||
pHddCtx = WLAN_HDD_GET_CTX(pAdapter);
|
||||
status = wlan_hdd_validate_context(pHddCtx);
|
||||
if (0 != status) {
|
||||
hddLog(LOGE, FL("HDD context is not valid"));
|
||||
if (0 != status)
|
||||
return status;
|
||||
}
|
||||
|
||||
MTRACE(cdf_trace(CDF_MODULE_ID_HDD,
|
||||
TRACE_CODE_HDD_CFG80211_CHANGE_IFACE,
|
||||
|
|
@ -5824,10 +5817,8 @@ static int __wlan_hdd_change_station(struct wiphy *wiphy,
|
|||
|
||||
pHddCtx = WLAN_HDD_GET_CTX(pAdapter);
|
||||
ret = wlan_hdd_validate_context(pHddCtx);
|
||||
if (0 != ret) {
|
||||
hddLog(CDF_TRACE_LEVEL_ERROR, FL("HDD context is not valid"));
|
||||
if (0 != ret)
|
||||
return ret;
|
||||
}
|
||||
|
||||
pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(pAdapter);
|
||||
|
||||
|
|
@ -6109,11 +6100,8 @@ static int __wlan_hdd_cfg80211_add_key(struct wiphy *wiphy,
|
|||
pHddCtx = WLAN_HDD_GET_CTX(pAdapter);
|
||||
status = wlan_hdd_validate_context(pHddCtx);
|
||||
|
||||
if (0 != status) {
|
||||
CDF_TRACE(CDF_MODULE_ID_HDD, CDF_TRACE_LEVEL_ERROR,
|
||||
"%s: HDD context is not valid", __func__);
|
||||
if (0 != status)
|
||||
return status;
|
||||
}
|
||||
|
||||
hddLog(LOG1, FL("Device_mode %s(%d)"),
|
||||
hdd_device_mode_to_string(pAdapter->device_mode),
|
||||
|
|
@ -6397,7 +6385,7 @@ static int __wlan_hdd_cfg80211_add_key(struct wiphy *wiphy,
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
EXIT();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -6608,10 +6596,8 @@ static int __wlan_hdd_cfg80211_set_default_key(struct wiphy *wiphy,
|
|||
pHddCtx = WLAN_HDD_GET_CTX(pAdapter);
|
||||
status = wlan_hdd_validate_context(pHddCtx);
|
||||
|
||||
if (0 != status) {
|
||||
hddLog(LOGE, FL("HDD context is not valid"));
|
||||
if (0 != status)
|
||||
return status;
|
||||
}
|
||||
|
||||
if ((pAdapter->device_mode == WLAN_HDD_INFRA_STATION) ||
|
||||
(pAdapter->device_mode == WLAN_HDD_P2P_CLIENT)) {
|
||||
|
|
@ -6819,12 +6805,12 @@ wlan_hdd_cfg80211_inform_bss_frame(hdd_adapter_t *pAdapter,
|
|||
struct timespec ts;
|
||||
#endif
|
||||
|
||||
ENTER();
|
||||
|
||||
pHddCtx = WLAN_HDD_GET_CTX(pAdapter);
|
||||
status = wlan_hdd_validate_context(pHddCtx);
|
||||
if (0 != status) {
|
||||
hddLog(LOGE, FL("HDD context is not valid"));
|
||||
if (0 != status)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
mgmt = kzalloc((sizeof(struct ieee80211_mgmt) + ie_length), GFP_KERNEL);
|
||||
if (!mgmt) {
|
||||
|
|
@ -6930,6 +6916,7 @@ wlan_hdd_cfg80211_inform_bss_frame(hdd_adapter_t *pAdapter,
|
|||
cfg80211_inform_bss_frame(wiphy, chan, mgmt, frame_len, rssi,
|
||||
GFP_KERNEL);
|
||||
kfree(mgmt);
|
||||
EXIT();
|
||||
return bss_status;
|
||||
}
|
||||
|
||||
|
|
@ -6997,10 +6984,8 @@ int wlan_hdd_cfg80211_update_bss(struct wiphy *wiphy,
|
|||
|
||||
pHddCtx = WLAN_HDD_GET_CTX(pAdapter);
|
||||
ret = wlan_hdd_validate_context(pHddCtx);
|
||||
if (0 != ret) {
|
||||
hddLog(LOGE, FL("HDD context is not valid"));
|
||||
if (0 != ret)
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* start getting scan results and populate cgf80211 BSS database */
|
||||
status = sme_scan_get_result(hHal, pAdapter->sessionId, NULL, &pResult);
|
||||
|
|
@ -7319,11 +7304,8 @@ int wlan_hdd_cfg80211_connect_start(hdd_adapter_t *pAdapter,
|
|||
pHddCtx = WLAN_HDD_GET_CTX(pAdapter);
|
||||
|
||||
status = wlan_hdd_validate_context(pHddCtx);
|
||||
if (status) {
|
||||
hddLog(LOGE,
|
||||
FL("HDD context is not valid!"));
|
||||
if (status)
|
||||
return status;
|
||||
}
|
||||
|
||||
if (SIR_MAC_MAX_SSID_LENGTH < ssid_len) {
|
||||
hddLog(LOGE, FL("wrong SSID len"));
|
||||
|
|
@ -8338,10 +8320,8 @@ static int __wlan_hdd_cfg80211_connect(struct wiphy *wiphy,
|
|||
}
|
||||
|
||||
status = wlan_hdd_validate_context(pHddCtx);
|
||||
if (0 != status) {
|
||||
hddLog(LOGE, FL("HDD context is not valid"));
|
||||
if (0 != status)
|
||||
return status;
|
||||
}
|
||||
if (req->channel) {
|
||||
if (!cds_allow_concurrency(pHddCtx,
|
||||
cds_convert_device_mode_to_hdd_type(
|
||||
|
|
@ -8448,13 +8428,12 @@ int wlan_hdd_disconnect(hdd_adapter_t *pAdapter, u16 reason)
|
|||
hdd_station_ctx_t *pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(pAdapter);
|
||||
hdd_context_t *pHddCtx = WLAN_HDD_GET_CTX(pAdapter);
|
||||
|
||||
ENTER();
|
||||
|
||||
status = wlan_hdd_validate_context(pHddCtx);
|
||||
|
||||
if (0 != status) {
|
||||
hddLog(LOGE,
|
||||
FL("HDD context is not valid"));
|
||||
if (0 != status)
|
||||
return status;
|
||||
}
|
||||
|
||||
/*stop tx queues */
|
||||
hddLog(LOG1, FL("Disabling queues"));
|
||||
|
|
@ -8543,10 +8522,8 @@ static int __wlan_hdd_cfg80211_disconnect(struct wiphy *wiphy,
|
|||
|
||||
status = wlan_hdd_validate_context(pHddCtx);
|
||||
|
||||
if (0 != status) {
|
||||
hddLog(LOGE, FL("HDD context is not valid"));
|
||||
if (0 != status)
|
||||
return status;
|
||||
}
|
||||
|
||||
/* Issue disconnect request to SME, if station is in connected state */
|
||||
if ((pHddStaCtx->conn_info.connState == eConnectionState_Associated) ||
|
||||
|
|
@ -8778,10 +8755,8 @@ static int __wlan_hdd_cfg80211_join_ibss(struct wiphy *wiphy,
|
|||
|
||||
status = wlan_hdd_validate_context(pHddCtx);
|
||||
|
||||
if (0 != status) {
|
||||
hddLog(LOGE, FL("HDD context is not valid"));
|
||||
if (0 != status)
|
||||
return status;
|
||||
}
|
||||
|
||||
if (NULL !=
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0))
|
||||
|
|
@ -8938,7 +8913,7 @@ static int __wlan_hdd_cfg80211_join_ibss(struct wiphy *wiphy,
|
|||
hddLog(LOGE, FL("connect failed"));
|
||||
return status;
|
||||
}
|
||||
|
||||
EXIT();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -8996,10 +8971,8 @@ static int __wlan_hdd_cfg80211_leave_ibss(struct wiphy *wiphy,
|
|||
pAdapter->sessionId,
|
||||
eCSR_DISCONNECT_REASON_IBSS_LEAVE));
|
||||
status = wlan_hdd_validate_context(pHddCtx);
|
||||
if (0 != status) {
|
||||
hddLog(LOGE, FL("HDD context is not valid"));
|
||||
if (0 != status)
|
||||
return status;
|
||||
}
|
||||
|
||||
hddLog(LOG1, FL("Device_mode %s(%d)"),
|
||||
hdd_device_mode_to_string(pAdapter->device_mode),
|
||||
|
|
@ -9029,7 +9002,7 @@ static int __wlan_hdd_cfg80211_leave_ibss(struct wiphy *wiphy,
|
|||
hal_status);
|
||||
return -EAGAIN;
|
||||
}
|
||||
|
||||
EXIT();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -9083,11 +9056,8 @@ static int __wlan_hdd_cfg80211_set_wiphy_params(struct wiphy *wiphy,
|
|||
NO_SESSION, wiphy->rts_threshold));
|
||||
status = wlan_hdd_validate_context(pHddCtx);
|
||||
|
||||
if (0 != status) {
|
||||
hddLog(LOGE,
|
||||
FL("HDD context is not valid"));
|
||||
if (0 != status)
|
||||
return status;
|
||||
}
|
||||
|
||||
if (changed & WIPHY_PARAM_RTS_THRESHOLD) {
|
||||
u32 rts_threshold = (wiphy->rts_threshold == -1) ?
|
||||
|
|
@ -9172,7 +9142,7 @@ static int __wlan_hdd_cfg80211_set_wiphy_params(struct wiphy *wiphy,
|
|||
FL("set short retry count %hu"), retry_value);
|
||||
}
|
||||
}
|
||||
|
||||
EXIT();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -9334,10 +9304,8 @@ int __wlan_hdd_cfg80211_del_station(struct wiphy *wiphy,
|
|||
pHddCtx = WLAN_HDD_GET_CTX(pAdapter);
|
||||
status = wlan_hdd_validate_context(pHddCtx);
|
||||
|
||||
if (0 != status) {
|
||||
hddLog(LOGE, FL("HDD context is not valid"));
|
||||
if (0 != status)
|
||||
return status;
|
||||
}
|
||||
|
||||
mac = (uint8_t *) pDelStaParams->peerMacAddr.bytes;
|
||||
|
||||
|
|
@ -9553,10 +9521,8 @@ static int __wlan_hdd_cfg80211_add_station(struct wiphy *wiphy,
|
|||
TRACE_CODE_HDD_CFG80211_ADD_STA,
|
||||
pAdapter->sessionId, params->listen_interval));
|
||||
|
||||
if (0 != wlan_hdd_validate_context(pHddCtx)) {
|
||||
hddLog(LOGE, FL("HDD context is not valid"));
|
||||
if (0 != wlan_hdd_validate_context(pHddCtx))
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
mask = params->sta_flags_mask;
|
||||
|
||||
|
|
@ -9572,6 +9538,7 @@ static int __wlan_hdd_cfg80211_add_station(struct wiphy *wiphy,
|
|||
}
|
||||
}
|
||||
#endif
|
||||
EXIT();
|
||||
return status;
|
||||
}
|
||||
|
||||
|
|
@ -9623,6 +9590,8 @@ static int __wlan_hdd_cfg80211_set_pmksa(struct wiphy *wiphy,
|
|||
int status;
|
||||
tPmkidCacheInfo pmk_id;
|
||||
|
||||
ENTER();
|
||||
|
||||
if (CDF_FTM_MODE == hdd_get_conparam()) {
|
||||
hddLog(LOGE, FL("Command not allowed in FTM mode"));
|
||||
return -EINVAL;
|
||||
|
|
@ -9644,10 +9613,8 @@ static int __wlan_hdd_cfg80211_set_pmksa(struct wiphy *wiphy,
|
|||
|
||||
status = wlan_hdd_validate_context(pHddCtx);
|
||||
|
||||
if (0 != status) {
|
||||
hddLog(LOGE, FL("HDD context is not valid"));
|
||||
if (0 != status)
|
||||
return status;
|
||||
}
|
||||
|
||||
halHandle = WLAN_HDD_GET_HAL_CTX(pAdapter);
|
||||
|
||||
|
|
@ -9662,6 +9629,7 @@ static int __wlan_hdd_cfg80211_set_pmksa(struct wiphy *wiphy,
|
|||
TRACE_CODE_HDD_CFG80211_SET_PMKSA,
|
||||
pAdapter->sessionId, result));
|
||||
|
||||
EXIT();
|
||||
return CDF_IS_STATUS_SUCCESS(result) ? 0 : -EINVAL;
|
||||
}
|
||||
|
||||
|
|
@ -9703,6 +9671,8 @@ static int __wlan_hdd_cfg80211_del_pmksa(struct wiphy *wiphy,
|
|||
tHalHandle halHandle;
|
||||
int status = 0;
|
||||
|
||||
ENTER();
|
||||
|
||||
if (CDF_FTM_MODE == hdd_get_conparam()) {
|
||||
hddLog(LOGE, FL("Command not allowed in FTM mode"));
|
||||
return -EINVAL;
|
||||
|
|
@ -9723,10 +9693,8 @@ static int __wlan_hdd_cfg80211_del_pmksa(struct wiphy *wiphy,
|
|||
|
||||
status = wlan_hdd_validate_context(pHddCtx);
|
||||
|
||||
if (0 != status) {
|
||||
hddLog(LOGE, FL("HDD context is not valid"));
|
||||
if (0 != status)
|
||||
return status;
|
||||
}
|
||||
|
||||
halHandle = WLAN_HDD_GET_HAL_CTX(pAdapter);
|
||||
|
||||
|
|
@ -9742,7 +9710,7 @@ static int __wlan_hdd_cfg80211_del_pmksa(struct wiphy *wiphy,
|
|||
MAC_ADDR_ARRAY(pmksa->bssid));
|
||||
status = -EINVAL;
|
||||
}
|
||||
|
||||
EXIT();
|
||||
return status;
|
||||
}
|
||||
|
||||
|
|
@ -9783,6 +9751,8 @@ static int __wlan_hdd_cfg80211_flush_pmksa(struct wiphy *wiphy,
|
|||
tHalHandle halHandle;
|
||||
int status = 0;
|
||||
|
||||
ENTER();
|
||||
|
||||
if (CDF_FTM_MODE == hdd_get_conparam()) {
|
||||
hddLog(LOGE, FL("Command not allowed in FTM mode"));
|
||||
return -EINVAL;
|
||||
|
|
@ -9793,10 +9763,8 @@ static int __wlan_hdd_cfg80211_flush_pmksa(struct wiphy *wiphy,
|
|||
pHddCtx = WLAN_HDD_GET_CTX(pAdapter);
|
||||
status = wlan_hdd_validate_context(pHddCtx);
|
||||
|
||||
if (0 != status) {
|
||||
hddLog(LOGE, FL("HDD context is not valid"));
|
||||
if (0 != status)
|
||||
return status;
|
||||
}
|
||||
|
||||
/* Retrieve halHandle */
|
||||
halHandle = WLAN_HDD_GET_HAL_CTX(pAdapter);
|
||||
|
|
@ -9808,7 +9776,7 @@ static int __wlan_hdd_cfg80211_flush_pmksa(struct wiphy *wiphy,
|
|||
hddLog(LOGE, FL("Cannot flush PMKIDCache"));
|
||||
status = -EINVAL;
|
||||
}
|
||||
|
||||
EXIT();
|
||||
return status;
|
||||
}
|
||||
|
||||
|
|
@ -9851,6 +9819,8 @@ __wlan_hdd_cfg80211_update_ft_ies(struct wiphy *wiphy,
|
|||
hdd_station_ctx_t *pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(pAdapter);
|
||||
int status;
|
||||
|
||||
ENTER();
|
||||
|
||||
status = wlan_hdd_validate_context(hdd_ctx);
|
||||
if (status)
|
||||
return status;
|
||||
|
|
@ -9878,6 +9848,7 @@ __wlan_hdd_cfg80211_update_ft_ies(struct wiphy *wiphy,
|
|||
/* Pass the received FT IEs to SME */
|
||||
sme_set_ft_ies(WLAN_HDD_GET_HAL_CTX(pAdapter), pAdapter->sessionId,
|
||||
(const u8 *)ftie->ie, ftie->ie_len);
|
||||
EXIT();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -9997,10 +9968,8 @@ int __wlan_hdd_cfg80211_set_rekey_data(struct wiphy *wiphy,
|
|||
|
||||
result = wlan_hdd_validate_context(pHddCtx);
|
||||
|
||||
if (0 != result) {
|
||||
hddLog(LOGE, FL("HDD context is not valid"));
|
||||
if (0 != result)
|
||||
return result;
|
||||
}
|
||||
|
||||
pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(pAdapter);
|
||||
hHal = WLAN_HDD_GET_HAL_CTX(pAdapter);
|
||||
|
|
@ -10049,7 +10018,7 @@ int __wlan_hdd_cfg80211_set_rekey_data(struct wiphy *wiphy,
|
|||
hddLog(LOG1,
|
||||
FL("wlan not suspended GTKOffload request is stored"));
|
||||
}
|
||||
|
||||
EXIT();
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
@ -10113,10 +10082,8 @@ static int __wlan_hdd_cfg80211_set_mac_acl(struct wiphy *wiphy,
|
|||
pHddCtx = WLAN_HDD_GET_CTX(pAdapter);
|
||||
status = wlan_hdd_validate_context(pHddCtx);
|
||||
|
||||
if (0 != status) {
|
||||
hddLog(LOGE, FL("HDD context is not valid"));
|
||||
if (0 != status)
|
||||
return status;
|
||||
}
|
||||
|
||||
p_cds_context = pHddCtx->pcds_context;
|
||||
pHostapdState = WLAN_HDD_GET_HOSTAP_STATE_PTR(pAdapter);
|
||||
|
|
@ -10201,7 +10168,7 @@ static int __wlan_hdd_cfg80211_set_mac_acl(struct wiphy *wiphy,
|
|||
pAdapter->device_mode);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
EXIT();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -10243,10 +10210,8 @@ void wlan_hdd_cfg80211_lphb_ind_handler(void *pHddCtx, tSirLPHBInd *lphbInd)
|
|||
|
||||
hddLog(LOGE, FL("LPHB indication arrived"));
|
||||
|
||||
if (0 != wlan_hdd_validate_context((hdd_context_t *) pHddCtx)) {
|
||||
hddLog(LOGE, FL("invalid argument pHddCtx"));
|
||||
if (0 != wlan_hdd_validate_context((hdd_context_t *) pHddCtx))
|
||||
return;
|
||||
}
|
||||
|
||||
if (NULL == lphbInd) {
|
||||
hddLog(LOGE, FL("invalid argument lphbInd"));
|
||||
|
|
@ -10299,6 +10264,8 @@ static int __wlan_hdd_cfg80211_testmode(struct wiphy *wiphy,
|
|||
int err;
|
||||
hdd_context_t *pHddCtx = wiphy_priv(wiphy);
|
||||
|
||||
ENTER();
|
||||
|
||||
err = wlan_hdd_validate_context(pHddCtx);
|
||||
if (err)
|
||||
return err;
|
||||
|
|
@ -10394,7 +10361,7 @@ static int __wlan_hdd_cfg80211_testmode(struct wiphy *wiphy,
|
|||
nla_get_u32(tb[WLAN_HDD_TM_ATTR_CMD]));
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
||||
EXIT();
|
||||
return err;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -65,6 +65,8 @@ static ssize_t __wcnss_wowenable_write(struct file *file,
|
|||
uint8_t wow_pbm = 0;
|
||||
int ret;
|
||||
|
||||
ENTER();
|
||||
|
||||
pAdapter = (hdd_adapter_t *)file->private_data;
|
||||
if ((NULL == pAdapter) || (WLAN_HDD_ADAPTER_MAGIC != pAdapter->magic)) {
|
||||
CDF_TRACE(CDF_MODULE_ID_HDD, CDF_TRACE_LEVEL_FATAL,
|
||||
|
|
@ -145,7 +147,7 @@ static ssize_t __wcnss_wowenable_write(struct file *file,
|
|||
|
||||
return -EFAULT;
|
||||
}
|
||||
|
||||
EXIT();
|
||||
return count;
|
||||
}
|
||||
|
||||
|
|
@ -194,6 +196,8 @@ static ssize_t __wcnss_wowpattern_write(struct file *file,
|
|||
char *pattern_mask;
|
||||
int ret;
|
||||
|
||||
ENTER();
|
||||
|
||||
if ((NULL == pAdapter) || (WLAN_HDD_ADAPTER_MAGIC != pAdapter->magic)) {
|
||||
CDF_TRACE(CDF_MODULE_ID_HDD, CDF_TRACE_LEVEL_FATAL,
|
||||
"%s: Invalid adapter or adapter has invalid magic.",
|
||||
|
|
@ -267,7 +271,7 @@ static ssize_t __wcnss_wowpattern_write(struct file *file,
|
|||
|
||||
hdd_add_wowl_ptrn_debugfs(pAdapter, pattern_idx, pattern_offset,
|
||||
pattern_buf, pattern_mask);
|
||||
|
||||
EXIT();
|
||||
return count;
|
||||
}
|
||||
|
||||
|
|
@ -320,6 +324,7 @@ static ssize_t __wcnss_patterngen_write(struct file *file,
|
|||
CDF_STATUS status;
|
||||
int ret;
|
||||
|
||||
ENTER();
|
||||
|
||||
pAdapter = (hdd_adapter_t *)file->private_data;
|
||||
if ((NULL == pAdapter) || (WLAN_HDD_ADAPTER_MAGIC != pAdapter->magic)) {
|
||||
|
|
@ -493,6 +498,7 @@ static ssize_t __wcnss_patterngen_write(struct file *file,
|
|||
}
|
||||
cdf_mem_free(cmd);
|
||||
cdf_mem_free(addPeriodicTxPtrnParams);
|
||||
EXIT();
|
||||
return count;
|
||||
|
||||
failure:
|
||||
|
|
@ -552,7 +558,7 @@ static int __wcnss_debugfs_open(struct inode *inode, struct file *file)
|
|||
ret = wlan_hdd_validate_context(hdd_ctx);
|
||||
if (0 != ret)
|
||||
return ret;
|
||||
|
||||
EXIT();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -158,9 +158,10 @@ wlan_hdd_cfg80211_extscan_get_capabilities_rsp(void *ctx,
|
|||
|
||||
ENTER();
|
||||
|
||||
if (wlan_hdd_validate_context(hdd_ctx) || !data) {
|
||||
hddLog(LOGE, FL("HDD context is invalid or data(%p) is null"),
|
||||
data);
|
||||
if (wlan_hdd_validate_context(hdd_ctx))
|
||||
return;
|
||||
if (!data) {
|
||||
hddLog(LOGE, FL("data is null"));
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -290,8 +291,10 @@ wlan_hdd_cfg80211_extscan_cached_results_ind(void *ctx,
|
|||
|
||||
ENTER();
|
||||
|
||||
if (wlan_hdd_validate_context(pHddCtx) || !data) {
|
||||
hddLog(LOGE, FL("HDD ctx invalid or data(%p) is null"), data);
|
||||
if (wlan_hdd_validate_context(pHddCtx))
|
||||
return;
|
||||
if (!data) {
|
||||
hddLog(LOGE, FL("data is null"));
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -479,6 +482,7 @@ wlan_hdd_cfg80211_extscan_cached_results_ind(void *ctx,
|
|||
complete(&context->response_event);
|
||||
spin_unlock(&context->context_lock);
|
||||
}
|
||||
EXIT();
|
||||
return;
|
||||
|
||||
fail:
|
||||
|
|
@ -509,8 +513,10 @@ wlan_hdd_cfg80211_extscan_hotlist_match_ind(void *ctx,
|
|||
|
||||
ENTER();
|
||||
|
||||
if (wlan_hdd_validate_context(pHddCtx) || !data) {
|
||||
hddLog(LOGE, FL("HDD ctx invalid or data(%p) is null"), data);
|
||||
if (wlan_hdd_validate_context(pHddCtx))
|
||||
return;
|
||||
if (!data) {
|
||||
hddLog(LOGE, FL("data is null"));
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -613,6 +619,7 @@ wlan_hdd_cfg80211_extscan_hotlist_match_ind(void *ctx,
|
|||
}
|
||||
|
||||
cfg80211_vendor_event(skb, GFP_KERNEL);
|
||||
EXIT();
|
||||
return;
|
||||
|
||||
fail:
|
||||
|
|
@ -641,8 +648,10 @@ wlan_hdd_cfg80211_extscan_signif_wifi_change_results_ind(
|
|||
|
||||
ENTER();
|
||||
|
||||
if (wlan_hdd_validate_context(pHddCtx) || !pData) {
|
||||
hddLog(LOGE, FL("HDD ctx invalid or pData(%p) is null"), pData);
|
||||
if (wlan_hdd_validate_context(pHddCtx))
|
||||
return;
|
||||
if (!pData) {
|
||||
hddLog(LOGE, FL("pData is null"));
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -758,8 +767,10 @@ wlan_hdd_cfg80211_extscan_full_scan_result_event(void *ctx,
|
|||
|
||||
ENTER();
|
||||
|
||||
if (wlan_hdd_validate_context(pHddCtx) || !pData) {
|
||||
hddLog(LOGE, FL("HDD ctx invalid or pData(%p) is null"), pData);
|
||||
if (wlan_hdd_validate_context(pHddCtx))
|
||||
return;
|
||||
if (!pData) {
|
||||
hddLog(LOGE, FL("pData is null"));
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -857,6 +868,7 @@ wlan_hdd_cfg80211_extscan_full_scan_result_event(void *ctx,
|
|||
}
|
||||
|
||||
cfg80211_vendor_event(skb, GFP_KERNEL);
|
||||
EXIT();
|
||||
return;
|
||||
|
||||
nla_put_failure:
|
||||
|
|
@ -881,8 +893,10 @@ wlan_hdd_cfg80211_extscan_scan_res_available_event(
|
|||
|
||||
ENTER();
|
||||
|
||||
if (wlan_hdd_validate_context(pHddCtx) || !pData) {
|
||||
hddLog(LOGE, FL("HDD ctx invalid or pData(%p) is null"), pData);
|
||||
if (wlan_hdd_validate_context(pHddCtx))
|
||||
return;
|
||||
if (!pData) {
|
||||
hddLog(LOGE, FL("pData is null"));
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -911,6 +925,7 @@ wlan_hdd_cfg80211_extscan_scan_res_available_event(
|
|||
}
|
||||
|
||||
cfg80211_vendor_event(skb, GFP_KERNEL);
|
||||
EXIT();
|
||||
return;
|
||||
|
||||
nla_put_failure:
|
||||
|
|
@ -935,8 +950,10 @@ wlan_hdd_cfg80211_extscan_scan_progress_event(void *ctx,
|
|||
|
||||
ENTER();
|
||||
|
||||
if (wlan_hdd_validate_context(pHddCtx) || !pData) {
|
||||
hddLog(LOGE, FL("HDD ctx invalid or pData(%p) is null"), pData);
|
||||
if (wlan_hdd_validate_context(pHddCtx))
|
||||
return;
|
||||
if (!pData) {
|
||||
hddLog(LOGE, FL("pData is null"));
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -967,6 +984,7 @@ wlan_hdd_cfg80211_extscan_scan_progress_event(void *ctx,
|
|||
}
|
||||
|
||||
cfg80211_vendor_event(skb, GFP_KERNEL);
|
||||
EXIT();
|
||||
return;
|
||||
|
||||
nla_put_failure:
|
||||
|
|
@ -994,9 +1012,10 @@ wlan_hdd_cfg80211_extscan_epno_match_found(void *ctx,
|
|||
|
||||
ENTER();
|
||||
|
||||
if (wlan_hdd_validate_context(pHddCtx) || !data) {
|
||||
hddLog(LOGE, FL("HDD context is invalid or data(%p) is null"),
|
||||
data);
|
||||
if (wlan_hdd_validate_context(pHddCtx))
|
||||
return;
|
||||
if (!data) {
|
||||
hddLog(LOGE, FL("data is null"));
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -1106,9 +1125,10 @@ wlan_hdd_cfg80211_passpoint_match_found(void *ctx,
|
|||
|
||||
ENTER();
|
||||
|
||||
if (wlan_hdd_validate_context(pHddCtx) || !data) {
|
||||
hddLog(LOGE, FL("HDD context is invalid or data(%p) is null"),
|
||||
data);
|
||||
if (wlan_hdd_validate_context(pHddCtx))
|
||||
return;
|
||||
if (!data) {
|
||||
hddLog(LOGE, FL("data is null"));
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -1235,10 +1255,10 @@ wlan_hdd_cfg80211_extscan_hotlist_ssid_match_ind(void *ctx,
|
|||
|
||||
ENTER();
|
||||
|
||||
if (wlan_hdd_validate_context(hdd_ctx) || !event) {
|
||||
hddLog(LOGE,
|
||||
FL("HDD context is not valid or event(%p) is null"),
|
||||
event);
|
||||
if (wlan_hdd_validate_context(hdd_ctx))
|
||||
return;
|
||||
if (!event) {
|
||||
hddLog(LOGE, FL("event is null"));
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -1411,10 +1431,10 @@ void wlan_hdd_cfg80211_extscan_callback(void *ctx, const uint16_t evType,
|
|||
{
|
||||
hdd_context_t *pHddCtx = (hdd_context_t *) ctx;
|
||||
|
||||
if (wlan_hdd_validate_context(pHddCtx)) {
|
||||
hddLog(LOGE, FL("HDD ctx invalid received event: %d"), evType);
|
||||
ENTER();
|
||||
|
||||
if (wlan_hdd_validate_context(pHddCtx))
|
||||
return;
|
||||
}
|
||||
|
||||
hddLog(LOG1, FL("Rcvd Event %d"), evType);
|
||||
|
||||
|
|
@ -1489,6 +1509,7 @@ void wlan_hdd_cfg80211_extscan_callback(void *ctx, const uint16_t evType,
|
|||
hddLog(LOGE, FL("Unknown event type %u"), evType);
|
||||
break;
|
||||
}
|
||||
EXIT();
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -1538,10 +1559,8 @@ static int wlan_hdd_send_ext_scan_capability(hdd_context_t *hdd_ctx)
|
|||
uint32_t nl_buf_len;
|
||||
|
||||
ret = wlan_hdd_validate_context(hdd_ctx);
|
||||
if (0 != ret) {
|
||||
hddLog(LOGE, FL("hdd_context is invalid"));
|
||||
if (0 != ret)
|
||||
return ret;
|
||||
}
|
||||
|
||||
data = &(ext_scan_context.capability_response);
|
||||
|
||||
|
|
@ -1678,10 +1697,8 @@ static int __wlan_hdd_cfg80211_extscan_get_capabilities(struct wiphy *wiphy,
|
|||
}
|
||||
|
||||
ret = wlan_hdd_validate_context(pHddCtx);
|
||||
if (0 != ret) {
|
||||
hddLog(LOGE, FL("HDD context is not valid"));
|
||||
if (0 != ret)
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (nla_parse(tb, QCA_WLAN_VENDOR_ATTR_EXTSCAN_SUBCMD_CONFIG_PARAM_MAX,
|
||||
data, data_len, wlan_hdd_extscan_config_policy)) {
|
||||
|
|
@ -1731,7 +1748,7 @@ static int __wlan_hdd_cfg80211_extscan_get_capabilities(struct wiphy *wiphy,
|
|||
ret = wlan_hdd_send_ext_scan_capability(pHddCtx);
|
||||
if (ret)
|
||||
hddLog(LOGE, FL("Failed to send ext scan capability to user space"));
|
||||
|
||||
EXIT();
|
||||
return ret;
|
||||
fail:
|
||||
cdf_mem_free(pReqMsg);
|
||||
|
|
@ -1814,10 +1831,8 @@ static int __wlan_hdd_cfg80211_extscan_get_cached_results(struct wiphy *wiphy,
|
|||
}
|
||||
|
||||
retval = wlan_hdd_validate_context(pHddCtx);
|
||||
if (0 != retval) {
|
||||
hddLog(LOGE, FL("HDD context is not valid"));
|
||||
if (0 != retval)
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (nla_parse(tb, PARAM_MAX, data, data_len,
|
||||
wlan_hdd_extscan_config_policy)) {
|
||||
|
|
@ -1877,7 +1892,7 @@ static int __wlan_hdd_cfg80211_extscan_get_cached_results(struct wiphy *wiphy,
|
|||
retval = context->response_status;
|
||||
spin_unlock(&context->context_lock);
|
||||
}
|
||||
|
||||
EXIT();
|
||||
return retval;
|
||||
|
||||
fail:
|
||||
|
|
@ -1964,10 +1979,8 @@ __wlan_hdd_cfg80211_extscan_set_bssid_hotlist(struct wiphy *wiphy,
|
|||
}
|
||||
|
||||
retval = wlan_hdd_validate_context(pHddCtx);
|
||||
if (0 != retval) {
|
||||
hddLog(LOGE, FL("HDD context is not valid"));
|
||||
if (0 != retval)
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (nla_parse(tb, QCA_WLAN_VENDOR_ATTR_EXTSCAN_SUBCMD_CONFIG_PARAM_MAX,
|
||||
data, data_len, wlan_hdd_extscan_config_policy)) {
|
||||
|
|
@ -2092,7 +2105,7 @@ __wlan_hdd_cfg80211_extscan_set_bssid_hotlist(struct wiphy *wiphy,
|
|||
retval = -EINVAL;
|
||||
spin_unlock(&context->context_lock);
|
||||
}
|
||||
|
||||
EXIT();
|
||||
return retval;
|
||||
|
||||
fail:
|
||||
|
|
@ -2163,10 +2176,8 @@ __wlan_hdd_cfg80211_extscan_set_significant_change(struct wiphy *wiphy,
|
|||
}
|
||||
|
||||
retval = wlan_hdd_validate_context(pHddCtx);
|
||||
if (0 != retval) {
|
||||
hddLog(LOGE, FL("HDD context is not valid"));
|
||||
if (0 != retval)
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (nla_parse(tb, QCA_WLAN_VENDOR_ATTR_EXTSCAN_SUBCMD_CONFIG_PARAM_MAX,
|
||||
data, data_len, wlan_hdd_extscan_config_policy)) {
|
||||
|
|
@ -2314,7 +2325,7 @@ __wlan_hdd_cfg80211_extscan_set_significant_change(struct wiphy *wiphy,
|
|||
retval = -EINVAL;
|
||||
spin_unlock(&context->context_lock);
|
||||
}
|
||||
|
||||
EXIT();
|
||||
return retval;
|
||||
|
||||
fail:
|
||||
|
|
@ -2447,10 +2458,8 @@ __wlan_hdd_cfg80211_extscan_get_valid_channels(struct wiphy *wiphy,
|
|||
}
|
||||
|
||||
ret = wlan_hdd_validate_context(pHddCtx);
|
||||
if (0 != ret) {
|
||||
hddLog(LOGE, FL("HDD context is not valid"));
|
||||
if (0 != ret)
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (nla_parse(tb, QCA_WLAN_VENDOR_ATTR_EXTSCAN_SUBCMD_CONFIG_PARAM_MAX,
|
||||
data, data_len, wlan_hdd_extscan_config_policy)) {
|
||||
|
|
@ -2526,8 +2535,9 @@ __wlan_hdd_cfg80211_extscan_get_valid_channels(struct wiphy *wiphy,
|
|||
kfree_skb(reply_skb);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
return cfg80211_vendor_cmd_reply(reply_skb);
|
||||
ret = cfg80211_vendor_cmd_reply(reply_skb);
|
||||
EXIT();
|
||||
return ret;
|
||||
}
|
||||
|
||||
hddLog(LOGE, FL("valid channels: buffer alloc fail"));
|
||||
|
|
@ -3113,10 +3123,8 @@ __wlan_hdd_cfg80211_extscan_start(struct wiphy *wiphy,
|
|||
}
|
||||
|
||||
retval = wlan_hdd_validate_context(pHddCtx);
|
||||
if (0 != retval) {
|
||||
hddLog(LOGE, FL("HDD context is not valid"));
|
||||
if (0 != retval)
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (nla_parse(tb, PARAM_MAX, data, data_len,
|
||||
wlan_hdd_extscan_config_policy)) {
|
||||
|
|
@ -3240,7 +3248,7 @@ __wlan_hdd_cfg80211_extscan_start(struct wiphy *wiphy,
|
|||
retval = -EINVAL;
|
||||
spin_unlock(&context->context_lock);
|
||||
}
|
||||
|
||||
EXIT();
|
||||
return retval;
|
||||
|
||||
fail:
|
||||
|
|
@ -3325,10 +3333,8 @@ __wlan_hdd_cfg80211_extscan_stop(struct wiphy *wiphy,
|
|||
}
|
||||
|
||||
retval = wlan_hdd_validate_context(pHddCtx);
|
||||
if (0 != retval) {
|
||||
hddLog(LOGE, FL("HDD context is not valid"));
|
||||
if (0 != retval)
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (nla_parse(tb, PARAM_MAX, data, data_len,
|
||||
wlan_hdd_extscan_config_policy)) {
|
||||
|
|
@ -3381,7 +3387,7 @@ __wlan_hdd_cfg80211_extscan_stop(struct wiphy *wiphy,
|
|||
retval = -EINVAL;
|
||||
spin_unlock(&context->context_lock);
|
||||
}
|
||||
|
||||
EXIT();
|
||||
return retval;
|
||||
|
||||
fail:
|
||||
|
|
@ -3454,10 +3460,8 @@ __wlan_hdd_cfg80211_extscan_reset_bssid_hotlist(struct wiphy *wiphy,
|
|||
}
|
||||
|
||||
retval = wlan_hdd_validate_context(pHddCtx);
|
||||
if (0 != retval) {
|
||||
hddLog(LOGE, FL("HDD context is not valid"));
|
||||
if (0 != retval)
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (nla_parse(tb, QCA_WLAN_VENDOR_ATTR_EXTSCAN_SUBCMD_CONFIG_PARAM_MAX,
|
||||
data, data_len, wlan_hdd_extscan_config_policy)) {
|
||||
|
|
@ -3512,7 +3516,7 @@ __wlan_hdd_cfg80211_extscan_reset_bssid_hotlist(struct wiphy *wiphy,
|
|||
retval = -EINVAL;
|
||||
spin_unlock(&context->context_lock);
|
||||
}
|
||||
|
||||
EXIT();
|
||||
return retval;
|
||||
|
||||
fail:
|
||||
|
|
@ -3581,10 +3585,8 @@ __wlan_hdd_cfg80211_extscan_reset_significant_change(struct wiphy
|
|||
}
|
||||
|
||||
retval = wlan_hdd_validate_context(pHddCtx);
|
||||
if (0 != retval) {
|
||||
hddLog(LOGE, FL("HDD context is not valid"));
|
||||
if (0 != retval)
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (nla_parse(tb, QCA_WLAN_VENDOR_ATTR_EXTSCAN_SUBCMD_CONFIG_PARAM_MAX,
|
||||
data, data_len, wlan_hdd_extscan_config_policy)) {
|
||||
|
|
@ -3640,7 +3642,7 @@ __wlan_hdd_cfg80211_extscan_reset_significant_change(struct wiphy
|
|||
retval = -EINVAL;
|
||||
spin_unlock(&context->context_lock);
|
||||
}
|
||||
|
||||
EXIT();
|
||||
return retval;
|
||||
|
||||
fail:
|
||||
|
|
@ -4247,10 +4249,8 @@ __wlan_hdd_cfg80211_extscan_set_ssid_hotlist(struct wiphy *wiphy,
|
|||
}
|
||||
|
||||
retval = wlan_hdd_validate_context(hdd_ctx);
|
||||
if (0 != retval) {
|
||||
hddLog(LOGE, FL("HDD context is not valid"));
|
||||
if (0 != retval)
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (nla_parse(tb, PARAM_MAX,
|
||||
data, data_len,
|
||||
|
|
@ -4469,10 +4469,8 @@ __wlan_hdd_cfg80211_extscan_reset_ssid_hotlist(struct wiphy *wiphy,
|
|||
}
|
||||
|
||||
retval = wlan_hdd_validate_context(hdd_ctx);
|
||||
if (0 != retval) {
|
||||
hddLog(LOGE, FL("HDD context is not valid"));
|
||||
if (0 != retval)
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (nla_parse(tb, PARAM_MAX,
|
||||
data, data_len,
|
||||
|
|
|
|||
|
|
@ -539,10 +539,8 @@ static int hdd_stop_bss_link(hdd_adapter_t *pHostapdAdapter,
|
|||
pHddCtx = WLAN_HDD_GET_CTX(pHostapdAdapter);
|
||||
status = wlan_hdd_validate_context(pHddCtx);
|
||||
|
||||
if (0 != status) {
|
||||
hddLog(LOGE, FL("HDD context is not valid"));
|
||||
if (0 != status)
|
||||
return status;
|
||||
}
|
||||
|
||||
if (test_bit(SOFTAP_BSS_STARTED, &pHostapdAdapter->event_flags)) {
|
||||
#ifdef WLAN_FEATURE_MBSSID
|
||||
|
|
@ -2202,12 +2200,12 @@ static __iw_softap_setparam(struct net_device *dev,
|
|||
v_CONTEXT_t p_cds_context;
|
||||
hdd_context_t *hdd_ctx;
|
||||
|
||||
ENTER();
|
||||
|
||||
hdd_ctx = WLAN_HDD_GET_CTX(pHostapdAdapter);
|
||||
ret = wlan_hdd_validate_context(hdd_ctx);
|
||||
if (0 != ret) {
|
||||
hddLog(LOGE, FL("HDD context is not valid ret:%d"), ret);
|
||||
if (0 != ret)
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
hHal = WLAN_HDD_GET_HAL_CTX(pHostapdAdapter);
|
||||
if (!hHal) {
|
||||
|
|
@ -2834,7 +2832,7 @@ static __iw_softap_setparam(struct net_device *dev,
|
|||
ret = -EINVAL;
|
||||
break;
|
||||
}
|
||||
|
||||
EXIT();
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
@ -2865,6 +2863,8 @@ static __iw_softap_getparam(struct net_device *dev,
|
|||
int ret;
|
||||
hdd_context_t *hdd_ctx;
|
||||
|
||||
ENTER();
|
||||
|
||||
hdd_ctx = WLAN_HDD_GET_CTX(pHostapdAdapter);
|
||||
ret = wlan_hdd_validate_context(hdd_ctx);
|
||||
if (0 != ret)
|
||||
|
|
@ -3054,7 +3054,7 @@ static __iw_softap_getparam(struct net_device *dev,
|
|||
break;
|
||||
|
||||
}
|
||||
|
||||
EXIT();
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
@ -3176,6 +3176,8 @@ static __iw_softap_getchannel(struct net_device *dev,
|
|||
int *value = (int *)extra;
|
||||
int ret;
|
||||
|
||||
ENTER();
|
||||
|
||||
hdd_ctx = WLAN_HDD_GET_CTX(pHostapdAdapter);
|
||||
ret = wlan_hdd_validate_context(hdd_ctx);
|
||||
if (0 != ret)
|
||||
|
|
@ -3185,6 +3187,7 @@ static __iw_softap_getchannel(struct net_device *dev,
|
|||
if (test_bit(SOFTAP_BSS_STARTED, &pHostapdAdapter->event_flags))
|
||||
*value = (WLAN_HDD_GET_AP_CTX_PTR(
|
||||
pHostapdAdapter))->operatingChannel;
|
||||
EXIT();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -3216,6 +3219,8 @@ static __iw_softap_set_max_tx_power(struct net_device *dev,
|
|||
tSirMacAddr selfMac = { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF };
|
||||
int ret;
|
||||
|
||||
ENTER();
|
||||
|
||||
if (NULL == value)
|
||||
return -ENOMEM;
|
||||
|
||||
|
|
@ -3236,7 +3241,7 @@ static __iw_softap_set_max_tx_power(struct net_device *dev,
|
|||
hddLog(LOGE, FL("Setting maximum tx power failed"));
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
EXIT();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -3267,6 +3272,8 @@ static __iw_softap_set_tx_power(struct net_device *dev,
|
|||
tSirMacAddr bssid;
|
||||
int ret;
|
||||
|
||||
ENTER();
|
||||
|
||||
hdd_ctx = WLAN_HDD_GET_CTX(pHostapdAdapter);
|
||||
ret = wlan_hdd_validate_context(hdd_ctx);
|
||||
if (0 != ret)
|
||||
|
|
@ -3285,7 +3292,7 @@ static __iw_softap_set_tx_power(struct net_device *dev,
|
|||
hddLog(LOGE, FL("Setting tx power failed"));
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
EXIT();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -3320,6 +3327,8 @@ static __iw_softap_getassoc_stamacaddr(struct net_device *dev,
|
|||
/* maclist_index must be u32 to match userspace */
|
||||
u32 maclist_index;
|
||||
|
||||
ENTER();
|
||||
|
||||
/*
|
||||
* NOTE WELL: this is a "get" ioctl but it uses an even ioctl
|
||||
* number, and even numbered iocts are supposed to have "set"
|
||||
|
|
@ -3377,6 +3386,7 @@ static __iw_softap_getassoc_stamacaddr(struct net_device *dev,
|
|||
ret = -EFAULT;
|
||||
}
|
||||
kfree(buf);
|
||||
EXIT();
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
@ -3649,7 +3659,6 @@ int __iw_get_genie(struct net_device *dev,
|
|||
}
|
||||
#endif
|
||||
|
||||
hddLog(LOG1, FL("getGEN_IE ioctl"));
|
||||
/*
|
||||
* Actually retrieve the RSN IE from CSR.
|
||||
* (We previously sent it down in the CSR Roam Profile.)
|
||||
|
|
@ -3992,7 +4001,7 @@ static int __iw_set_ap_encodeext(struct net_device *dev,
|
|||
vstatus);
|
||||
ret = -EINVAL;
|
||||
}
|
||||
|
||||
EXIT();
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
@ -4219,6 +4228,7 @@ static int __iw_get_ap_freq(struct net_device *dev,
|
|||
fwrq->e = MHZ;
|
||||
}
|
||||
}
|
||||
EXIT();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -5000,6 +5010,8 @@ CDF_STATUS hdd_softap_get_sta_info(hdd_adapter_t *pAdapter, uint8_t *pBuf,
|
|||
const char sta_info_header[] = "staId staAddress";
|
||||
hdd_context_t *hdd_ctx;
|
||||
|
||||
ENTER();
|
||||
|
||||
if (NULL == pAdapter) {
|
||||
CDF_TRACE(CDF_MODULE_ID_HDD, CDF_TRACE_LEVEL_ERROR,
|
||||
"%s: Adapter is NULL", __func__);
|
||||
|
|
@ -5036,6 +5048,7 @@ CDF_STATUS hdd_softap_get_sta_info(hdd_adapter_t *pAdapter, uint8_t *pBuf,
|
|||
break;
|
||||
}
|
||||
}
|
||||
EXIT();
|
||||
return CDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
|
|
@ -5195,6 +5208,8 @@ int __iw_get_softap_linkspeed(struct net_device *dev,
|
|||
CDF_STATUS status = CDF_STATUS_E_FAILURE;
|
||||
int rc, valid, i;
|
||||
|
||||
ENTER();
|
||||
|
||||
hdd_ctx = WLAN_HDD_GET_CTX(pHostapdAdapter);
|
||||
valid = wlan_hdd_validate_context(hdd_ctx);
|
||||
if (0 != valid)
|
||||
|
|
@ -5254,7 +5269,7 @@ int __iw_get_softap_linkspeed(struct net_device *dev,
|
|||
hddLog(LOGE, FL("Unable to encode link speed"));
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
EXIT();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -7813,10 +7828,8 @@ static int __wlan_hdd_cfg80211_add_beacon(struct wiphy *wiphy,
|
|||
pHddCtx = WLAN_HDD_GET_CTX(pAdapter);
|
||||
status = wlan_hdd_validate_context(pHddCtx);
|
||||
|
||||
if (0 != status) {
|
||||
hddLog(LOGE, FL("HDD context is not valid"));
|
||||
if (0 != status)
|
||||
return status;
|
||||
}
|
||||
|
||||
if (!cds_allow_concurrency(pHddCtx,
|
||||
cds_convert_device_mode_to_hdd_type(
|
||||
|
|
@ -7916,10 +7929,8 @@ static int __wlan_hdd_cfg80211_set_beacon(struct wiphy *wiphy,
|
|||
pHddCtx = WLAN_HDD_GET_CTX(pAdapter);
|
||||
status = wlan_hdd_validate_context(pHddCtx);
|
||||
|
||||
if (0 != status) {
|
||||
hddLog(LOGE, FL("HDD context is not valid"));
|
||||
if (0 != status)
|
||||
return status;
|
||||
}
|
||||
|
||||
if ((pAdapter->device_mode == WLAN_HDD_SOFTAP) ||
|
||||
(pAdapter->device_mode == WLAN_HDD_P2P_GO)) {
|
||||
|
|
@ -8022,10 +8033,8 @@ static int __wlan_hdd_cfg80211_stop_ap(struct wiphy *wiphy,
|
|||
|
||||
pHddCtx = WLAN_HDD_GET_CTX(pAdapter);
|
||||
ret = wlan_hdd_validate_context(pHddCtx);
|
||||
if (0 != ret) {
|
||||
hddLog(LOGE, FL("HDD context is not valid"));
|
||||
if (0 != ret)
|
||||
return ret;
|
||||
}
|
||||
|
||||
if (!(pAdapter->device_mode == WLAN_HDD_SOFTAP ||
|
||||
pAdapter->device_mode == WLAN_HDD_P2P_GO)) {
|
||||
|
|
@ -8283,10 +8292,8 @@ static int __wlan_hdd_cfg80211_start_ap(struct wiphy *wiphy,
|
|||
pHddCtx = WLAN_HDD_GET_CTX(pAdapter);
|
||||
status = wlan_hdd_validate_context(pHddCtx);
|
||||
|
||||
if (0 != status) {
|
||||
hddLog(LOGE, FL("HDD context is not valid"));
|
||||
if (0 != status)
|
||||
return status;
|
||||
}
|
||||
|
||||
hddLog(LOG2, FL("pAdapter = %p, Device mode %s(%d)"), pAdapter,
|
||||
hdd_device_mode_to_string(pAdapter->device_mode),
|
||||
|
|
@ -8450,10 +8457,8 @@ static int __wlan_hdd_cfg80211_change_beacon(struct wiphy *wiphy,
|
|||
pHddCtx = WLAN_HDD_GET_CTX(pAdapter);
|
||||
status = wlan_hdd_validate_context(pHddCtx);
|
||||
|
||||
if (0 != status) {
|
||||
hddLog(LOGE, FL("HDD context is not valid"));
|
||||
if (0 != status)
|
||||
return status;
|
||||
}
|
||||
|
||||
if (!(pAdapter->device_mode == WLAN_HDD_SOFTAP ||
|
||||
pAdapter->device_mode == WLAN_HDD_P2P_GO)) {
|
||||
|
|
|
|||
|
|
@ -6134,6 +6134,8 @@ static int hdd_driver_command(hdd_adapter_t *adapter,
|
|||
uint8_t *command = NULL;
|
||||
int ret = 0;
|
||||
|
||||
ENTER();
|
||||
|
||||
if (CDF_FTM_MODE == hdd_get_conparam()) {
|
||||
hddLog(LOGE, FL("Command not allowed in FTM mode"));
|
||||
return -EINVAL;
|
||||
|
|
@ -6176,7 +6178,7 @@ static int hdd_driver_command(hdd_adapter_t *adapter,
|
|||
exit:
|
||||
if (command)
|
||||
kfree(command);
|
||||
|
||||
EXIT();
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
@ -6256,6 +6258,8 @@ static int __hdd_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
|
|||
hdd_context_t *hdd_ctx;
|
||||
int ret;
|
||||
|
||||
ENTER();
|
||||
|
||||
if (dev != adapter->dev) {
|
||||
CDF_TRACE(CDF_MODULE_ID_HDD, CDF_TRACE_LEVEL_FATAL,
|
||||
"%s: HDD adapter/dev inconsistency", __func__);
|
||||
|
|
@ -6280,12 +6284,8 @@ static int __hdd_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
|
|||
|
||||
hdd_ctx = WLAN_HDD_GET_CTX(adapter);
|
||||
ret = wlan_hdd_validate_context(hdd_ctx);
|
||||
if (ret) {
|
||||
CDF_TRACE(CDF_MODULE_ID_HDD, CDF_TRACE_LEVEL_ERROR,
|
||||
"%s: invalid context", __func__);
|
||||
ret = -EBUSY;
|
||||
if (ret)
|
||||
goto exit;
|
||||
}
|
||||
|
||||
switch (cmd) {
|
||||
case (SIOCDEVPRIVATE + 1):
|
||||
|
|
@ -6301,6 +6301,7 @@ static int __hdd_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
|
|||
break;
|
||||
}
|
||||
exit:
|
||||
EXIT();
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -404,8 +404,6 @@ static void hdd_cdf_trace_enable(CDF_MODULE_ID moduleId, uint32_t bitmask)
|
|||
*/
|
||||
int wlan_hdd_validate_context(hdd_context_t *hdd_ctx)
|
||||
{
|
||||
ENTER();
|
||||
|
||||
if (NULL == hdd_ctx || NULL == hdd_ctx->config) {
|
||||
hddLog(LOGE, FL("HDD context is Null"));
|
||||
return -ENODEV;
|
||||
|
|
@ -1380,10 +1378,8 @@ static int __hdd_stop(struct net_device *dev)
|
|||
adapter->sessionId, adapter->device_mode));
|
||||
|
||||
ret = wlan_hdd_validate_context(hdd_ctx);
|
||||
if (0 != ret) {
|
||||
hddLog(LOGE, FL("HDD context is not valid"));
|
||||
if (0 != ret)
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* Nothing to be done if the interface is not opened */
|
||||
if (false == test_bit(DEVICE_IFACE_OPENED, &adapter->event_flags)) {
|
||||
|
|
@ -1608,11 +1604,11 @@ static void __hdd_set_multicast_list(struct net_device *dev)
|
|||
if (CDF_FTM_MODE == hdd_get_conparam())
|
||||
return;
|
||||
|
||||
ENTER();
|
||||
|
||||
status = wlan_hdd_validate_context(hdd_ctx);
|
||||
if (0 != status) {
|
||||
hdd_err("hdd_ctx is not valid");
|
||||
if (0 != status)
|
||||
return;
|
||||
}
|
||||
|
||||
if (dev->flags & IFF_ALLMULTI) {
|
||||
hddLog(CDF_TRACE_LEVEL_INFO,
|
||||
|
|
@ -1669,6 +1665,7 @@ static void __hdd_set_multicast_list(struct net_device *dev)
|
|||
} else {
|
||||
hdd_info("skip mc filtering enable it during cfg80211 suspend");
|
||||
}
|
||||
EXIT();
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -845,6 +845,8 @@ static int wlan_hdd_request_remain_on_channel(struct wiphy *wiphy,
|
|||
int ret;
|
||||
int status = 0;
|
||||
|
||||
ENTER();
|
||||
|
||||
hddLog(LOG1, FL("Device_mode %s(%d)"),
|
||||
hdd_device_mode_to_string(pAdapter->device_mode),
|
||||
pAdapter->device_mode);
|
||||
|
|
@ -859,10 +861,8 @@ static int wlan_hdd_request_remain_on_channel(struct wiphy *wiphy,
|
|||
#endif
|
||||
pHddCtx = WLAN_HDD_GET_CTX(pAdapter);
|
||||
ret = wlan_hdd_validate_context(pHddCtx);
|
||||
if (0 != ret) {
|
||||
hddLog(LOGE, FL("HDD context is not valid"));
|
||||
if (0 != ret)
|
||||
return ret;
|
||||
}
|
||||
if (cds_is_connection_in_progress(
|
||||
(hdd_context_t *) pAdapter->pHddCtx)) {
|
||||
hddLog(LOGE, FL("Connection is in progress"));
|
||||
|
|
@ -950,6 +950,7 @@ static int wlan_hdd_request_remain_on_channel(struct wiphy *wiphy,
|
|||
hdd_debug("scheduling delayed work: no connection/roc active");
|
||||
schedule_delayed_work(&pHddCtx->roc_req_work, 0);
|
||||
}
|
||||
EXIT();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -973,6 +974,8 @@ int __wlan_hdd_cfg80211_remain_on_channel(struct wiphy *wiphy,
|
|||
hdd_context_t *hdd_ctx;
|
||||
int ret;
|
||||
|
||||
ENTER();
|
||||
|
||||
hdd_ctx = WLAN_HDD_GET_CTX(pAdapter);
|
||||
ret = wlan_hdd_validate_context(hdd_ctx);
|
||||
if (0 != ret)
|
||||
|
|
@ -986,12 +989,14 @@ int __wlan_hdd_cfg80211_remain_on_channel(struct wiphy *wiphy,
|
|||
MTRACE(cdf_trace(CDF_MODULE_ID_HDD,
|
||||
TRACE_CODE_HDD_REMAIN_ON_CHANNEL,
|
||||
pAdapter->sessionId, REMAIN_ON_CHANNEL_REQUEST));
|
||||
return wlan_hdd_request_remain_on_channel(wiphy, dev, chan,
|
||||
ret = wlan_hdd_request_remain_on_channel(wiphy, dev, chan,
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0))
|
||||
channel_type,
|
||||
#endif
|
||||
duration, cookie,
|
||||
REMAIN_ON_CHANNEL_REQUEST);
|
||||
EXIT();
|
||||
return ret;
|
||||
}
|
||||
|
||||
int wlan_hdd_cfg80211_remain_on_channel(struct wiphy *wiphy,
|
||||
|
|
@ -1163,7 +1168,7 @@ int __wlan_hdd_cfg80211_cancel_remain_on_channel(struct wiphy *wiphy,
|
|||
cdf_list_node_t *tmp, *q;
|
||||
hdd_roc_req_t *curr_roc_req;
|
||||
|
||||
hddLog(LOG1, "Cancel remain on channel");
|
||||
ENTER();
|
||||
|
||||
if (CDF_FTM_MODE == hdd_get_conparam()) {
|
||||
hddLog(LOGE, FL("Command not allowed in FTM mode"));
|
||||
|
|
@ -1172,11 +1177,8 @@ int __wlan_hdd_cfg80211_cancel_remain_on_channel(struct wiphy *wiphy,
|
|||
|
||||
status = wlan_hdd_validate_context(pHddCtx);
|
||||
|
||||
if (0 != status) {
|
||||
CDF_TRACE(CDF_MODULE_ID_HDD, CDF_TRACE_LEVEL_ERROR,
|
||||
"%s: HDD context is not valid", __func__);
|
||||
if (0 != status)
|
||||
return status;
|
||||
}
|
||||
cdf_spin_lock(&pHddCtx->hdd_roc_req_q_lock);
|
||||
list_for_each_safe(tmp, q, &pHddCtx->hdd_roc_req_q.anchor) {
|
||||
curr_roc_req = list_entry(tmp, hdd_roc_req_t, node);
|
||||
|
|
@ -1287,6 +1289,7 @@ int __wlan_hdd_cfg80211_cancel_remain_on_channel(struct wiphy *wiphy,
|
|||
__func__);
|
||||
}
|
||||
hdd_allow_suspend(WIFI_POWER_EVENT_WAKELOCK_ROC);
|
||||
EXIT();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -1355,6 +1358,8 @@ int __wlan_hdd_mgmt_tx(struct wiphy *wiphy, struct net_device *dev,
|
|||
hdd_adapter_t *goAdapter;
|
||||
uint16_t current_freq;
|
||||
|
||||
ENTER();
|
||||
|
||||
if (CDF_FTM_MODE == hdd_get_conparam()) {
|
||||
hddLog(LOGE, FL("Command not allowed in FTM mode"));
|
||||
return -EINVAL;
|
||||
|
|
@ -1365,11 +1370,8 @@ int __wlan_hdd_mgmt_tx(struct wiphy *wiphy, struct net_device *dev,
|
|||
pAdapter->device_mode));
|
||||
status = wlan_hdd_validate_context(pHddCtx);
|
||||
|
||||
if (0 != status) {
|
||||
CDF_TRACE(CDF_MODULE_ID_HDD, CDF_TRACE_LEVEL_ERROR,
|
||||
"%s: HDD context is not valid", __func__);
|
||||
if (0 != status)
|
||||
return status;
|
||||
}
|
||||
|
||||
hddLog(LOG1, FL("Device_mode %s(%d) type: %d"),
|
||||
hdd_device_mode_to_string(pAdapter->device_mode),
|
||||
|
|
@ -1717,6 +1719,7 @@ err_rem_channel:
|
|||
pAdapter->dev,
|
||||
#endif
|
||||
*cookie, buf, len, false, GFP_KERNEL);
|
||||
EXIT();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -2134,10 +2137,8 @@ struct net_device *__wlan_hdd_add_virtual_intf(struct wiphy *wiphy, char *name,
|
|||
}
|
||||
|
||||
ret = wlan_hdd_validate_context(pHddCtx);
|
||||
if (0 != ret) {
|
||||
hddLog(CDF_TRACE_LEVEL_ERROR, FL("HDD context is not valid"));
|
||||
if (0 != ret)
|
||||
return ERR_PTR(ret);
|
||||
}
|
||||
|
||||
MTRACE(cdf_trace(CDF_MODULE_ID_HDD,
|
||||
TRACE_CODE_HDD_ADD_VIRTUAL_INTF, NO_SESSION, type));
|
||||
|
|
@ -2278,11 +2279,8 @@ int __wlan_hdd_del_virtual_intf(struct wiphy *wiphy, struct net_device *dev)
|
|||
|
||||
status = wlan_hdd_validate_context(pHddCtx);
|
||||
|
||||
if (0 != status) {
|
||||
CDF_TRACE(CDF_MODULE_ID_HDD, CDF_TRACE_LEVEL_ERROR,
|
||||
"%s: HDD context is not valid", __func__);
|
||||
if (0 != status)
|
||||
return status;
|
||||
}
|
||||
|
||||
wlan_hdd_release_intf_addr(pHddCtx,
|
||||
pVirtAdapter->macAddressCurrent.bytes);
|
||||
|
|
|
|||
|
|
@ -214,6 +214,8 @@ static int __wlan_hdd_ipv6_changed(struct notifier_block *nb,
|
|||
hdd_context_t *pHddCtx;
|
||||
int status;
|
||||
|
||||
ENTER();
|
||||
|
||||
if ((pAdapter == NULL) || (WLAN_HDD_ADAPTER_MAGIC != pAdapter->magic)) {
|
||||
hddLog(LOGE, FL("Adapter context is invalid %p"), pAdapter);
|
||||
return -EINVAL;
|
||||
|
|
@ -224,14 +226,12 @@ static int __wlan_hdd_ipv6_changed(struct notifier_block *nb,
|
|||
pAdapter->device_mode == WLAN_HDD_P2P_CLIENT)) {
|
||||
pHddCtx = WLAN_HDD_GET_CTX(pAdapter);
|
||||
status = wlan_hdd_validate_context(pHddCtx);
|
||||
if (0 != status) {
|
||||
hddLog(LOGE, FL("HDD context is invalid"));
|
||||
if (0 != status)
|
||||
return NOTIFY_DONE;
|
||||
}
|
||||
|
||||
schedule_work(&pAdapter->ipv6NotifierWorkQueue);
|
||||
}
|
||||
|
||||
EXIT();
|
||||
return NOTIFY_DONE;
|
||||
}
|
||||
|
||||
|
|
@ -436,14 +436,12 @@ void __hdd_ipv6_notifier_work_queue(struct work_struct *work)
|
|||
hdd_context_t *pHddCtx;
|
||||
int status;
|
||||
|
||||
hddLog(LOG1, FL("Reconfiguring NS Offload"));
|
||||
ENTER();
|
||||
|
||||
pHddCtx = WLAN_HDD_GET_CTX(pAdapter);
|
||||
status = wlan_hdd_validate_context(pHddCtx);
|
||||
if (0 != status) {
|
||||
hddLog(LOGE, FL("HDD context is invalid"));
|
||||
if (0 != status)
|
||||
return;
|
||||
}
|
||||
|
||||
if (!pHddCtx->config->active_mode_offload) {
|
||||
hdd_err("Active mode offload is disabled");
|
||||
|
|
@ -460,6 +458,7 @@ void __hdd_ipv6_notifier_work_queue(struct work_struct *work)
|
|||
(WLAN_HDD_GET_STATION_CTX_PTR(pAdapter))->conn_info.connState))
|
||||
if (pHddCtx->config->fhostNSOffload)
|
||||
hdd_conf_ns_offload(pAdapter, true);
|
||||
EXIT();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -489,6 +488,8 @@ void hdd_conf_hostoffload(hdd_adapter_t *pAdapter, bool fenable)
|
|||
{
|
||||
hdd_context_t *pHddCtx;
|
||||
|
||||
ENTER();
|
||||
|
||||
hdd_info("Configuring offloads with flag: %d", fenable);
|
||||
|
||||
/* Get the HDD context. */
|
||||
|
|
@ -519,6 +520,8 @@ void hdd_conf_hostoffload(hdd_adapter_t *pAdapter, bool fenable)
|
|||
if (pHddCtx->config->fhostNSOffload)
|
||||
hdd_conf_ns_offload(pAdapter, fenable);
|
||||
}
|
||||
EXIT();
|
||||
EXIT();
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
|
@ -603,6 +606,8 @@ static int __wlan_hdd_ipv4_changed(struct notifier_block *nb,
|
|||
hdd_context_t *pHddCtx;
|
||||
int status;
|
||||
|
||||
ENTER();
|
||||
|
||||
if ((pAdapter == NULL) || (WLAN_HDD_ADAPTER_MAGIC != pAdapter->magic)) {
|
||||
hddLog(LOGE, FL("Adapter context is invalid %p"), pAdapter);
|
||||
return -EINVAL;
|
||||
|
|
@ -614,10 +619,8 @@ static int __wlan_hdd_ipv4_changed(struct notifier_block *nb,
|
|||
|
||||
pHddCtx = WLAN_HDD_GET_CTX(pAdapter);
|
||||
status = wlan_hdd_validate_context(pHddCtx);
|
||||
if (0 != status) {
|
||||
hddLog(LOGE, FL("HDD context is invalid"));
|
||||
if (0 != status)
|
||||
return NOTIFY_DONE;
|
||||
}
|
||||
|
||||
if (!pHddCtx->config->fhostArpOffload) {
|
||||
hddLog(LOG1,
|
||||
|
|
@ -640,7 +643,7 @@ static int __wlan_hdd_ipv4_changed(struct notifier_block *nb,
|
|||
schedule_work(&pAdapter->ipv4NotifierWorkQueue);
|
||||
}
|
||||
}
|
||||
|
||||
EXIT();
|
||||
return NOTIFY_DONE;
|
||||
}
|
||||
|
||||
|
|
@ -1743,10 +1746,8 @@ static int __wlan_hdd_cfg80211_resume_wlan(struct wiphy *wiphy)
|
|||
}
|
||||
|
||||
result = wlan_hdd_validate_context(pHddCtx);
|
||||
if (0 != result) {
|
||||
hddLog(LOGE, FL("HDD context is not valid"));
|
||||
if (0 != result)
|
||||
return result;
|
||||
}
|
||||
#ifdef CONFIG_CNSS
|
||||
cnss_request_bus_bandwidth(CNSS_BUS_WIDTH_MEDIUM);
|
||||
#endif
|
||||
|
|
@ -1803,7 +1804,7 @@ static int __wlan_hdd_cfg80211_resume_wlan(struct wiphy *wiphy)
|
|||
|
||||
hddLog(LOG1,
|
||||
FL("cfg80211 scan result database updated"));
|
||||
|
||||
EXIT();
|
||||
return result;
|
||||
}
|
||||
status = hdd_get_next_adapter(pHddCtx, pAdapterNode, &pNext);
|
||||
|
|
@ -1811,6 +1812,7 @@ static int __wlan_hdd_cfg80211_resume_wlan(struct wiphy *wiphy)
|
|||
}
|
||||
|
||||
hddLog(LOG1, FL("Failed to find Adapter"));
|
||||
EXIT();
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
@ -1880,10 +1882,8 @@ static int __wlan_hdd_cfg80211_suspend_wlan(struct wiphy *wiphy,
|
|||
}
|
||||
|
||||
rc = wlan_hdd_validate_context(pHddCtx);
|
||||
if (0 != rc) {
|
||||
hddLog(LOGE, FL("HDD context is not valid"));
|
||||
if (0 != rc)
|
||||
return rc;
|
||||
}
|
||||
|
||||
/* If RADAR detection is in progress (HDD), prevent suspend. The flag
|
||||
* "dfs_cac_block_tx" is set to true when RADAR is found and stay true
|
||||
|
|
@ -2108,10 +2108,8 @@ static int __wlan_hdd_cfg80211_set_power_mgmt(struct wiphy *wiphy,
|
|||
pHddCtx = WLAN_HDD_GET_CTX(pAdapter);
|
||||
status = wlan_hdd_validate_context(pHddCtx);
|
||||
|
||||
if (0 != status) {
|
||||
hddLog(LOGE, FL("HDD context is not valid"));
|
||||
if (0 != status)
|
||||
return status;
|
||||
}
|
||||
|
||||
if ((DRIVER_POWER_MODE_AUTO == !mode) &&
|
||||
(true == pHddCtx->hdd_wlan_suspended) &&
|
||||
|
|
@ -2203,10 +2201,8 @@ static int __wlan_hdd_cfg80211_set_txpower(struct wiphy *wiphy,
|
|||
NO_SESSION, type));
|
||||
|
||||
status = wlan_hdd_validate_context(pHddCtx);
|
||||
if (0 != status) {
|
||||
hddLog(LOGE, FL("HDD context is not valid"));
|
||||
if (0 != status)
|
||||
return status;
|
||||
}
|
||||
|
||||
hHal = pHddCtx->hHal;
|
||||
|
||||
|
|
@ -2300,7 +2296,6 @@ static int __wlan_hdd_cfg80211_get_txpower(struct wiphy *wiphy,
|
|||
|
||||
status = wlan_hdd_validate_context(pHddCtx);
|
||||
if (0 != status) {
|
||||
hddLog(LOGE, FL("HDD context is not valid"));
|
||||
*dbm = 0;
|
||||
return status;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -723,9 +723,6 @@ static int __iw_set_scan(struct net_device *dev, struct iw_request_info *info,
|
|||
if (0 != ret)
|
||||
return ret;
|
||||
|
||||
CDF_TRACE(CDF_MODULE_ID_HDD, CDF_TRACE_LEVEL_INFO, "%s: enter !!!",
|
||||
__func__);
|
||||
|
||||
/* Block All Scan during DFS operation and send null scan result */
|
||||
con_sap_adapter = hdd_get_con_sap_adapter(pAdapter, true);
|
||||
if (con_sap_adapter) {
|
||||
|
|
@ -850,8 +847,6 @@ error:
|
|||
if ((wrqu->data.flags & IW_SCAN_THIS_ESSID) && (scanReq->essid_len))
|
||||
cdf_mem_free(scanRequest.SSIDs.SSIDList);
|
||||
EXIT();
|
||||
CDF_TRACE(CDF_MODULE_ID_HDD, CDF_TRACE_LEVEL_INFO, "%s: exit !!!",
|
||||
__func__);
|
||||
return status;
|
||||
}
|
||||
|
||||
|
|
@ -950,9 +945,9 @@ static int __iw_get_scan(struct net_device *dev,
|
|||
|
||||
sme_scan_result_purge(hHal, pResult);
|
||||
|
||||
EXIT();
|
||||
CDF_TRACE(CDF_MODULE_ID_HDD, CDF_TRACE_LEVEL_INFO,
|
||||
"%s: exit total %d BSS reported !!!", __func__, i);
|
||||
EXIT();
|
||||
return status;
|
||||
}
|
||||
|
||||
|
|
@ -1266,10 +1261,8 @@ static int __wlan_hdd_cfg80211_scan(struct wiphy *wiphy,
|
|||
|
||||
status = wlan_hdd_validate_context(pHddCtx);
|
||||
|
||||
if (0 != status) {
|
||||
hddLog(LOGE, FL("HDD context is not valid"));
|
||||
if (0 != status)
|
||||
return status;
|
||||
}
|
||||
|
||||
cfg_param = pHddCtx->config;
|
||||
pScanInfo = &pAdapter->scan_info;
|
||||
|
|
@ -2043,6 +2036,8 @@ static int __wlan_hdd_cfg80211_sched_scan_start(struct wiphy *wiphy,
|
|||
struct hdd_config *config = NULL;
|
||||
uint32_t num_ignore_dfs_ch = 0;
|
||||
|
||||
ENTER();
|
||||
|
||||
if (CDF_FTM_MODE == hdd_get_conparam()) {
|
||||
hddLog(LOGE, FL("Command not allowed in FTM mode"));
|
||||
return -EINVAL;
|
||||
|
|
@ -2051,10 +2046,8 @@ static int __wlan_hdd_cfg80211_sched_scan_start(struct wiphy *wiphy,
|
|||
pHddCtx = WLAN_HDD_GET_CTX(pAdapter);
|
||||
ret = wlan_hdd_validate_context(pHddCtx);
|
||||
|
||||
if (0 != ret) {
|
||||
hddLog(LOGE, FL("HDD context is not valid"));
|
||||
if (0 != ret)
|
||||
return ret;
|
||||
}
|
||||
|
||||
config = pHddCtx->config;
|
||||
hHal = WLAN_HDD_GET_HAL_CTX(pAdapter);
|
||||
|
|
@ -2294,6 +2287,7 @@ static int __wlan_hdd_cfg80211_sched_scan_start(struct wiphy *wiphy,
|
|||
|
||||
error:
|
||||
cdf_mem_free(pPnoRequest);
|
||||
EXIT();
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -631,13 +631,13 @@ static void hdd_link_layer_process_peer_stats(hdd_adapter_t *pAdapter,
|
|||
struct nlattr *peers;
|
||||
int numRate;
|
||||
|
||||
ENTER();
|
||||
|
||||
pWifiPeerStat = pData;
|
||||
|
||||
status = wlan_hdd_validate_context(pHddCtx);
|
||||
if (0 != status) {
|
||||
hddLog(CDF_TRACE_LEVEL_ERROR, FL("HDD context is not valid"));
|
||||
if (0 != status)
|
||||
return;
|
||||
}
|
||||
|
||||
hddLog(CDF_TRACE_LEVEL_INFO,
|
||||
"LL_STATS_PEER_ALL : numPeers %u, more data = %u",
|
||||
|
|
@ -779,6 +779,7 @@ static void hdd_link_layer_process_peer_stats(hdd_adapter_t *pAdapter,
|
|||
nla_nest_end(vendor_event, peerInfo);
|
||||
}
|
||||
cfg80211_vendor_cmd_reply(vendor_event);
|
||||
EXIT();
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -804,13 +805,13 @@ static void hdd_link_layer_process_iface_stats(hdd_adapter_t *pAdapter,
|
|||
int status;
|
||||
int i;
|
||||
|
||||
ENTER();
|
||||
|
||||
pWifiIfaceStat = pData;
|
||||
|
||||
status = wlan_hdd_validate_context(pHddCtx);
|
||||
if (0 != status) {
|
||||
hddLog(CDF_TRACE_LEVEL_ERROR, FL("HDD context is not valid"));
|
||||
if (0 != status)
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* Allocate a size of 4096 for the interface stats comprising
|
||||
|
|
@ -931,6 +932,7 @@ static void hdd_link_layer_process_iface_stats(hdd_adapter_t *pAdapter,
|
|||
}
|
||||
|
||||
cfg80211_vendor_cmd_reply(vendor_event);
|
||||
EXIT();
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -958,12 +960,12 @@ static void hdd_link_layer_process_radio_stats(hdd_adapter_t *pAdapter,
|
|||
struct sk_buff *vendor_event;
|
||||
hdd_context_t *pHddCtx = WLAN_HDD_GET_CTX(pAdapter);
|
||||
|
||||
ENTER();
|
||||
|
||||
pWifiRadioStat = pData;
|
||||
status = wlan_hdd_validate_context(pHddCtx);
|
||||
if (0 != status) {
|
||||
hddLog(CDF_TRACE_LEVEL_ERROR, FL("HDD context is not valid"));
|
||||
if (0 != status)
|
||||
return;
|
||||
}
|
||||
|
||||
hddLog(CDF_TRACE_LEVEL_INFO,
|
||||
"LL_STATS_RADIO"
|
||||
|
|
@ -1126,6 +1128,7 @@ static void hdd_link_layer_process_radio_stats(hdd_adapter_t *pAdapter,
|
|||
nla_nest_end(vendor_event, chList);
|
||||
}
|
||||
cfg80211_vendor_cmd_reply(vendor_event);
|
||||
EXIT();
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -1312,16 +1315,16 @@ __wlan_hdd_cfg80211_ll_stats_set(struct wiphy *wiphy,
|
|||
hdd_adapter_t *pAdapter = WLAN_HDD_GET_PRIV_PTR(dev);
|
||||
hdd_context_t *pHddCtx = wiphy_priv(wiphy);
|
||||
|
||||
ENTER();
|
||||
|
||||
if (CDF_FTM_MODE == hdd_get_conparam()) {
|
||||
hdd_err("Command not allowed in FTM mode");
|
||||
return -EPERM;
|
||||
}
|
||||
|
||||
status = wlan_hdd_validate_context(pHddCtx);
|
||||
if (0 != status) {
|
||||
hddLog(CDF_TRACE_LEVEL_ERROR, FL("HDD context is not valid"));
|
||||
if (0 != status)
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (nla_parse(tb_vendor, QCA_WLAN_VENDOR_ATTR_LL_STATS_SET_MAX,
|
||||
(struct nlattr *)data,
|
||||
|
|
@ -1376,7 +1379,7 @@ __wlan_hdd_cfg80211_ll_stats_set(struct wiphy *wiphy,
|
|||
}
|
||||
|
||||
pAdapter->isLinkLayerStatsSet = 1;
|
||||
|
||||
EXIT();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -1443,16 +1446,16 @@ __wlan_hdd_cfg80211_ll_stats_get(struct wiphy *wiphy,
|
|||
hdd_adapter_t *pAdapter = WLAN_HDD_GET_PRIV_PTR(dev);
|
||||
int status;
|
||||
|
||||
ENTER();
|
||||
|
||||
if (CDF_FTM_MODE == hdd_get_conparam()) {
|
||||
hdd_err("Command not allowed in FTM mode");
|
||||
return -EPERM;
|
||||
}
|
||||
|
||||
status = wlan_hdd_validate_context(pHddCtx);
|
||||
if (0 != status) {
|
||||
hddLog(CDF_TRACE_LEVEL_ERROR, FL("HDD context is not valid"));
|
||||
if (0 != status)
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (!pAdapter->isLinkLayerStatsSet) {
|
||||
hddLog(CDF_TRACE_LEVEL_FATAL,
|
||||
|
|
@ -1517,7 +1520,7 @@ __wlan_hdd_cfg80211_ll_stats_get(struct wiphy *wiphy,
|
|||
context->request_id, context->request_bitmap);
|
||||
return -ETIMEDOUT;
|
||||
}
|
||||
|
||||
EXIT();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -1578,16 +1581,16 @@ __wlan_hdd_cfg80211_ll_stats_clear(struct wiphy *wiphy,
|
|||
int status;
|
||||
struct sk_buff *temp_skbuff;
|
||||
|
||||
ENTER();
|
||||
|
||||
if (CDF_FTM_MODE == hdd_get_conparam()) {
|
||||
hdd_err("Command not allowed in FTM mode");
|
||||
return -EPERM;
|
||||
}
|
||||
|
||||
status = wlan_hdd_validate_context(pHddCtx);
|
||||
if (0 != status) {
|
||||
hddLog(CDF_TRACE_LEVEL_ERROR, FL("HDD context is not valid"));
|
||||
if (0 != status)
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (!pAdapter->isLinkLayerStatsSet) {
|
||||
hddLog(CDF_TRACE_LEVEL_FATAL,
|
||||
|
|
@ -1668,6 +1671,7 @@ __wlan_hdd_cfg80211_ll_stats_clear(struct wiphy *wiphy,
|
|||
|
||||
return cfg80211_vendor_cmd_reply(temp_skbuff);
|
||||
}
|
||||
EXIT();
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
|
|
@ -1925,10 +1929,8 @@ static int __wlan_hdd_cfg80211_get_station(struct wiphy *wiphy,
|
|||
|
||||
status = wlan_hdd_validate_context(pHddCtx);
|
||||
|
||||
if (0 != status) {
|
||||
hddLog(LOGE, FL("HDD context is not valid"));
|
||||
if (0 != status)
|
||||
return status;
|
||||
}
|
||||
|
||||
wlan_hdd_get_rssi(pAdapter, &sinfo->signal);
|
||||
sinfo->filled |= STATION_INFO_SIGNAL;
|
||||
|
|
@ -2415,10 +2417,8 @@ static int __wlan_hdd_cfg80211_dump_survey(struct wiphy *wiphy,
|
|||
pHddCtx = WLAN_HDD_GET_CTX(pAdapter);
|
||||
status = wlan_hdd_validate_context(pHddCtx);
|
||||
|
||||
if (0 != status) {
|
||||
hddLog(LOGE, FL("HDD context is not valid"));
|
||||
if (0 != status)
|
||||
return status;
|
||||
}
|
||||
|
||||
pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(pAdapter);
|
||||
|
||||
|
|
@ -2484,7 +2484,7 @@ static int __wlan_hdd_cfg80211_dump_survey(struct wiphy *wiphy,
|
|||
pAdapter->survey_idx = 0;
|
||||
return -ENONET;
|
||||
}
|
||||
|
||||
EXIT();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -286,6 +286,8 @@ static void wlan_hdd_tdls_discovery_timeout_peer_cb(void *userData)
|
|||
tdlsCtx_t *pHddTdlsCtx;
|
||||
hdd_context_t *pHddCtx;
|
||||
|
||||
ENTER();
|
||||
|
||||
pHddTdlsCtx = (tdlsCtx_t *) userData;
|
||||
|
||||
if ((NULL == pHddTdlsCtx) || (NULL == pHddTdlsCtx->pAdapter)) {
|
||||
|
|
@ -300,13 +302,7 @@ static void wlan_hdd_tdls_discovery_timeout_peer_cb(void *userData)
|
|||
}
|
||||
|
||||
pHddCtx = WLAN_HDD_GET_CTX(pHddTdlsCtx->pAdapter);
|
||||
if (0 != (wlan_hdd_validate_context(pHddCtx))) {
|
||||
CDF_TRACE(CDF_MODULE_ID_HDD, CDF_TRACE_LEVEL_ERROR,
|
||||
FL("pHddCtx is not valid"));
|
||||
return;
|
||||
}
|
||||
|
||||
if (NULL == pHddCtx)
|
||||
if (0 != (wlan_hdd_validate_context(pHddCtx)))
|
||||
return;
|
||||
|
||||
mutex_lock(&pHddCtx->tdls_lock);
|
||||
|
|
@ -333,7 +329,7 @@ static void wlan_hdd_tdls_discovery_timeout_peer_cb(void *userData)
|
|||
wlan_hdd_tdls_check_power_save_prohibited(pHddTdlsCtx->pAdapter);
|
||||
|
||||
mutex_unlock(&pHddCtx->tdls_lock);
|
||||
|
||||
EXIT();
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -831,11 +827,8 @@ hddTdlsPeer_t *wlan_hdd_tdls_get_peer(hdd_adapter_t *pAdapter, const u8 *mac)
|
|||
tdlsCtx_t *pHddTdlsCtx;
|
||||
hdd_context_t *pHddCtx = WLAN_HDD_GET_CTX(pAdapter);
|
||||
|
||||
if (0 != (wlan_hdd_validate_context(pHddCtx))) {
|
||||
CDF_TRACE(CDF_MODULE_ID_HDD, CDF_TRACE_LEVEL_ERROR,
|
||||
FL("pHddCtx is not valid"));
|
||||
if (0 != (wlan_hdd_validate_context(pHddCtx)))
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* if already there, just update */
|
||||
peer = wlan_hdd_tdls_find_peer(pAdapter, mac, true);
|
||||
|
|
@ -1027,6 +1020,8 @@ int wlan_hdd_tdls_recv_discovery_resp(hdd_adapter_t *pAdapter,
|
|||
tdlsCtx_t *pHddTdlsCtx = WLAN_HDD_GET_TDLS_CTX_PTR(pAdapter);
|
||||
hdd_context_t *pHddCtx;
|
||||
|
||||
ENTER();
|
||||
|
||||
if (NULL == pHddTdlsCtx) {
|
||||
hddLog(LOGE, FL("pHddTdlsCtx is NULL"));
|
||||
return -EINVAL;
|
||||
|
|
@ -1034,10 +1029,8 @@ int wlan_hdd_tdls_recv_discovery_resp(hdd_adapter_t *pAdapter,
|
|||
|
||||
pHddCtx = WLAN_HDD_GET_CTX(pHddTdlsCtx->pAdapter);
|
||||
|
||||
if (0 != (wlan_hdd_validate_context(pHddCtx))) {
|
||||
hddLog(LOGE, FL("pHddCtx is not valid"));
|
||||
if (0 != (wlan_hdd_validate_context(pHddCtx)))
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
curr_peer = wlan_hdd_tdls_get_peer(pAdapter, mac);
|
||||
if (NULL == curr_peer) {
|
||||
|
|
@ -1102,6 +1095,7 @@ int wlan_hdd_tdls_recv_discovery_resp(hdd_adapter_t *pAdapter,
|
|||
}
|
||||
|
||||
curr_peer->tdls_support = eTDLS_CAP_SUPPORTED;
|
||||
EXIT();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -1465,13 +1459,12 @@ void wlan_hdd_tdls_set_mode(hdd_context_t *pHddCtx,
|
|||
hdd_adapter_t *pAdapter;
|
||||
tdlsCtx_t *pHddTdlsCtx;
|
||||
|
||||
ENTER();
|
||||
|
||||
hddLog(LOG1, "%s mode %d", __func__, (int)tdls_mode);
|
||||
|
||||
if (0 != (wlan_hdd_validate_context(pHddCtx))) {
|
||||
CDF_TRACE(CDF_MODULE_ID_HDD, CDF_TRACE_LEVEL_ERROR,
|
||||
FL("pHddCtx is not valid"));
|
||||
if (0 != (wlan_hdd_validate_context(pHddCtx)))
|
||||
return;
|
||||
}
|
||||
|
||||
mutex_lock(&pHddCtx->tdls_lock);
|
||||
|
||||
|
|
@ -1505,6 +1498,7 @@ void wlan_hdd_tdls_set_mode(hdd_context_t *pHddCtx,
|
|||
pHddCtx->tdls_mode = tdls_mode;
|
||||
|
||||
mutex_unlock(&pHddCtx->tdls_lock);
|
||||
EXIT();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -1872,11 +1866,10 @@ hddTdlsPeer_t *wlan_hdd_tdls_find_peer(hdd_adapter_t *pAdapter,
|
|||
tdlsCtx_t *pHddTdlsCtx;
|
||||
hdd_context_t *pHddCtx = WLAN_HDD_GET_CTX(pAdapter);
|
||||
|
||||
if (0 != (wlan_hdd_validate_context(pHddCtx))) {
|
||||
CDF_TRACE(CDF_MODULE_ID_HDD, CDF_TRACE_LEVEL_ERROR,
|
||||
FL("pHddCtx is not valid"));
|
||||
ENTER();
|
||||
|
||||
if (0 != (wlan_hdd_validate_context(pHddCtx)))
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (mutexLock) {
|
||||
mutex_lock(&pHddCtx->tdls_lock);
|
||||
|
|
@ -1905,6 +1898,7 @@ hddTdlsPeer_t *wlan_hdd_tdls_find_peer(hdd_adapter_t *pAdapter,
|
|||
}
|
||||
if (mutexLock)
|
||||
mutex_unlock(&pHddCtx->tdls_lock);
|
||||
EXIT();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
@ -2042,11 +2036,10 @@ int wlan_hdd_tdls_get_all_peers(hdd_adapter_t *pAdapter, char *buf, int buflen)
|
|||
tdlsCtx_t *pHddTdlsCtx;
|
||||
hdd_context_t *pHddCtx = WLAN_HDD_GET_CTX(pAdapter);
|
||||
|
||||
if (0 != (wlan_hdd_validate_context(pHddCtx))) {
|
||||
CDF_TRACE(CDF_MODULE_ID_HDD, CDF_TRACE_LEVEL_ERROR,
|
||||
FL("pHddCtx is not valid"));
|
||||
ENTER();
|
||||
|
||||
if (0 != (wlan_hdd_validate_context(pHddCtx)))
|
||||
return 0;
|
||||
}
|
||||
|
||||
init_len = buflen;
|
||||
len = scnprintf(buf, buflen, "\n%-18s%-3s%-4s%-3s%-5s\n",
|
||||
|
|
@ -2087,6 +2080,7 @@ int wlan_hdd_tdls_get_all_peers(hdd_adapter_t *pAdapter, char *buf, int buflen)
|
|||
}
|
||||
}
|
||||
mutex_unlock(&pHddCtx->tdls_lock);
|
||||
EXIT();
|
||||
return init_len - buflen;
|
||||
}
|
||||
|
||||
|
|
@ -2189,11 +2183,10 @@ void wlan_hdd_tdls_increment_peer_count(hdd_adapter_t *pAdapter)
|
|||
{
|
||||
hdd_context_t *pHddCtx = WLAN_HDD_GET_CTX(pAdapter);
|
||||
|
||||
if (0 != (wlan_hdd_validate_context(pHddCtx))) {
|
||||
CDF_TRACE(CDF_MODULE_ID_HDD, CDF_TRACE_LEVEL_ERROR,
|
||||
FL("pHddCtx is not valid"));
|
||||
ENTER();
|
||||
|
||||
if (0 != (wlan_hdd_validate_context(pHddCtx)))
|
||||
return;
|
||||
}
|
||||
|
||||
mutex_lock(&pHddCtx->tdls_lock);
|
||||
|
||||
|
|
@ -2204,6 +2197,7 @@ void wlan_hdd_tdls_increment_peer_count(hdd_adapter_t *pAdapter)
|
|||
__func__, pHddCtx->connected_peer_count);
|
||||
|
||||
mutex_unlock(&pHddCtx->tdls_lock);
|
||||
EXIT();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -2216,11 +2210,10 @@ void wlan_hdd_tdls_decrement_peer_count(hdd_adapter_t *pAdapter)
|
|||
{
|
||||
hdd_context_t *pHddCtx = WLAN_HDD_GET_CTX(pAdapter);
|
||||
|
||||
if (0 != (wlan_hdd_validate_context(pHddCtx))) {
|
||||
CDF_TRACE(CDF_MODULE_ID_HDD, CDF_TRACE_LEVEL_ERROR,
|
||||
FL("pHddCtx is not valid"));
|
||||
ENTER();
|
||||
|
||||
if (0 != (wlan_hdd_validate_context(pHddCtx)))
|
||||
return;
|
||||
}
|
||||
|
||||
mutex_lock(&pHddCtx->tdls_lock);
|
||||
|
||||
|
|
@ -2232,7 +2225,7 @@ void wlan_hdd_tdls_decrement_peer_count(hdd_adapter_t *pAdapter)
|
|||
__func__, pHddCtx->connected_peer_count);
|
||||
|
||||
mutex_unlock(&pHddCtx->tdls_lock);
|
||||
|
||||
EXIT();
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -2342,6 +2335,8 @@ static void __wlan_hdd_tdls_pre_setup(struct work_struct *work)
|
|||
int status;
|
||||
tSirMacAddr peer_mac;
|
||||
|
||||
ENTER();
|
||||
|
||||
if (NULL == pHddTdlsCtx) {
|
||||
CDF_TRACE(CDF_MODULE_ID_HDD, CDF_TRACE_LEVEL_ERROR,
|
||||
FL("pHddTdlsCtx is NULL"));
|
||||
|
|
@ -2357,11 +2352,8 @@ static void __wlan_hdd_tdls_pre_setup(struct work_struct *work)
|
|||
|
||||
pHddCtx = WLAN_HDD_GET_CTX(pHddTdlsCtx->pAdapter);
|
||||
|
||||
if (0 != (wlan_hdd_validate_context(pHddCtx))) {
|
||||
CDF_TRACE(CDF_MODULE_ID_HDD, CDF_TRACE_LEVEL_ERROR,
|
||||
FL("pHddCtx is not valid"));
|
||||
if (0 != (wlan_hdd_validate_context(pHddCtx)))
|
||||
return;
|
||||
}
|
||||
|
||||
mutex_lock(&pHddCtx->tdls_lock);
|
||||
|
||||
|
|
@ -2469,6 +2461,7 @@ done:
|
|||
pHddTdlsCtx->curr_candidate = NULL;
|
||||
pHddTdlsCtx->magic = 0;
|
||||
mutex_unlock(&pHddCtx->tdls_lock);
|
||||
EXIT();
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -2505,10 +2498,10 @@ int wlan_hdd_tdls_copy_scan_context(hdd_context_t *pHddCtx,
|
|||
{
|
||||
tdls_scan_context_t *scan_ctx;
|
||||
|
||||
if (0 != (wlan_hdd_validate_context(pHddCtx))) {
|
||||
hddLog(LOGE, FL("pHddCtx is not valid"));
|
||||
ENTER();
|
||||
|
||||
if (0 != (wlan_hdd_validate_context(pHddCtx)))
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
scan_ctx = &pHddCtx->tdls_scan_ctxt;
|
||||
|
||||
|
|
@ -2518,6 +2511,7 @@ int wlan_hdd_tdls_copy_scan_context(hdd_context_t *pHddCtx,
|
|||
#endif
|
||||
|
||||
scan_ctx->scan_request = request;
|
||||
EXIT();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -2574,6 +2568,8 @@ int wlan_hdd_tdls_scan_callback(hdd_adapter_t *pAdapter, struct wiphy *wiphy,
|
|||
unsigned long delay;
|
||||
int ret;
|
||||
|
||||
ENTER();
|
||||
|
||||
ret = wlan_hdd_validate_context(pHddCtx);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
|
@ -2732,6 +2728,7 @@ int wlan_hdd_tdls_scan_callback(hdd_adapter_t *pAdapter, struct wiphy *wiphy,
|
|||
"%s: tdls_mode %d, and no tdls connection. scan allowed",
|
||||
__func__, pHddCtx->tdls_mode);
|
||||
}
|
||||
EXIT();
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
@ -2745,11 +2742,10 @@ void wlan_hdd_tdls_scan_done_callback(hdd_adapter_t *pAdapter)
|
|||
{
|
||||
hdd_context_t *pHddCtx = WLAN_HDD_GET_CTX(pAdapter);
|
||||
|
||||
if (0 != (wlan_hdd_validate_context(pHddCtx))) {
|
||||
CDF_TRACE(CDF_MODULE_ID_HDD, CDF_TRACE_LEVEL_ERROR,
|
||||
FL("pHddCtx is not valid"));
|
||||
ENTER();
|
||||
|
||||
if (0 != (wlan_hdd_validate_context(pHddCtx)))
|
||||
return;
|
||||
}
|
||||
|
||||
if (eTDLS_SUPPORT_NOT_ENABLED == pHddCtx->tdls_mode) {
|
||||
hdd_info("TDLS mode is disabled OR not enabled");
|
||||
|
|
@ -2768,6 +2764,7 @@ void wlan_hdd_tdls_scan_done_callback(hdd_adapter_t *pAdapter)
|
|||
|
||||
wlan_hdd_tdls_set_mode(pHddCtx, pHddCtx->tdls_mode_last, false);
|
||||
}
|
||||
EXIT();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -2980,15 +2977,16 @@ __wlan_hdd_cfg80211_exttdls_get_status(struct wiphy *wiphy,
|
|||
uint32_t channel = 0;
|
||||
struct sk_buff *skb = NULL;
|
||||
|
||||
ENTER();
|
||||
|
||||
if (CDF_FTM_MODE == hdd_get_conparam()) {
|
||||
hdd_err("Command not allowed in FTM mode");
|
||||
return -EPERM;
|
||||
}
|
||||
|
||||
ret = wlan_hdd_validate_context(pHddCtx);
|
||||
if (0 != ret) {
|
||||
if (0 != ret)
|
||||
return -EINVAL;
|
||||
}
|
||||
if (pHddCtx->config->fTDLSExternalControl == false) {
|
||||
return -ENOTSUPP;
|
||||
}
|
||||
|
|
@ -3036,7 +3034,9 @@ __wlan_hdd_cfg80211_exttdls_get_status(struct wiphy *wiphy,
|
|||
hddLog(CDF_TRACE_LEVEL_ERROR, FL("nla put fail"));
|
||||
goto nla_put_failure;
|
||||
}
|
||||
return cfg80211_vendor_cmd_reply(skb);
|
||||
ret = cfg80211_vendor_cmd_reply(skb);
|
||||
EXIT();
|
||||
return ret;
|
||||
nla_put_failure:
|
||||
kfree_skb(skb);
|
||||
return -EINVAL;
|
||||
|
|
@ -3084,10 +3084,11 @@ static int wlan_hdd_cfg80211_exttdls_callback(const uint8_t *mac,
|
|||
struct sk_buff *skb = NULL;
|
||||
uint32_t global_operating_class = 0;
|
||||
uint32_t channel = 0;
|
||||
if (wlan_hdd_validate_context(pHddCtx)) {
|
||||
hddLog(CDF_TRACE_LEVEL_ERROR, FL("HDD context is not valid "));
|
||||
|
||||
ENTER();
|
||||
|
||||
if (wlan_hdd_validate_context(pHddCtx))
|
||||
return -EINVAL;
|
||||
}
|
||||
if (pHddCtx->config->fTDLSExternalControl == false) {
|
||||
return -ENOTSUPP;
|
||||
}
|
||||
|
|
@ -3119,6 +3120,7 @@ static int wlan_hdd_cfg80211_exttdls_callback(const uint8_t *mac,
|
|||
goto nla_put_failure;
|
||||
}
|
||||
cfg80211_vendor_event(skb, GFP_KERNEL);
|
||||
EXIT();
|
||||
return 0;
|
||||
nla_put_failure:
|
||||
kfree_skb(skb);
|
||||
|
|
@ -3151,6 +3153,9 @@ __wlan_hdd_cfg80211_exttdls_enable(struct wiphy *wiphy,
|
|||
struct nlattr *tb[QCA_WLAN_VENDOR_ATTR_TDLS_ENABLE_MAX + 1];
|
||||
CDF_STATUS status;
|
||||
tdls_req_params_t pReqMsg = { 0 };
|
||||
int ret;
|
||||
|
||||
ENTER();
|
||||
|
||||
if (CDF_FTM_MODE == hdd_get_conparam()) {
|
||||
hdd_err("Command not allowed in FTM mode");
|
||||
|
|
@ -3158,10 +3163,8 @@ __wlan_hdd_cfg80211_exttdls_enable(struct wiphy *wiphy,
|
|||
}
|
||||
|
||||
status = wlan_hdd_validate_context(pHddCtx);
|
||||
if (0 != status) {
|
||||
hddLog(CDF_TRACE_LEVEL_ERROR, FL("HDD context is not valid"));
|
||||
if (0 != status)
|
||||
return -EINVAL;
|
||||
}
|
||||
if (pHddCtx->config->fTDLSExternalControl == false) {
|
||||
hddLog(CDF_TRACE_LEVEL_ERROR,
|
||||
FL("TDLS External Control is not enabled"));
|
||||
|
|
@ -3213,7 +3216,7 @@ __wlan_hdd_cfg80211_exttdls_enable(struct wiphy *wiphy,
|
|||
[QCA_WLAN_VENDOR_ATTR_TDLS_ENABLE_MIN_BANDWIDTH_KBPS]);
|
||||
hddLog(CDF_TRACE_LEVEL_INFO, FL("Bandwidth (%d)"),
|
||||
pReqMsg.min_bandwidth_kbps);
|
||||
return wlan_hdd_tdls_extctrl_config_peer(
|
||||
ret = wlan_hdd_tdls_extctrl_config_peer(
|
||||
pAdapter,
|
||||
peer,
|
||||
wlan_hdd_cfg80211_exttdls_callback,
|
||||
|
|
@ -3222,6 +3225,8 @@ __wlan_hdd_cfg80211_exttdls_enable(struct wiphy *wiphy,
|
|||
pReqMsg.
|
||||
global_operating_class,
|
||||
pReqMsg.min_bandwidth_kbps);
|
||||
EXIT();
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -3277,10 +3282,8 @@ static int __wlan_hdd_cfg80211_exttdls_disable(struct wiphy *wiphy,
|
|||
}
|
||||
|
||||
status = wlan_hdd_validate_context(pHddCtx);
|
||||
if (0 != status) {
|
||||
hddLog(CDF_TRACE_LEVEL_ERROR, FL("HDD context is not valid"));
|
||||
if (0 != status)
|
||||
return -EINVAL;
|
||||
}
|
||||
if (pHddCtx->config->fTDLSExternalControl == false) {
|
||||
return -ENOTSUPP;
|
||||
}
|
||||
|
|
@ -3296,7 +3299,9 @@ static int __wlan_hdd_cfg80211_exttdls_disable(struct wiphy *wiphy,
|
|||
memcpy(peer, nla_data(tb[QCA_WLAN_VENDOR_ATTR_TDLS_DISABLE_MAC_ADDR]),
|
||||
sizeof(peer));
|
||||
hddLog(CDF_TRACE_LEVEL_INFO, FL(MAC_ADDRESS_STR), MAC_ADDR_ARRAY(peer));
|
||||
return wlan_hdd_tdls_extctrl_deconfig_peer(pAdapter, peer);
|
||||
status = wlan_hdd_tdls_extctrl_deconfig_peer(pAdapter, peer);
|
||||
EXIT();
|
||||
return status;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -4014,6 +4019,8 @@ static int __wlan_hdd_cfg80211_tdls_oper(struct wiphy *wiphy,
|
|||
CDF_STATUS cdf_ret_status = CDF_STATUS_E_FAILURE;
|
||||
hddTdlsPeer_t *pTdlsPeer;
|
||||
|
||||
ENTER();
|
||||
|
||||
if (CDF_FTM_MODE == hdd_get_conparam()) {
|
||||
hddLog(LOGE, FL("Command not allowed in FTM mode"));
|
||||
return -EINVAL;
|
||||
|
|
@ -4030,11 +4037,8 @@ static int __wlan_hdd_cfg80211_tdls_oper(struct wiphy *wiphy,
|
|||
|
||||
status = wlan_hdd_validate_context(pHddCtx);
|
||||
|
||||
if (0 != status) {
|
||||
CDF_TRACE(CDF_MODULE_ID_HDD, CDF_TRACE_LEVEL_ERROR,
|
||||
"%s: HDD context is not valid", __func__);
|
||||
if (0 != status)
|
||||
return status;
|
||||
}
|
||||
|
||||
/* QCA 2.0 Discrete ANDs feature capability in HDD config with that
|
||||
* received from target, so HDD config gives combined intersected result
|
||||
|
|
@ -4373,6 +4377,7 @@ static int __wlan_hdd_cfg80211_tdls_oper(struct wiphy *wiphy,
|
|||
"%s: unsupported event", __func__);
|
||||
return -ENOTSUPP;
|
||||
}
|
||||
EXIT();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1191,6 +1191,8 @@ CDF_STATUS wlan_hdd_get_snr(hdd_adapter_t *pAdapter, int8_t *snr)
|
|||
unsigned long rc;
|
||||
int valid;
|
||||
|
||||
ENTER();
|
||||
|
||||
if (NULL == pAdapter) {
|
||||
hddLog(CDF_TRACE_LEVEL_ERROR,
|
||||
"%s: Invalid context, pAdapter", __func__);
|
||||
|
|
@ -1200,10 +1202,8 @@ CDF_STATUS wlan_hdd_get_snr(hdd_adapter_t *pAdapter, int8_t *snr)
|
|||
pHddCtx = WLAN_HDD_GET_CTX(pAdapter);
|
||||
|
||||
valid = wlan_hdd_validate_context(pHddCtx);
|
||||
if (0 != valid) {
|
||||
hddLog(CDF_TRACE_LEVEL_ERROR, FL("HDD context is not valid"));
|
||||
if (0 != valid)
|
||||
return CDF_STATUS_E_FAULT;
|
||||
}
|
||||
|
||||
pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(pAdapter);
|
||||
|
||||
|
|
@ -1248,7 +1248,7 @@ CDF_STATUS wlan_hdd_get_snr(hdd_adapter_t *pAdapter, int8_t *snr)
|
|||
spin_unlock(&hdd_context_lock);
|
||||
|
||||
*snr = pAdapter->snr;
|
||||
|
||||
EXIT();
|
||||
return CDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
|
|
@ -3564,6 +3564,8 @@ static int __iw_get_linkspeed(struct net_device *dev,
|
|||
hdd_context_t *hdd_ctx;
|
||||
int rc, valid;
|
||||
|
||||
ENTER();
|
||||
|
||||
hdd_ctx = WLAN_HDD_GET_CTX(pAdapter);
|
||||
valid = wlan_hdd_validate_context(hdd_ctx);
|
||||
if (0 != valid)
|
||||
|
|
@ -3584,6 +3586,7 @@ static int __iw_get_linkspeed(struct net_device *dev,
|
|||
return -EIO;
|
||||
}
|
||||
|
||||
EXIT();
|
||||
/* a value is being successfully returned */
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -4941,6 +4944,8 @@ static int __iw_setint_getnone(struct net_device *dev,
|
|||
int enable_pbm, enable_mp;
|
||||
CDF_STATUS status;
|
||||
|
||||
ENTER();
|
||||
|
||||
INIT_COMPLETION(pWextState->completion_var);
|
||||
memset(&smeConfig, 0x00, sizeof(smeConfig));
|
||||
|
||||
|
|
@ -6157,6 +6162,7 @@ static int __iw_setint_getnone(struct net_device *dev,
|
|||
break;
|
||||
}
|
||||
}
|
||||
EXIT();
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
@ -6204,6 +6210,8 @@ static int __iw_setchar_getnone(struct net_device *dev,
|
|||
return -EPERM;
|
||||
}
|
||||
|
||||
ENTER();
|
||||
|
||||
ret = wlan_hdd_validate_context(hdd_ctx);
|
||||
if (0 != ret)
|
||||
return ret;
|
||||
|
|
@ -6301,6 +6309,7 @@ static int __iw_setchar_getnone(struct net_device *dev,
|
|||
}
|
||||
}
|
||||
kfree(pBuffer);
|
||||
EXIT();
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
@ -6337,6 +6346,8 @@ static int __iw_setnone_getint(struct net_device *dev,
|
|||
tSmeConfigParams smeConfig;
|
||||
hdd_context_t *hdd_ctx;
|
||||
|
||||
ENTER();
|
||||
|
||||
hdd_ctx = WLAN_HDD_GET_CTX(pAdapter);
|
||||
ret = wlan_hdd_validate_context(hdd_ctx);
|
||||
if (0 != ret)
|
||||
|
|
@ -6812,7 +6823,7 @@ static int __iw_setnone_getint(struct net_device *dev,
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
EXIT();
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
@ -6848,6 +6859,8 @@ static int __iw_set_three_ints_getnone(struct net_device *dev,
|
|||
int ret;
|
||||
hdd_context_t *hdd_ctx = WLAN_HDD_GET_CTX(pAdapter);
|
||||
|
||||
ENTER();
|
||||
|
||||
ret = wlan_hdd_validate_context(hdd_ctx);
|
||||
if (0 != ret)
|
||||
return ret;
|
||||
|
|
@ -6892,6 +6905,7 @@ static int __iw_set_three_ints_getnone(struct net_device *dev,
|
|||
break;
|
||||
|
||||
}
|
||||
EXIT();
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
@ -6954,6 +6968,8 @@ static int __iw_get_char_setnone(struct net_device *dev,
|
|||
pWextState = WLAN_HDD_GET_WEXT_STATE_PTR(pAdapter);
|
||||
#endif
|
||||
|
||||
ENTER();
|
||||
|
||||
hdd_ctx = WLAN_HDD_GET_CTX(pAdapter);
|
||||
ret = wlan_hdd_validate_context(hdd_ctx);
|
||||
if (0 != ret)
|
||||
|
|
@ -7423,7 +7439,7 @@ static int __iw_get_char_setnone(struct net_device *dev,
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
EXIT();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -7458,6 +7474,8 @@ static int __iw_setnone_getnone(struct net_device *dev,
|
|||
int ret;
|
||||
int sub_cmd;
|
||||
|
||||
ENTER();
|
||||
|
||||
hdd_ctx = WLAN_HDD_GET_CTX(pAdapter);
|
||||
ret = wlan_hdd_validate_context(hdd_ctx);
|
||||
if (0 != ret)
|
||||
|
|
@ -7578,7 +7596,7 @@ static int __iw_setnone_getnone(struct net_device *dev,
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
EXIT();
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
@ -7620,6 +7638,8 @@ static int __iw_set_var_ints_getnone(struct net_device *dev,
|
|||
hdd_context_t *hdd_ctx;
|
||||
int ret, num_args;
|
||||
|
||||
ENTER();
|
||||
|
||||
hdd_ctx = WLAN_HDD_GET_CTX(pAdapter);
|
||||
ret = wlan_hdd_validate_context(hdd_ctx);
|
||||
if (0 != ret)
|
||||
|
|
@ -7961,7 +7981,7 @@ static int __iw_set_var_ints_getnone(struct net_device *dev,
|
|||
}
|
||||
break;
|
||||
}
|
||||
|
||||
EXIT();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -8062,6 +8082,8 @@ static int __iw_add_tspec(struct net_device *dev, struct iw_request_info *info,
|
|||
hdd_context_t *hdd_ctx;
|
||||
int ret;
|
||||
|
||||
ENTER();
|
||||
|
||||
hdd_ctx = WLAN_HDD_GET_CTX(pAdapter);
|
||||
ret = wlan_hdd_validate_context(hdd_ctx);
|
||||
if (0 != ret)
|
||||
|
|
@ -8196,6 +8218,7 @@ static int __iw_add_tspec(struct net_device *dev, struct iw_request_info *info,
|
|||
}
|
||||
|
||||
*pStatus = hdd_wmm_addts(pAdapter, handle, &tSpec);
|
||||
EXIT();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -8231,6 +8254,8 @@ static int __iw_del_tspec(struct net_device *dev, struct iw_request_info *info,
|
|||
uint32_t handle;
|
||||
int ret;
|
||||
|
||||
ENTER();
|
||||
|
||||
hdd_ctx = WLAN_HDD_GET_CTX(pAdapter);
|
||||
ret = wlan_hdd_validate_context(hdd_ctx);
|
||||
if (0 != ret)
|
||||
|
|
@ -8257,6 +8282,7 @@ static int __iw_del_tspec(struct net_device *dev, struct iw_request_info *info,
|
|||
}
|
||||
|
||||
*pStatus = hdd_wmm_delts(pAdapter, handle);
|
||||
EXIT();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -8292,6 +8318,8 @@ static int __iw_get_tspec(struct net_device *dev, struct iw_request_info *info,
|
|||
uint32_t handle;
|
||||
int ret;
|
||||
|
||||
ENTER();
|
||||
|
||||
hdd_ctx = WLAN_HDD_GET_CTX(pAdapter);
|
||||
ret = wlan_hdd_validate_context(hdd_ctx);
|
||||
if (0 != ret)
|
||||
|
|
@ -8310,6 +8338,7 @@ static int __iw_get_tspec(struct net_device *dev, struct iw_request_info *info,
|
|||
}
|
||||
|
||||
*pStatus = hdd_wmm_checkts(pAdapter, handle);
|
||||
EXIT();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -8348,6 +8377,8 @@ static int __iw_set_fties(struct net_device *dev, struct iw_request_info *info,
|
|||
hdd_context_t *hdd_ctx;
|
||||
int ret;
|
||||
|
||||
ENTER();
|
||||
|
||||
hdd_ctx = WLAN_HDD_GET_CTX(pAdapter);
|
||||
ret = wlan_hdd_validate_context(hdd_ctx);
|
||||
if (0 != ret)
|
||||
|
|
@ -8376,7 +8407,7 @@ static int __iw_set_fties(struct net_device *dev, struct iw_request_info *info,
|
|||
/* Pass the received FT IEs to SME */
|
||||
sme_set_ft_ies(WLAN_HDD_GET_HAL_CTX(pAdapter), pAdapter->sessionId,
|
||||
extra, wrqu->data.length);
|
||||
|
||||
EXIT();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -8413,6 +8444,8 @@ static int __iw_set_host_offload(struct net_device *dev,
|
|||
hdd_context_t *hdd_ctx;
|
||||
int ret;
|
||||
|
||||
ENTER();
|
||||
|
||||
hdd_ctx = WLAN_HDD_GET_CTX(pAdapter);
|
||||
ret = wlan_hdd_validate_context(hdd_ctx);
|
||||
if (0 != ret)
|
||||
|
|
@ -8491,7 +8524,7 @@ static int __iw_set_host_offload(struct net_device *dev,
|
|||
"%s: Failure to execute host offload request", __func__);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
EXIT();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -8526,6 +8559,8 @@ static int __iw_set_keepalive_params(struct net_device *dev,
|
|||
hdd_context_t *hdd_ctx;
|
||||
int ret;
|
||||
|
||||
ENTER();
|
||||
|
||||
hdd_ctx = WLAN_HDD_GET_CTX(pAdapter);
|
||||
ret = wlan_hdd_validate_context(hdd_ctx);
|
||||
if (0 != ret)
|
||||
|
|
@ -8578,7 +8613,7 @@ static int __iw_set_keepalive_params(struct net_device *dev,
|
|||
hdd_err("Failure to execute Keep Alive");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
EXIT();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -8744,6 +8779,8 @@ static int __iw_set_packet_filter_params(struct net_device *dev,
|
|||
return -EPERM;
|
||||
}
|
||||
|
||||
ENTER();
|
||||
|
||||
hdd_ctx = WLAN_HDD_GET_CTX(adapter);
|
||||
ret = wlan_hdd_validate_context(hdd_ctx);
|
||||
if (0 != ret)
|
||||
|
|
@ -8771,7 +8808,7 @@ static int __iw_set_packet_filter_params(struct net_device *dev,
|
|||
ret = wlan_hdd_set_filter(hdd_ctx, request, adapter->sessionId);
|
||||
|
||||
kfree(request);
|
||||
|
||||
EXIT();
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue