summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYun Park <yunp@qca.qualcomm.com>2014-08-01 13:17:30 -0700
committerPitani Venkata Rajesh Kumar <c_vpitan@qti.qualcomm.com>2014-08-20 13:16:53 +0530
commit80a5941c16c67f77b899fde16abcdb8aaf6a3e01 (patch)
tree8224cd170c2bc5e4d4d650de10a49b10d6ed8619
parent9009fbbed4878070f0d4f60c070a270aec467ecd (diff)
qcacld: Remove SAP interface name "softap.0"
This change is to completely remove the SAP interface name "softap.0". Also removed initAP/exitAP from iwpriv command. Change-Id: I4929e1f6dec43b60b891f4fd338e955e0fc48682 CRs-fixed: 711036
-rwxr-xr-xCORE/HDD/src/wlan_hdd_main.c76
-rw-r--r--CORE/HDD/src/wlan_hdd_wext.c75
2 files changed, 34 insertions, 117 deletions
diff --git a/CORE/HDD/src/wlan_hdd_main.c b/CORE/HDD/src/wlan_hdd_main.c
index 427efc364858..ec98b5624acb 100755
--- a/CORE/HDD/src/wlan_hdd_main.c
+++ b/CORE/HDD/src/wlan_hdd_main.c
@@ -11359,60 +11359,52 @@ int hdd_wlan_startup(struct device *dev, v_VOID_t *hif_sc)
return VOS_STATUS_SUCCESS;
}
- if (VOS_STA_SAP_MODE == hdd_get_conparam())
- {
- pAdapter = hdd_open_adapter( pHddCtx, WLAN_HDD_SOFTAP, "softap.%d",
- wlan_hdd_get_intf_addr(pHddCtx), FALSE );
- }
- else
- {
- pAdapter = hdd_open_adapter( pHddCtx, WLAN_HDD_INFRA_STATION, "wlan%d",
- wlan_hdd_get_intf_addr(pHddCtx), FALSE );
+ pAdapter = hdd_open_adapter( pHddCtx, WLAN_HDD_INFRA_STATION, "wlan%d",
+ wlan_hdd_get_intf_addr(pHddCtx), FALSE );
#ifdef WLAN_OPEN_P2P_INTERFACE
- /* Open P2P device interface */
- if (pAdapter != NULL)
- {
- if ( pHddCtx->cfg_ini->isP2pDeviceAddrAdministrated )
- {
- vos_mem_copy( pHddCtx->p2pDeviceAddress.bytes,
- pHddCtx->cfg_ini->intfMacAddr[0].bytes,
- sizeof(tSirMacAddr));
+ /* Open P2P device interface */
+ if (pAdapter != NULL)
+ {
+ if (pHddCtx->cfg_ini->isP2pDeviceAddrAdministrated)
+ {
+ vos_mem_copy( pHddCtx->p2pDeviceAddress.bytes,
+ pHddCtx->cfg_ini->intfMacAddr[0].bytes,
+ sizeof(tSirMacAddr));
- /* Generate the P2P Device Address. This consists of the device's
- * primary MAC address with the locally administered bit set.
- */
- pHddCtx->p2pDeviceAddress.bytes[0] |= 0x02;
+ /* Generate the P2P Device Address. This consists of the device's
+ * primary MAC address with the locally administered bit set.
+ */
+ pHddCtx->p2pDeviceAddress.bytes[0] |= 0x02;
+ }
+ else
+ {
+ tANI_U8* p2p_dev_addr = wlan_hdd_get_intf_addr(pHddCtx);
+ if (p2p_dev_addr != NULL)
+ {
+ vos_mem_copy(&pHddCtx->p2pDeviceAddress.bytes[0],
+ p2p_dev_addr, VOS_MAC_ADDR_SIZE);
}
else
{
- tANI_U8* p2p_dev_addr = wlan_hdd_get_intf_addr(pHddCtx);
- if (p2p_dev_addr != NULL)
- {
- vos_mem_copy(&pHddCtx->p2pDeviceAddress.bytes[0],
- p2p_dev_addr, VOS_MAC_ADDR_SIZE);
- }
- else
- {
- hddLog(VOS_TRACE_LEVEL_FATAL,
- "%s: Failed to allocate mac_address for p2p_device",
+ hddLog(VOS_TRACE_LEVEL_FATAL,
+ "%s: Failed to allocate mac_address for p2p_device",
__func__);
- goto err_close_adapter;
- }
+ goto err_close_adapter;
}
+ }
- pP2pAdapter = hdd_open_adapter( pHddCtx, WLAN_HDD_P2P_DEVICE, "p2p%d",
- &pHddCtx->p2pDeviceAddress.bytes[0], FALSE );
- if ( NULL == pP2pAdapter )
- {
- hddLog(VOS_TRACE_LEVEL_FATAL,
+ pP2pAdapter = hdd_open_adapter( pHddCtx, WLAN_HDD_P2P_DEVICE, "p2p%d",
+ &pHddCtx->p2pDeviceAddress.bytes[0], FALSE );
+ if ( NULL == pP2pAdapter )
+ {
+ hddLog(VOS_TRACE_LEVEL_FATAL,
"%s: Failed to do hdd_open_adapter for P2P Device Interface",
__func__);
- goto err_close_adapter;
- }
- }
-#endif
+ goto err_close_adapter;
+ }
}
+#endif
if( pAdapter == NULL )
{
diff --git a/CORE/HDD/src/wlan_hdd_wext.c b/CORE/HDD/src/wlan_hdd_wext.c
index 4295664e5230..64f2483e3158 100644
--- a/CORE/HDD/src/wlan_hdd_wext.c
+++ b/CORE/HDD/src/wlan_hdd_wext.c
@@ -345,8 +345,6 @@ static const hdd_freq_chan_map_t freq_chan_map[] = { {2412, 1}, {2417, 2},
/* Private ioctls and their sub-ioctls */
#define WLAN_PRIV_SET_NONE_GET_NONE (SIOCIWFIRSTPRIV + 6)
#define WE_CLEAR_STATS 1
-#define WE_INIT_AP 2
-#define WE_STOP_AP 3
#ifdef WLAN_BTAMP_FEATURE
#define WE_ENABLE_AMP 4
#define WE_DISABLE_AMP 5
@@ -7132,71 +7130,6 @@ static int iw_setnone_getnone(struct net_device *dev, struct iw_request_info *in
break;
}
- case WE_INIT_AP:
- {
-#ifndef WLAN_FEATURE_MBSSID
- /* As Soft AP mode might been changed to STA already with
- * killing of Hostapd, need to find the adpater by name
- * rather than mode */
- hdd_adapter_t* pAdapter_to_stop =
- hdd_get_adapter_by_name(WLAN_HDD_GET_CTX(pAdapter), "softap.0");
- if( pAdapter_to_stop )
- {
- VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
- "Adapter with name softap.0 already "
- "exist, ignoring the request.\nRemove the "
- "adapter and try again\n");
- ret = -EINVAL;
- break;
- }
-#endif
- pr_info("Init AP trigger\n");
- hdd_open_adapter( WLAN_HDD_GET_CTX(pAdapter), WLAN_HDD_SOFTAP, "softap.%d",
- wlan_hdd_get_intf_addr( WLAN_HDD_GET_CTX(pAdapter) ),TRUE);
- break;
- }
- case WE_STOP_AP:
- {
- /*FIX ME: Need to be revisited if multiple SAPs to be supported */
- /* As Soft AP mode has been changed to STA already with killing of Hostapd,
- * this is a dead code and need to find the adpater by name rather than mode */
- hdd_adapter_t* pAdapter_to_stop =
- hdd_get_adapter_by_name(WLAN_HDD_GET_CTX(pAdapter), "softap.0");
- if( pAdapter_to_stop )
- {
- hdd_context_t *pHddCtx = WLAN_HDD_GET_CTX(pAdapter);
-
- pr_info("Stopping AP mode\n");
-
- if (TRUE == sme_IsPmcBmps(WLAN_HDD_GET_HAL_CTX(pAdapter)))
- {
- /* EXIT BMPS as fw cannot handle DEL_STA when its in BMPS */
- wlan_hdd_enter_bmps(pAdapter, DRIVER_POWER_MODE_ACTIVE);
- }
-
- /*Make sure that pAdapter cleaned properly*/
- hdd_stop_adapter( pHddCtx, pAdapter_to_stop, VOS_TRUE );
- hdd_deinit_adapter( pHddCtx, pAdapter_to_stop );
- memset(&pAdapter_to_stop->sessionCtx, 0, sizeof(pAdapter_to_stop->sessionCtx));
-
- wlan_hdd_release_intf_addr(WLAN_HDD_GET_CTX(pAdapter),
- pAdapter_to_stop->macAddressCurrent.bytes);
- hdd_close_adapter(WLAN_HDD_GET_CTX(pAdapter), pAdapter_to_stop,
- TRUE);
-
- if (FALSE == sme_IsPmcBmps(WLAN_HDD_GET_HAL_CTX(pAdapter)))
- {
- /* put the device back into BMPS */
- wlan_hdd_enter_bmps(pAdapter, DRIVER_POWER_MODE_AUTO);
- }
- }
- else
- {
- printk(KERN_ERR"SAP adapter not found to stop it!\n");
- }
-
- break;
- }
#ifdef WLAN_BTAMP_FEATURE
case WE_ENABLE_AMP:
{
@@ -10436,18 +10369,10 @@ static const struct iw_priv_args we_private_args[] = {
0,
0,
"clearStats" },
- { WE_INIT_AP,
- 0,
- 0,
- "initAP" },
{ WE_GET_RECOVERY_STAT,
0,
0,
"getRecoverStat" },
- { WE_STOP_AP,
- 0,
- 0,
- "exitAP" },
#ifdef WLAN_BTAMP_FEATURE
{ WE_ENABLE_AMP,
0,