qcacld-3.0: (part-2)Replace enum device_mode to tQDF_ADAPTER_MODE
Instead of using two different enums for setting adapter mode,
combined them to make only one set of enum.
Change-Id: If20617734c5f6f71cef6b85b86d907f8be9d39f9
CRs-Fixed: 985273
diff --git a/core/hdd/src/wlan_hdd_assoc.c b/core/hdd/src/wlan_hdd_assoc.c
index 80f7753..d8f8742 100644
--- a/core/hdd/src/wlan_hdd_assoc.c
+++ b/core/hdd/src/wlan_hdd_assoc.c
@@ -731,7 +731,7 @@
sizeof(pCsrRoamInfo->pBssDesc->bssId));
#ifdef WLAN_FEATURE_P2P_DEBUG
- if (pAdapter->device_mode == WLAN_HDD_P2P_CLIENT) {
+ if (pAdapter->device_mode == QDF_P2P_CLIENT_MODE) {
if (global_p2p_connection_status ==
P2P_CLIENT_CONNECTING_STATE_1) {
global_p2p_connection_status =
@@ -772,7 +772,7 @@
) {
hdd_send_ft_assoc_response(dev, pAdapter, pCsrRoamInfo);
}
- if (pAdapter->device_mode == WLAN_HDD_P2P_CLIENT) {
+ if (pAdapter->device_mode == QDF_P2P_CLIENT_MODE) {
tSirSmeChanInfo chan_info;
qdf_copy_macaddr(&peerMacAddr,
&pHddStaCtx->conn_info.bssId);
@@ -825,7 +825,7 @@
wlan_hdd_auto_shutdown_enable(pHddCtx, true);
#endif
- if (pAdapter->device_mode == WLAN_HDD_P2P_CLIENT) {
+ if (pAdapter->device_mode == QDF_P2P_CLIENT_MODE) {
qdf_copy_macaddr(&peerMacAddr,
&pHddStaCtx->conn_info.bssId);
@@ -840,7 +840,7 @@
wlan_hdd_send_status_pkg(pAdapter, pHddStaCtx, 1, 0);
#endif
#ifdef FEATURE_WLAN_TDLS
- if ((pAdapter->device_mode == WLAN_HDD_INFRA_STATION) &&
+ if ((pAdapter->device_mode == QDF_STA_MODE) &&
(pCsrRoamInfo)) {
hddLog(LOG4,
FL("tdls_prohibited: %d, tdls_chan_swit_prohibited: %d"),
@@ -1064,7 +1064,7 @@
*/
if (cds_is_load_or_unload_in_progress()) {
#ifdef WLAN_FEATURE_P2P_DEBUG
- if (pAdapter->device_mode == WLAN_HDD_P2P_CLIENT) {
+ if (pAdapter->device_mode == QDF_P2P_CLIENT_MODE) {
if (global_p2p_connection_status ==
P2P_CLIENT_CONNECTED_STATE_1) {
global_p2p_connection_status =
@@ -1137,8 +1137,8 @@
hddLog(LOG1, FL("Set HDD connState to eConnectionState_NotConnected"));
hdd_conn_set_connection_state(pAdapter, eConnectionState_NotConnected);
#ifdef WLAN_FEATURE_GTK_OFFLOAD
- if ((WLAN_HDD_INFRA_STATION == pAdapter->device_mode) ||
- (WLAN_HDD_P2P_CLIENT == pAdapter->device_mode)) {
+ if ((QDF_STA_MODE == pAdapter->device_mode) ||
+ (QDF_P2P_CLIENT_MODE == pAdapter->device_mode)) {
memset(&pHddStaCtx->gtkOffloadReqParams, 0,
sizeof(tSirGtkOffloadParams));
pHddStaCtx->gtkOffloadReqParams.ulFlags = GTK_OFFLOAD_DISABLE;
@@ -1150,8 +1150,8 @@
wlan_hdd_tdls_disconnection_callback(pAdapter);
#endif
- if ((WLAN_HDD_INFRA_STATION == pAdapter->device_mode) ||
- (WLAN_HDD_P2P_CLIENT == pAdapter->device_mode)) {
+ if ((QDF_STA_MODE == pAdapter->device_mode) ||
+ (QDF_P2P_CLIENT_MODE == pAdapter->device_mode)) {
sme_ps_disable_auto_ps_timer(WLAN_HDD_GET_HAL_CTX
(pAdapter),
pAdapter->sessionId);
@@ -1243,8 +1243,8 @@
return QDF_STATUS_E_FAULT;
}
- if (pAdapter->device_mode == WLAN_HDD_INFRA_STATION ||
- pAdapter->device_mode == WLAN_HDD_P2P_CLIENT) {
+ if (pAdapter->device_mode == QDF_STA_MODE ||
+ pAdapter->device_mode == QDF_P2P_CLIENT_MODE) {
#if defined(QCA_LL_LEGACY_TX_FLOW_CONTROL) || defined(QCA_LL_TX_FLOW_CONTROL_V2)
unsigned long rc;
@@ -1545,8 +1545,8 @@
OL_TXRX_PEER_STATE_AUTH,
hdd_is_roam_sync_in_progress(roaminfo));
hdd_conn_set_authenticated(adapter, true);
- if ((WLAN_HDD_INFRA_STATION == adapter->device_mode) ||
- (WLAN_HDD_P2P_CLIENT == adapter->device_mode)) {
+ if ((QDF_STA_MODE == adapter->device_mode) ||
+ (QDF_P2P_CLIENT_MODE == adapter->device_mode)) {
sme_ps_enable_auto_ps_timer(
WLAN_HDD_GET_HAL_CTX(adapter),
adapter->sessionId,
@@ -1595,7 +1595,7 @@
fConnected = hdd_conn_get_connected_cipher_algo(pHddStaCtx,
&connectedCipherAlgo);
if (fConnected) {
- if (WLAN_HDD_IBSS == pAdapter->device_mode) {
+ if (QDF_IBSS_MODE == pAdapter->device_mode) {
uint8_t staId;
if (qdf_is_macaddr_broadcast(&pRoamInfo->peerMac)) {
@@ -4531,7 +4531,7 @@
pWextState->roamProfile.mcEncryptionType.encryptionType[0] =
mcRSNEncryptType;
- if ((WLAN_HDD_IBSS == pAdapter->device_mode) &&
+ if ((QDF_IBSS_MODE == pAdapter->device_mode) &&
((eCSR_ENCRYPT_TYPE_AES == mcRSNEncryptType) ||
(eCSR_ENCRYPT_TYPE_TKIP == mcRSNEncryptType))) {
/*
@@ -4734,8 +4734,8 @@
if (0 != ret)
return ret;
- if (pAdapter->device_mode != WLAN_HDD_INFRA_STATION &&
- pAdapter->device_mode != WLAN_HDD_P2P_CLIENT) {
+ if (pAdapter->device_mode != QDF_STA_MODE &&
+ pAdapter->device_mode != QDF_P2P_CLIENT_MODE) {
hddLog(LOGW, FL("device mode %s(%d) is not allowed"),
hdd_device_mode_to_string(pAdapter->device_mode),
pAdapter->device_mode);
diff --git a/core/hdd/src/wlan_hdd_debugfs.c b/core/hdd/src/wlan_hdd_debugfs.c
index 89aac4e..dd9fc15 100644
--- a/core/hdd/src/wlan_hdd_debugfs.c
+++ b/core/hdd/src/wlan_hdd_debugfs.c
@@ -430,7 +430,7 @@
* patterns
*/
hdd_info("device mode %d", pAdapter->device_mode);
- if ((WLAN_HDD_INFRA_STATION == pAdapter->device_mode) &&
+ if ((QDF_STA_MODE == pAdapter->device_mode) &&
(!hdd_conn_is_connected(WLAN_HDD_GET_STATION_CTX_PTR(pAdapter)))) {
QDF_TRACE(QDF_MODULE_ID_HDD, QDF_TRACE_LEVEL_ERROR,
"%s: Not in Connected state!", __func__);
diff --git a/core/hdd/src/wlan_hdd_ext_scan.c b/core/hdd/src/wlan_hdd_ext_scan.c
index 3303e1f..0647399 100644
--- a/core/hdd/src/wlan_hdd_ext_scan.c
+++ b/core/hdd/src/wlan_hdd_ext_scan.c
@@ -2538,7 +2538,7 @@
hdd_remove_dsrc_channels(wiphy, chan_list, &num_channels);
- if ((WLAN_HDD_SOFTAP == pAdapter->device_mode) ||
+ if ((QDF_SAP_MODE == pAdapter->device_mode) ||
!strncmp(hdd_get_fwpath(), "ap", 2))
hdd_remove_indoor_channels(wiphy, chan_list, &num_channels);
diff --git a/core/hdd/src/wlan_hdd_ftm.c b/core/hdd/src/wlan_hdd_ftm.c
index 1c6c5d0..94cd241 100644
--- a/core/hdd/src/wlan_hdd_ftm.c
+++ b/core/hdd/src/wlan_hdd_ftm.c
@@ -611,9 +611,9 @@
static int hdd_ftm_service_registration(hdd_context_t *hdd_ctx)
{
hdd_adapter_t *adapter;
- adapter = hdd_open_adapter(hdd_ctx, WLAN_HDD_FTM, "wlan%d",
+ adapter = hdd_open_adapter(hdd_ctx, QDF_FTM_MODE, "wlan%d",
wlan_hdd_get_intf_addr(hdd_ctx),
- NET_NAME_UNKNOWN, false);
+ NET_NAME_UNKNOWN, false);
if (NULL == adapter) {
hddLog(QDF_TRACE_LEVEL_ERROR, "%s: hdd_open_adapter failed",
__func__);
@@ -659,7 +659,7 @@
QDF_STATUS qdf_status;
v_CONTEXT_t cds_context = hdd_ctx->pcds_context;
- hdd_adapter_t *adapter = hdd_get_adapter(hdd_ctx, WLAN_HDD_FTM);
+ hdd_adapter_t *adapter = hdd_get_adapter(hdd_ctx, QDF_FTM_MODE);
ENTER();
if (adapter == NULL) {
QDF_TRACE(QDF_MODULE_ID_HDD, QDF_TRACE_LEVEL_FATAL,
diff --git a/core/hdd/src/wlan_hdd_green_ap.c b/core/hdd/src/wlan_hdd_green_ap.c
index ae80289..83f0154 100644
--- a/core/hdd/src/wlan_hdd_green_ap.c
+++ b/core/hdd/src/wlan_hdd_green_ap.c
@@ -193,7 +193,7 @@
goto done;
}
- adapter = hdd_get_adapter(hdd_ctx, WLAN_HDD_SOFTAP);
+ adapter = hdd_get_adapter(hdd_ctx, QDF_SAP_MODE);
if (adapter == NULL) {
hdd_err("Green-AP no SAP adapter");
goto done;
diff --git a/core/hdd/src/wlan_hdd_ioctl.c b/core/hdd/src/wlan_hdd_ioctl.c
index b08bcf6..9010481 100644
--- a/core/hdd/src/wlan_hdd_ioctl.c
+++ b/core/hdd/src/wlan_hdd_ioctl.c
@@ -874,7 +874,7 @@
hdd_station_ctx_t *pHddStaCtx;
int ret = 0;
- if (WLAN_HDD_INFRA_STATION != adapter->device_mode) {
+ if (QDF_STA_MODE != adapter->device_mode) {
hdd_warn("Unsupported in mode %s(%d)",
hdd_device_mode_to_string(adapter->device_mode),
adapter->device_mode);
@@ -1061,7 +1061,7 @@
struct cfg80211_mgmt_tx_params params;
#endif
- if (WLAN_HDD_INFRA_STATION != adapter->device_mode) {
+ if (QDF_STA_MODE != adapter->device_mode) {
hdd_warn("Unsupported in mode %s(%d)",
hdd_device_mode_to_string(adapter->device_mode),
adapter->device_mode);
@@ -2451,8 +2451,8 @@
return 0;
}
- if ((WLAN_HDD_INFRA_STATION != adapter->device_mode) &&
- (WLAN_HDD_P2P_CLIENT != adapter->device_mode)) {
+ if ((QDF_STA_MODE != adapter->device_mode) &&
+ (QDF_P2P_CLIENT_MODE != adapter->device_mode)) {
hdd_warn("Unsupported in mode %s(%d)",
hdd_device_mode_to_string(adapter->device_mode),
adapter->device_mode);
@@ -2883,9 +2883,9 @@
"%s: HDD context is null", __func__);
return -EINVAL;
}
- if ((WLAN_HDD_IBSS != pAdapter->device_mode) &&
- (WLAN_HDD_SOFTAP != pAdapter->device_mode) &&
- (WLAN_HDD_INFRA_STATION != pAdapter->device_mode)) {
+ if ((QDF_IBSS_MODE != pAdapter->device_mode) &&
+ (QDF_SAP_MODE != pAdapter->device_mode) &&
+ (QDF_STA_MODE != pAdapter->device_mode)) {
hddLog(LOGE,
FL("Received SETMCRATE cmd in invalid mode %s(%d)"),
hdd_device_mode_to_string(pAdapter->device_mode),
@@ -4660,7 +4660,7 @@
#endif
hdd_station_ctx_t *pHddStaCtx;
- if (WLAN_HDD_INFRA_STATION != adapter->device_mode) {
+ if (QDF_STA_MODE != adapter->device_mode) {
hdd_warn("Unsupported in mode %s(%d)",
hdd_device_mode_to_string(adapter->device_mode),
adapter->device_mode);
@@ -5205,7 +5205,7 @@
hdd_wext_state_t *pWextState;
- if (WLAN_HDD_IBSS != adapter->device_mode) {
+ if (QDF_IBSS_MODE != adapter->device_mode) {
hddLog(LOG1, FL("Device_mode %s(%d) not IBSS"),
hdd_device_mode_to_string(adapter->device_mode),
adapter->device_mode);
@@ -5316,8 +5316,8 @@
uint8_t ucRmcEnable = 0;
int status;
- if ((WLAN_HDD_IBSS != adapter->device_mode) &&
- (WLAN_HDD_SOFTAP != adapter->device_mode)) {
+ if ((QDF_IBSS_MODE != adapter->device_mode) &&
+ (QDF_SAP_MODE != adapter->device_mode)) {
hddLog(LOGE,
"Received SETRMCENABLE cmd in invalid mode %s(%d)",
hdd_device_mode_to_string(adapter->device_mode),
@@ -5381,8 +5381,8 @@
uint32_t uActionPeriod = 0;
int status;
- if ((WLAN_HDD_IBSS != adapter->device_mode) &&
- (WLAN_HDD_SOFTAP != adapter->device_mode)) {
+ if ((QDF_IBSS_MODE != adapter->device_mode) &&
+ (QDF_SAP_MODE != adapter->device_mode)) {
hddLog(LOGE, "Received SETRMC cmd in invalid mode %s(%d)",
hdd_device_mode_to_string(adapter->device_mode),
adapter->device_mode);
@@ -5447,7 +5447,7 @@
uint32_t txRateMbps = 0;
uint32_t numOfBytestoPrint = 0;
- if (WLAN_HDD_IBSS != adapter->device_mode) {
+ if (QDF_IBSS_MODE != adapter->device_mode) {
hdd_warn("Unsupported in mode %s(%d)",
hdd_device_mode_to_string(adapter->device_mode),
adapter->device_mode);
@@ -5603,7 +5603,7 @@
uint32_t txRate;
struct qdf_mac_addr peerMacAddr;
- if (WLAN_HDD_IBSS != adapter->device_mode) {
+ if (QDF_IBSS_MODE != adapter->device_mode) {
hdd_warn("Unsupported in mode %s(%d)",
hdd_device_mode_to_string(adapter->device_mode),
adapter->device_mode);
@@ -5703,8 +5703,8 @@
int status;
struct hdd_config *pConfig = hdd_ctx->config;
- if ((WLAN_HDD_IBSS != adapter->device_mode) &&
- (WLAN_HDD_SOFTAP != adapter->device_mode)) {
+ if ((QDF_IBSS_MODE != adapter->device_mode) &&
+ (QDF_SAP_MODE != adapter->device_mode)) {
hddLog(LOGE,
"Received SETRMCTXRATE cmd in invalid mode %s(%d)",
hdd_device_mode_to_string(adapter->device_mode),
@@ -5872,8 +5872,8 @@
hdd_station_ctx_t *pHddStaCtx;
tAniTrafStrmMetrics tsm_metrics;
- if ((WLAN_HDD_INFRA_STATION != adapter->device_mode) &&
- (WLAN_HDD_P2P_CLIENT != adapter->device_mode)) {
+ if ((QDF_STA_MODE != adapter->device_mode) &&
+ (QDF_P2P_CLIENT_MODE != adapter->device_mode)) {
hdd_warn("Unsupported in mode %s(%d)",
hdd_device_mode_to_string(adapter->device_mode),
adapter->device_mode);
@@ -6032,7 +6032,7 @@
tCsrEseBeaconReq eseBcnReq;
QDF_STATUS status = QDF_STATUS_SUCCESS;
- if (WLAN_HDD_INFRA_STATION != adapter->device_mode) {
+ if (QDF_STA_MODE != adapter->device_mode) {
hdd_warn("Unsupported in mode %s(%d)",
hdd_device_mode_to_string(adapter->device_mode),
adapter->device_mode);
@@ -6882,8 +6882,8 @@
else
adapter->addr_filter_pattern = 0;
- if (((adapter->device_mode == WLAN_HDD_INFRA_STATION) ||
- (adapter->device_mode == WLAN_HDD_P2P_CLIENT)) &&
+ if (((adapter->device_mode == QDF_STA_MODE) ||
+ (adapter->device_mode == QDF_P2P_CLIENT_MODE)) &&
adapter->mc_addr_list.mc_cnt &&
hdd_conn_is_connected(WLAN_HDD_GET_STATION_CTX_PTR(adapter))) {
@@ -7434,8 +7434,8 @@
uint8_t *value = command;
enum ch_width width;
- if ((adapter->device_mode != WLAN_HDD_P2P_GO) &&
- (adapter->device_mode != WLAN_HDD_SOFTAP)) {
+ if ((adapter->device_mode != QDF_P2P_GO_MODE) &&
+ (adapter->device_mode != QDF_SAP_MODE)) {
hdd_err("IOCTL CHANNEL_SWITCH not supported for mode %d",
adapter->device_mode);
return -EINVAL;
diff --git a/core/hdd/src/wlan_hdd_ipa.c b/core/hdd/src/wlan_hdd_ipa.c
index 2157972..19f5505 100644
--- a/core/hdd/src/wlan_hdd_ipa.c
+++ b/core/hdd/src/wlan_hdd_ipa.c
@@ -814,7 +814,7 @@
"%s: Dummy alloc fail", __func__);
hdd_ipa_uc_rt_debug_host_dump(hdd_ctx);
hdd_ipa_uc_stat_request(
- hdd_get_adapter(hdd_ctx, WLAN_HDD_SOFTAP), 1);
+ hdd_get_adapter(hdd_ctx, QDF_SAP_MODE), 1);
} else {
kfree(dummy_ptr);
}
@@ -1628,7 +1628,7 @@
* layer as SAP updates and IPA doesn't have to do anything for these
* updates so ignoring!
*/
- if (WLAN_HDD_SOFTAP == adapter->device_mode && adapter->ipa_context)
+ if (QDF_SAP_MODE == adapter->device_mode && adapter->ipa_context)
return;
/* Lower layer may send multiple START_BSS_EVENT in DFS mode or during
@@ -3431,7 +3431,7 @@
* layer as SAP updates and IPA doesn't have to do anything for these
* updates so ignoring!
*/
- if (WLAN_HDD_SOFTAP == adapter->device_mode && adapter->ipa_context)
+ if (QDF_SAP_MODE == adapter->device_mode && adapter->ipa_context)
return 0;
for (i = 0; i < HDD_IPA_MAX_IFACE; i++) {
@@ -3523,8 +3523,8 @@
status = hdd_get_front_adapter(pHddCtx, &adapter_node);
while (NULL != adapter_node && QDF_STATUS_SUCCESS == status) {
pAdapter = adapter_node->pAdapter;
- if (pAdapter->device_mode == WLAN_HDD_INFRA_STATION ||
- pAdapter->device_mode == WLAN_HDD_SOFTAP) {
+ if (pAdapter->device_mode == QDF_STA_MODE ||
+ pAdapter->device_mode == QDF_SAP_MODE) {
hddLog(QDF_TRACE_LEVEL_INFO,
"MCC->SCC: Flush TxRx queue(d_mode=%d)",
pAdapter->device_mode);
@@ -3632,7 +3632,7 @@
if (hdd_ipa_uc_is_enabled(hdd_ipa->hdd_ctx) &&
!hdd_ipa_uc_sta_is_enabled(hdd_ipa->hdd_ctx) &&
- (WLAN_HDD_SOFTAP != adapter->device_mode)) {
+ (QDF_SAP_MODE != adapter->device_mode)) {
return 0;
}
diff --git a/core/hdd/src/wlan_hdd_ocb.c b/core/hdd/src/wlan_hdd_ocb.c
index 03fefbf..93c4bc0 100644
--- a/core/hdd/src/wlan_hdd_ocb.c
+++ b/core/hdd/src/wlan_hdd_ocb.c
@@ -494,7 +494,7 @@
return -EINVAL;
}
- if (adapter->device_mode != WLAN_HDD_OCB) {
+ if (adapter->device_mode != QDF_OCB_MODE) {
hddLog(LOGE, FL("Device not in OCB mode!"));
return -EINVAL;
}
@@ -803,7 +803,7 @@
return -EINVAL;
}
- if (adapter->device_mode != WLAN_HDD_OCB) {
+ if (adapter->device_mode != QDF_OCB_MODE) {
hddLog(LOGE, FL("Device not in OCB mode!"));
return -EINVAL;
}
@@ -998,7 +998,7 @@
return -EINVAL;
}
- if (adapter->device_mode != WLAN_HDD_OCB) {
+ if (adapter->device_mode != QDF_OCB_MODE) {
hddLog(LOGE, FL("Device not in OCB mode!"));
return -EINVAL;
}
@@ -1111,7 +1111,7 @@
return -EINVAL;
}
- if (adapter->device_mode != WLAN_HDD_OCB) {
+ if (adapter->device_mode != QDF_OCB_MODE) {
hddLog(LOGE, FL("Device not in OCB mode!"));
return -EINVAL;
}
@@ -1231,7 +1231,7 @@
return -EINVAL;
}
- if (adapter->device_mode != WLAN_HDD_OCB) {
+ if (adapter->device_mode != QDF_OCB_MODE) {
hddLog(LOGE, FL("Device not in OCB mode!"));
return -EINVAL;
}
@@ -1359,7 +1359,7 @@
return -EINVAL;
}
- if (adapter->device_mode != WLAN_HDD_OCB) {
+ if (adapter->device_mode != QDF_OCB_MODE) {
hddLog(LOGE, FL("Device not in OCB mode!"));
return -EINVAL;
}
@@ -1549,7 +1549,7 @@
return -EINVAL;
}
- if (adapter->device_mode != WLAN_HDD_OCB) {
+ if (adapter->device_mode != QDF_OCB_MODE) {
hddLog(LOGE, FL("Device not in OCB mode!"));
return -EINVAL;
}
@@ -1716,7 +1716,7 @@
return -EINVAL;
}
- if (adapter->device_mode != WLAN_HDD_OCB) {
+ if (adapter->device_mode != QDF_OCB_MODE) {
hddLog(LOGE, FL("Device not in OCB mode!"));
return -EINVAL;
}
@@ -1837,7 +1837,7 @@
goto end;
}
- if (adapter->device_mode != WLAN_HDD_OCB) {
+ if (adapter->device_mode != QDF_OCB_MODE) {
hddLog(LOGE, FL("Device not in OCB mode!"));
goto end;
}
diff --git a/core/hdd/src/wlan_hdd_oemdata.c b/core/hdd/src/wlan_hdd_oemdata.c
index 7c8a07a..0112f69 100644
--- a/core/hdd/src/wlan_hdd_oemdata.c
+++ b/core/hdd/src/wlan_hdd_oemdata.c
@@ -376,7 +376,7 @@
QDF_STATUS status = QDF_STATUS_SUCCESS;
/* for now, STA interface only */
- pAdapter = hdd_get_adapter(p_hdd_ctx, WLAN_HDD_INFRA_STATION);
+ pAdapter = hdd_get_adapter(p_hdd_ctx, QDF_STA_MODE);
if (!pAdapter) {
QDF_TRACE(QDF_MODULE_ID_HDD, QDF_TRACE_LEVEL_ERROR,
"%s: No adapter for STA mode", __func__);
@@ -609,7 +609,7 @@
uint8_t *buf;
/* for now, STA interface only */
- adapter = hdd_get_adapter(p_hdd_ctx, WLAN_HDD_INFRA_STATION);
+ adapter = hdd_get_adapter(p_hdd_ctx, QDF_STA_MODE);
if (!adapter) {
hdd_err("No adapter for STA mode");
return -EINVAL;