mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-26 06:33:19 -04:00
qcacld-3.0: Stop ap after register frame
Thread sleep since it uses mutex in SME register frame, one low rate case which change interface fail since SSR in progress and then P2P interface up fails. Solution is stopping ap after register frame. Change-Id: I3831afb2cb61c9d40aa6945def3e0a169a4115a0 CRs-Fixed: 2243849
This commit is contained in:
parent
d182f169fe
commit
df929f163a
1 changed files with 52 additions and 13 deletions
|
|
@ -5947,12 +5947,52 @@ int wlan_hdd_set_mon_chan(struct hdd_adapter *adapter, uint32_t chan,
|
|||
return qdf_status_to_os_return(status);
|
||||
}
|
||||
|
||||
#ifdef MSM_PLATFORM
|
||||
/**
|
||||
* hdd_stop_p2p_go() - call cfg80211 API to stop P2P GO
|
||||
* @adapter: pointer to adapter
|
||||
*
|
||||
* This function calls cfg80211 API to stop P2P GO
|
||||
*
|
||||
* Return: None
|
||||
*/
|
||||
static void hdd_stop_p2p_go(struct hdd_adapter *adapter)
|
||||
{
|
||||
hdd_debug("[SSR] send stop ap to supplicant");
|
||||
cfg80211_ap_stopped(adapter->dev, GFP_KERNEL);
|
||||
}
|
||||
|
||||
static inline void hdd_delete_sta(struct hdd_adapter *adapter)
|
||||
{
|
||||
}
|
||||
#else
|
||||
static inline void hdd_stop_p2p_go(struct hdd_adapter *adapter)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* hdd_delete_sta() - call cfg80211 API to delete STA
|
||||
* @adapter: pointer to adapter
|
||||
*
|
||||
* This function calls cfg80211 API to delete STA
|
||||
*
|
||||
* Return: None
|
||||
*/
|
||||
static void hdd_delete_sta(struct hdd_adapter *adapter)
|
||||
{
|
||||
struct qdf_mac_addr bcast_mac = QDF_MAC_ADDR_BCAST_INIT;
|
||||
|
||||
hdd_debug("[SSR] send restart supplicant");
|
||||
/* event supplicant to restart */
|
||||
cfg80211_del_sta(adapter->dev,
|
||||
(const u8 *)&bcast_mac.bytes[0],
|
||||
GFP_KERNEL);
|
||||
}
|
||||
#endif
|
||||
|
||||
QDF_STATUS hdd_start_all_adapters(struct hdd_context *hdd_ctx)
|
||||
{
|
||||
struct hdd_adapter *adapter;
|
||||
#ifndef MSM_PLATFORM
|
||||
struct qdf_mac_addr bcastMac = QDF_MAC_ADDR_BCAST_INIT;
|
||||
#endif
|
||||
eConnectionState connState;
|
||||
|
||||
hdd_enter();
|
||||
|
|
@ -6027,16 +6067,7 @@ QDF_STATUS hdd_start_all_adapters(struct hdd_context *hdd_ctx)
|
|||
break;
|
||||
|
||||
case QDF_P2P_GO_MODE:
|
||||
#ifdef MSM_PLATFORM
|
||||
hdd_debug("[SSR] send stop ap to supplicant");
|
||||
cfg80211_ap_stopped(adapter->dev, GFP_KERNEL);
|
||||
#else
|
||||
hdd_debug("[SSR] send restart supplicant");
|
||||
/* event supplicant to restart */
|
||||
cfg80211_del_sta(adapter->dev,
|
||||
(const u8 *)&bcastMac.bytes[0],
|
||||
GFP_KERNEL);
|
||||
#endif
|
||||
hdd_delete_sta(adapter);
|
||||
break;
|
||||
case QDF_MONITOR_MODE:
|
||||
hdd_start_station_adapter(adapter);
|
||||
|
|
@ -6054,6 +6085,14 @@ QDF_STATUS hdd_start_all_adapters(struct hdd_context *hdd_ctx)
|
|||
wlan_hdd_cfg80211_register_frames(adapter);
|
||||
}
|
||||
|
||||
hdd_for_each_adapter(hdd_ctx, adapter) {
|
||||
if (!hdd_is_interface_up(adapter))
|
||||
continue;
|
||||
|
||||
if (adapter->device_mode == QDF_P2P_GO_MODE)
|
||||
hdd_stop_p2p_go(adapter);
|
||||
}
|
||||
|
||||
hdd_exit();
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
|
|
|
|||
Loading…
Reference in a new issue