mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 21:59:12 -04:00
qcacld-3.0: Stop CFR once get disconnection event
CFR only works when DUT as STA and connected to AP. But, host doesn't stop CFR if CFR started and disconnect to AP. So add this change to stop CFR once get disconnection event. Change-Id: I5a616dbe4c35311fb260514a8d33ed9a1361c514 CRs-Fixed: 3026715
This commit is contained in:
parent
643385f0ac
commit
864a42ab9f
3 changed files with 54 additions and 15 deletions
|
|
@ -49,6 +49,24 @@ wlan_hdd_cfg80211_peer_cfr_capture_cfg(struct wiphy *wiphy,
|
|||
const void *data,
|
||||
int data_len);
|
||||
|
||||
#ifdef WLAN_ENH_CFR_ENABLE
|
||||
/**
|
||||
* hdd_cfr_disconnect() - Handle disconnection event in CFR
|
||||
* @vdev: Pointer to vdev object
|
||||
*
|
||||
* Handle disconnection event in CFR. Stop CFR if it started and get
|
||||
* disconnection event.
|
||||
*
|
||||
* Return: QDF status
|
||||
*/
|
||||
QDF_STATUS hdd_cfr_disconnect(struct wlan_objmgr_vdev *vdev);
|
||||
#else
|
||||
static inline QDF_STATUS
|
||||
hdd_cfr_disconnect(struct wlan_objmgr_vdev *vdev)
|
||||
{
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
#endif
|
||||
extern const struct nla_policy cfr_config_policy[
|
||||
QCA_WLAN_VENDOR_ATTR_PEER_CFR_MAX + 1];
|
||||
|
||||
|
|
@ -64,6 +82,11 @@ extern const struct nla_policy cfr_config_policy[
|
|||
},
|
||||
#else
|
||||
#define FEATURE_CFR_VENDOR_COMMANDS
|
||||
static inline QDF_STATUS
|
||||
hdd_cfr_disconnect(struct wlan_objmgr_vdev *vdev)
|
||||
{
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
#endif /* WLAN_CFR_ENABLE */
|
||||
#endif /* _WLAN_HDD_CFR_H */
|
||||
|
||||
|
|
|
|||
|
|
@ -84,6 +84,7 @@
|
|||
|
||||
#include "wlan_hdd_twt.h"
|
||||
#include "wma_api.h"
|
||||
#include "wlan_hdd_cfr.h"
|
||||
|
||||
/* These are needed to recognize WPA and RSN suite types */
|
||||
#define HDD_WPA_OUI_SIZE 4
|
||||
|
|
@ -2059,7 +2060,7 @@ static QDF_STATUS hdd_dis_connect_handler(struct hdd_adapter *adapter,
|
|||
|
||||
/* update P2P connection status */
|
||||
ucfg_p2p_status_disconnect(adapter->vdev);
|
||||
|
||||
hdd_cfr_disconnect(adapter->vdev);
|
||||
if (adapter->device_mode == QDF_STA_MODE) {
|
||||
/* Inform BLM about the disconnection with the AP */
|
||||
ucfg_blm_update_bssid_connect_params(hdd_ctx->pdev,
|
||||
|
|
|
|||
|
|
@ -461,6 +461,30 @@ wlan_cfg80211_peer_cfr_capture_cfg_adrastea(struct hdd_adapter *adapter,
|
|||
}
|
||||
#endif
|
||||
|
||||
static QDF_STATUS hdd_stop_enh_cfr(struct wlan_objmgr_vdev *vdev)
|
||||
{
|
||||
if (!ucfg_cfr_get_rcc_enabled(vdev))
|
||||
return QDF_STATUS_SUCCESS;
|
||||
|
||||
hdd_debug("cleanup rcc mode");
|
||||
wlan_objmgr_vdev_try_get_ref(vdev, WLAN_CFR_ID);
|
||||
ucfg_cfr_set_rcc_mode(vdev, RCC_DIS_ALL_MODE, 0);
|
||||
ucfg_cfr_subscribe_ppdu_desc(wlan_vdev_get_pdev(vdev),
|
||||
false);
|
||||
ucfg_cfr_committed_rcc_config(vdev);
|
||||
ucfg_cfr_stop_indication(vdev);
|
||||
ucfg_cfr_suspend(wlan_vdev_get_pdev(vdev));
|
||||
hdd_debug("stop indication done");
|
||||
wlan_objmgr_vdev_release_ref(vdev, WLAN_CFR_ID);
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
QDF_STATUS hdd_cfr_disconnect(struct wlan_objmgr_vdev *vdev)
|
||||
{
|
||||
return hdd_stop_enh_cfr(vdev);
|
||||
}
|
||||
|
||||
static int
|
||||
wlan_cfg80211_peer_enh_cfr_capture(struct hdd_adapter *adapter,
|
||||
struct nlattr **tb)
|
||||
|
|
@ -497,21 +521,12 @@ wlan_cfg80211_peer_enh_cfr_capture(struct hdd_adapter *adapter,
|
|||
QCA_WLAN_VENDOR_ATTR_PEER_CFR_ENABLE_GROUP_BITMAP]);
|
||||
hdd_debug("params.en_cfg %d", params.en_cfg);
|
||||
ucfg_cfr_set_en_bitmap(vdev, ¶ms);
|
||||
} else {
|
||||
hdd_debug("cleanup rcc mode");
|
||||
ucfg_cfr_set_rcc_mode(vdev, RCC_DIS_ALL_MODE, 0);
|
||||
}
|
||||
|
||||
if (is_start_capture)
|
||||
ucfg_cfr_resume(wlan_vdev_get_pdev(vdev));
|
||||
|
||||
ucfg_cfr_subscribe_ppdu_desc(wlan_vdev_get_pdev(vdev),
|
||||
is_start_capture);
|
||||
ucfg_cfr_committed_rcc_config(vdev);
|
||||
if (!is_start_capture) {
|
||||
ucfg_cfr_stop_indication(vdev);
|
||||
ucfg_cfr_suspend(wlan_vdev_get_pdev(vdev));
|
||||
hdd_debug("stop indication done");
|
||||
ucfg_cfr_subscribe_ppdu_desc(wlan_vdev_get_pdev(vdev),
|
||||
true);
|
||||
ucfg_cfr_committed_rcc_config(vdev);
|
||||
} else {
|
||||
hdd_stop_enh_cfr(vdev);
|
||||
}
|
||||
|
||||
out:
|
||||
|
|
|
|||
Loading…
Reference in a new issue