mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 13:49:24 -04:00
qcacld-3.0: (part-3)Replace enum device_mode to tCDF_ADAPTER_MODE
Instead of using two different enums for setting adapter mode, combined them to make only one set of enum. Change-Id: I963d1d7f854ecdfe8c301cc5c8fc554ce8df4e35 CRs-Fixed: 985273
This commit is contained in:
parent
be766b01b8
commit
f07bb38727
6 changed files with 38 additions and 38 deletions
|
|
@ -1386,7 +1386,7 @@ static int __wlan_hdd_cfg80211_scan(struct wiphy *wiphy,
|
|||
}
|
||||
/* set the scan type to active */
|
||||
scan_req.scanType = eSIR_ACTIVE_SCAN;
|
||||
} else if (WLAN_HDD_P2P_GO == pAdapter->device_mode) {
|
||||
} else if (QDF_P2P_GO_MODE == pAdapter->device_mode) {
|
||||
/* set the scan type to active */
|
||||
scan_req.scanType = eSIR_ACTIVE_SCAN;
|
||||
} else {
|
||||
|
|
@ -1462,9 +1462,9 @@ static int __wlan_hdd_cfg80211_scan(struct wiphy *wiphy,
|
|||
request->ie_len);
|
||||
pScanInfo->scanAddIE.length = request->ie_len;
|
||||
|
||||
if ((WLAN_HDD_INFRA_STATION == pAdapter->device_mode) ||
|
||||
(WLAN_HDD_P2P_CLIENT == pAdapter->device_mode) ||
|
||||
(WLAN_HDD_P2P_DEVICE == pAdapter->device_mode)
|
||||
if ((QDF_STA_MODE == pAdapter->device_mode) ||
|
||||
(QDF_P2P_CLIENT_MODE == pAdapter->device_mode) ||
|
||||
(QDF_P2P_DEVICE_MODE == pAdapter->device_mode)
|
||||
) {
|
||||
pwextBuf->roamProfile.pAddIEScan =
|
||||
pScanInfo->scanAddIE.addIEdata;
|
||||
|
|
@ -1482,7 +1482,7 @@ static int __wlan_hdd_cfg80211_scan(struct wiphy *wiphy,
|
|||
if (((global_p2p_connection_status == P2P_GO_NEG_COMPLETED)
|
||||
|| (global_p2p_connection_status ==
|
||||
P2P_GO_NEG_PROCESS))
|
||||
&& (WLAN_HDD_P2P_CLIENT == pAdapter->device_mode)) {
|
||||
&& (QDF_P2P_CLIENT_MODE == pAdapter->device_mode)) {
|
||||
global_p2p_connection_status =
|
||||
P2P_CLIENT_CONNECTING_STATE_1;
|
||||
hddLog(LOGE,
|
||||
|
|
@ -1492,7 +1492,7 @@ static int __wlan_hdd_cfg80211_scan(struct wiphy *wiphy,
|
|||
} else
|
||||
if ((global_p2p_connection_status ==
|
||||
P2P_CLIENT_DISCONNECTED_STATE)
|
||||
&& (WLAN_HDD_P2P_CLIENT ==
|
||||
&& (QDF_P2P_CLIENT_MODE ==
|
||||
pAdapter->device_mode)) {
|
||||
global_p2p_connection_status =
|
||||
P2P_CLIENT_CONNECTING_STATE_2;
|
||||
|
|
@ -1986,7 +1986,7 @@ static QDF_STATUS wlan_hdd_is_pno_allowed(hdd_adapter_t *adapter)
|
|||
adapter->device_mode,
|
||||
adapter->sessionCtx.station.conn_info.connState,
|
||||
adapter->sessionId);
|
||||
if ((adapter->device_mode == WLAN_HDD_INFRA_STATION) &&
|
||||
if ((adapter->device_mode == QDF_STA_MODE) &&
|
||||
(eConnectionState_NotConnected ==
|
||||
adapter->sessionCtx.station.conn_info.connState))
|
||||
return QDF_STATUS_SUCCESS;
|
||||
|
|
@ -2043,7 +2043,7 @@ static int __wlan_hdd_cfg80211_sched_scan_start(struct wiphy *wiphy,
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
if ((WLAN_HDD_INFRA_STATION == pAdapter->device_mode) &&
|
||||
if ((QDF_STA_MODE == pAdapter->device_mode) &&
|
||||
(eConnectionState_Connecting ==
|
||||
(WLAN_HDD_GET_STATION_CTX_PTR(pAdapter))->conn_info.connState)) {
|
||||
hddLog(LOGE,
|
||||
|
|
|
|||
|
|
@ -518,15 +518,15 @@ static bool put_wifi_iface_stats(tpSirWifiIfaceStat pWifiIfaceStat,
|
|||
static tSirWifiInterfaceMode hdd_map_device_to_ll_iface_mode(int deviceMode)
|
||||
{
|
||||
switch (deviceMode) {
|
||||
case WLAN_HDD_INFRA_STATION:
|
||||
case QDF_STA_MODE:
|
||||
return WIFI_INTERFACE_STA;
|
||||
case WLAN_HDD_SOFTAP:
|
||||
case QDF_SAP_MODE:
|
||||
return WIFI_INTERFACE_SOFTAP;
|
||||
case WLAN_HDD_P2P_CLIENT:
|
||||
case QDF_P2P_CLIENT_MODE:
|
||||
return WIFI_INTERFACE_P2P_CLIENT;
|
||||
case WLAN_HDD_P2P_GO:
|
||||
case QDF_P2P_GO_MODE:
|
||||
return WIFI_INTERFACE_P2P_GO;
|
||||
case WLAN_HDD_IBSS:
|
||||
case QDF_IBSS_MODE:
|
||||
return WIFI_INTERFACE_IBSS;
|
||||
default:
|
||||
/* Return Interface Mode as STA for all the unsupported modes */
|
||||
|
|
@ -553,9 +553,9 @@ static bool hdd_get_interface_info(hdd_adapter_t *pAdapter,
|
|||
|
||||
qdf_copy_macaddr(&pInfo->macAddr, &pAdapter->macAddressCurrent);
|
||||
|
||||
if (((WLAN_HDD_INFRA_STATION == pAdapter->device_mode) ||
|
||||
(WLAN_HDD_P2P_CLIENT == pAdapter->device_mode) ||
|
||||
(WLAN_HDD_P2P_DEVICE == pAdapter->device_mode))) {
|
||||
if (((QDF_STA_MODE == pAdapter->device_mode) ||
|
||||
(QDF_P2P_CLIENT_MODE == pAdapter->device_mode) ||
|
||||
(QDF_P2P_DEVICE_MODE == pAdapter->device_mode))) {
|
||||
pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(pAdapter);
|
||||
if (eConnectionState_NotConnected ==
|
||||
pHddStaCtx->conn_info.connState) {
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ static int __wlan_hdd_cfg80211_set_gateway_params(struct wiphy *wiphy,
|
|||
/* The gateway parameters are only valid in the STA persona
|
||||
* and only in the connected state.
|
||||
*/
|
||||
if (WLAN_HDD_INFRA_STATION != adapter->device_mode) {
|
||||
if (QDF_STA_MODE != adapter->device_mode) {
|
||||
hdd_err("Received GW param update for non-STA mode adapter");
|
||||
return -ENOTSUPP;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -121,7 +121,7 @@ void wlan_hdd_tdls_disable_offchan_and_teardown_links(hdd_context_t *hddctx)
|
|||
return ;
|
||||
}
|
||||
|
||||
adapter = hdd_get_adapter(hddctx, WLAN_HDD_INFRA_STATION);
|
||||
adapter = hdd_get_adapter(hddctx, QDF_STA_MODE);
|
||||
|
||||
if (adapter == NULL) {
|
||||
hddLog(LOGE, FL("Station Adapter Not Found"));
|
||||
|
|
@ -180,7 +180,7 @@ void wlan_hdd_tdls_disable_offchan_and_teardown_links(hdd_context_t *hddctx)
|
|||
*/
|
||||
void hdd_tdls_notify_mode_change(hdd_adapter_t *adapter, hdd_context_t *hddctx)
|
||||
{
|
||||
if (adapter->device_mode != WLAN_HDD_INFRA_STATION)
|
||||
if (adapter->device_mode != QDF_STA_MODE)
|
||||
wlan_hdd_tdls_disable_offchan_and_teardown_links(hddctx);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -327,7 +327,7 @@ int hdd_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
|
|||
return NETDEV_TX_OK;
|
||||
}
|
||||
|
||||
if (WLAN_HDD_IBSS == pAdapter->device_mode) {
|
||||
if (QDF_IBSS_MODE == pAdapter->device_mode) {
|
||||
struct qdf_mac_addr *pDestMacAddress =
|
||||
(struct qdf_mac_addr *) skb->data;
|
||||
|
||||
|
|
@ -353,7 +353,7 @@ int hdd_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
|
|||
return NETDEV_TX_OK;
|
||||
}
|
||||
} else {
|
||||
if (WLAN_HDD_OCB != pAdapter->device_mode &&
|
||||
if (QDF_OCB_MODE != pAdapter->device_mode &&
|
||||
eConnectionState_Associated !=
|
||||
pHddStaCtx->conn_info.connState) {
|
||||
QDF_TRACE(QDF_MODULE_ID_HDD_DATA, QDF_TRACE_LEVEL_INFO,
|
||||
|
|
|
|||
|
|
@ -1933,7 +1933,7 @@ static int __iw_set_mode(struct net_device *dev,
|
|||
pConfig = (WLAN_HDD_GET_CTX(pAdapter))->config;
|
||||
pWextState->roamProfile.phyMode =
|
||||
hdd_cfg_xlate_to_csr_phy_mode(pConfig->dot11Mode);
|
||||
pAdapter->device_mode = WLAN_HDD_IBSS;
|
||||
pAdapter->device_mode = QDF_IBSS_MODE;
|
||||
wdev->iftype = NL80211_IFTYPE_ADHOC;
|
||||
break;
|
||||
case IW_MODE_INFRA:
|
||||
|
|
@ -6009,7 +6009,7 @@ static int __iw_setint_getnone(struct net_device *dev,
|
|||
|
||||
case WE_PPS_PAID_MATCH:
|
||||
{
|
||||
if (pAdapter->device_mode != WLAN_HDD_INFRA_STATION)
|
||||
if (pAdapter->device_mode != QDF_STA_MODE)
|
||||
return EINVAL;
|
||||
|
||||
hddLog(LOG1, "WMI_VDEV_PPS_PAID_MATCH val %d ",
|
||||
|
|
@ -6022,7 +6022,7 @@ static int __iw_setint_getnone(struct net_device *dev,
|
|||
|
||||
case WE_PPS_GID_MATCH:
|
||||
{
|
||||
if (pAdapter->device_mode != WLAN_HDD_INFRA_STATION)
|
||||
if (pAdapter->device_mode != QDF_STA_MODE)
|
||||
return EINVAL;
|
||||
hddLog(LOG1, "WMI_VDEV_PPS_GID_MATCH val %d ",
|
||||
set_value);
|
||||
|
|
@ -6034,7 +6034,7 @@ static int __iw_setint_getnone(struct net_device *dev,
|
|||
|
||||
case WE_PPS_EARLY_TIM_CLEAR:
|
||||
{
|
||||
if (pAdapter->device_mode != WLAN_HDD_INFRA_STATION)
|
||||
if (pAdapter->device_mode != QDF_STA_MODE)
|
||||
return EINVAL;
|
||||
hddLog(LOG1, " WMI_VDEV_PPS_EARLY_TIM_CLEAR val %d ",
|
||||
set_value);
|
||||
|
|
@ -6046,7 +6046,7 @@ static int __iw_setint_getnone(struct net_device *dev,
|
|||
|
||||
case WE_PPS_EARLY_DTIM_CLEAR:
|
||||
{
|
||||
if (pAdapter->device_mode != WLAN_HDD_INFRA_STATION)
|
||||
if (pAdapter->device_mode != QDF_STA_MODE)
|
||||
return EINVAL;
|
||||
hddLog(LOG1, "WMI_VDEV_PPS_EARLY_DTIM_CLEAR val %d",
|
||||
set_value);
|
||||
|
|
@ -6058,7 +6058,7 @@ static int __iw_setint_getnone(struct net_device *dev,
|
|||
|
||||
case WE_PPS_EOF_PAD_DELIM:
|
||||
{
|
||||
if (pAdapter->device_mode != WLAN_HDD_INFRA_STATION)
|
||||
if (pAdapter->device_mode != QDF_STA_MODE)
|
||||
return EINVAL;
|
||||
hddLog(LOG1, "WMI_VDEV_PPS_EOF_PAD_DELIM val %d ",
|
||||
set_value);
|
||||
|
|
@ -6070,7 +6070,7 @@ static int __iw_setint_getnone(struct net_device *dev,
|
|||
|
||||
case WE_PPS_MACADDR_MISMATCH:
|
||||
{
|
||||
if (pAdapter->device_mode != WLAN_HDD_INFRA_STATION)
|
||||
if (pAdapter->device_mode != QDF_STA_MODE)
|
||||
return EINVAL;
|
||||
hddLog(LOG1, "WMI_VDEV_PPS_MACADDR_MISMATCH val %d ",
|
||||
set_value);
|
||||
|
|
@ -6082,7 +6082,7 @@ static int __iw_setint_getnone(struct net_device *dev,
|
|||
|
||||
case WE_PPS_DELIM_CRC_FAIL:
|
||||
{
|
||||
if (pAdapter->device_mode != WLAN_HDD_INFRA_STATION)
|
||||
if (pAdapter->device_mode != QDF_STA_MODE)
|
||||
return EINVAL;
|
||||
hddLog(LOG1, "WMI_VDEV_PPS_DELIM_CRC_FAIL val %d ",
|
||||
set_value);
|
||||
|
|
@ -6094,7 +6094,7 @@ static int __iw_setint_getnone(struct net_device *dev,
|
|||
|
||||
case WE_PPS_GID_NSTS_ZERO:
|
||||
{
|
||||
if (pAdapter->device_mode != WLAN_HDD_INFRA_STATION)
|
||||
if (pAdapter->device_mode != QDF_STA_MODE)
|
||||
return EINVAL;
|
||||
hddLog(LOG1, "WMI_VDEV_PPS_GID_NSTS_ZERO val %d ",
|
||||
set_value);
|
||||
|
|
@ -6106,7 +6106,7 @@ static int __iw_setint_getnone(struct net_device *dev,
|
|||
|
||||
case WE_PPS_RSSI_CHECK:
|
||||
{
|
||||
if (pAdapter->device_mode != WLAN_HDD_INFRA_STATION)
|
||||
if (pAdapter->device_mode != QDF_STA_MODE)
|
||||
return EINVAL;
|
||||
hddLog(LOG1, "WMI_VDEV_PPS_RSSI_CHECK val %d ",
|
||||
set_value);
|
||||
|
|
@ -6118,7 +6118,7 @@ static int __iw_setint_getnone(struct net_device *dev,
|
|||
|
||||
case WE_PPS_5G_EBT:
|
||||
{
|
||||
if (pAdapter->device_mode != WLAN_HDD_INFRA_STATION)
|
||||
if (pAdapter->device_mode != QDF_STA_MODE)
|
||||
return -EINVAL;
|
||||
|
||||
hddLog(LOG1, "WMI_VDEV_PPS_5G_EBT val %d", set_value);
|
||||
|
|
@ -6296,8 +6296,8 @@ static int __iw_setint_getnone(struct net_device *dev,
|
|||
hddLog(LOG1, "Set Channel %d Session ID %d mode %d", set_value,
|
||||
pAdapter->sessionId, pAdapter->device_mode);
|
||||
|
||||
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)) {
|
||||
|
||||
status = sme_ext_change_channel(hHal,
|
||||
set_value, pAdapter->sessionId);
|
||||
|
|
@ -7193,7 +7193,7 @@ static int __iw_get_char_setnone(struct net_device *dev,
|
|||
*/
|
||||
useAdapter =
|
||||
hdd_get_adapter(pHddCtx,
|
||||
WLAN_HDD_P2P_CLIENT);
|
||||
QDF_P2P_CLIENT_MODE);
|
||||
if (!useAdapter) {
|
||||
buf =
|
||||
scnprintf(extra + len,
|
||||
|
|
@ -7866,7 +7866,7 @@ static int __iw_set_var_ints_getnone(struct net_device *dev,
|
|||
{
|
||||
p2p_app_setP2pPs_t p2pNoA;
|
||||
|
||||
if (pAdapter->device_mode != WLAN_HDD_P2P_GO) {
|
||||
if (pAdapter->device_mode != QDF_P2P_GO_MODE) {
|
||||
hdd_err("Setting NoA is not allowed in Device mode %s(%d)",
|
||||
hdd_device_mode_to_string(
|
||||
pAdapter->device_mode),
|
||||
|
|
@ -9570,8 +9570,8 @@ int hdd_set_band(struct net_device *dev, u8 ui_band)
|
|||
|
||||
/* Handling is done only for STA and P2P */
|
||||
if (band != eCSR_BAND_ALL &&
|
||||
((pAdapter->device_mode == WLAN_HDD_INFRA_STATION)
|
||||
|| (pAdapter->device_mode == WLAN_HDD_P2P_CLIENT))
|
||||
((pAdapter->device_mode == QDF_STA_MODE)
|
||||
|| (pAdapter->device_mode == QDF_P2P_CLIENT_MODE))
|
||||
&&
|
||||
(hdd_conn_is_connected
|
||||
(WLAN_HDD_GET_STATION_CTX_PTR(pAdapter)))
|
||||
|
|
|
|||
Loading…
Reference in a new issue