qcacld-3.0: Fix data stall when connect a special SAP

For SAP with special OUI, if DUT STA connect it with 11ax mode with ht
control enabled, SAP can't decode unicast pkt from DUT.

Fix it by clearing ht control bit in he cap when send peer assoc cmd
to firmware when connect such IOT AP with 11ax mode.

Change-Id: Icf9d6d7ddc370c79e615a713c76606e7fd195fd3
CRs-Fixed: 3004761
This commit is contained in:
Jianmin Zhu 2021-08-05 22:57:40 +08:00 • committed by Madan Koyyalamudi
commit 00288620ea
6 changed files with 80 additions and 0 deletions

View file

@ -250,6 +250,7 @@ struct mscs_req_info {
* @last_delba_sent_time: Last delba sent time to handle back to back delba
* requests from some IOT APs
* @ba_2k_jump_iot_ap: This is set to true if connected to the ba 2k jump IOT AP
* @bad_htc_he_iot_ap: Set to true if connected to AP who can't decode htc he
*/
struct mlme_legacy_priv {
bool chan_switch_in_progress;
@ -287,6 +288,7 @@ struct mlme_legacy_priv {
#endif
qdf_time_t last_delba_sent_time;
bool ba_2k_jump_iot_ap;
bool bad_htc_he_iot_ap;
};

View file

@ -3137,6 +3137,25 @@ wlan_mlme_set_ba_2k_jump_iot_ap(struct wlan_objmgr_vdev *vdev, bool found);
bool
wlan_mlme_is_ba_2k_jump_iot_ap(struct wlan_objmgr_vdev *vdev);
/**
* wlan_mlme_set_bad_htc_he_iot_ap() - Set a flag if bad htc he IOT AP is found
* @vdev: vdev pointer
* @found: Carries the value true if bad htc he AP is found
*
* Return: QDF Status
*/
QDF_STATUS
wlan_mlme_set_bad_htc_he_iot_ap(struct wlan_objmgr_vdev *vdev, bool found);
/**
* wlan_mlme_is_bad_htc_he_iot_ap() - Check if bad htc he IOT AP is found
* @vdev: vdev pointer
*
* Return: true if bad htc he IOT AP is found
*/
bool
wlan_mlme_is_bad_htc_he_iot_ap(struct wlan_objmgr_vdev *vdev);
/**
* wlan_mlme_set_last_delba_sent_time() - Cache the last delba sent ts
* @vdev: vdev pointer

View file

@ -4815,6 +4815,36 @@ bool wlan_mlme_is_ba_2k_jump_iot_ap(struct wlan_objmgr_vdev *vdev)
return mlme_priv->ba_2k_jump_iot_ap;
}
QDF_STATUS
wlan_mlme_set_bad_htc_he_iot_ap(struct wlan_objmgr_vdev *vdev, bool found)
{
struct mlme_legacy_priv *mlme_priv;
mlme_priv = wlan_vdev_mlme_get_ext_hdl(vdev);
if (!mlme_priv) {
mlme_legacy_err("vdev legacy private object is NULL");
return QDF_STATUS_E_FAILURE;
}
mlme_priv->bad_htc_he_iot_ap = found;
mlme_legacy_debug("set bad htc he iot ap: %d", found);
return QDF_STATUS_SUCCESS;
}
bool wlan_mlme_is_bad_htc_he_iot_ap(struct wlan_objmgr_vdev *vdev)
{
struct mlme_legacy_priv *mlme_priv;
mlme_priv = wlan_vdev_mlme_get_ext_hdl(vdev);
if (!mlme_priv) {
mlme_legacy_err("vdev legacy private object is NULL");
return false;
}
return mlme_priv->bad_htc_he_iot_ap;
}
QDF_STATUS
wlan_mlme_set_last_delba_sent_time(struct wlan_objmgr_vdev *vdev,
qdf_time_t delba_sent_time)

View file

@ -341,6 +341,10 @@
#define SIR_MAC_BA_2K_JUMP_AP_VENDOR_OUI "\x00\x14\x6C"
#define SIR_MAC_BA_2K_JUMP_AP_VENDOR_OUI_LEN 3
#define SIR_MAC_BAD_HTC_HE_VENDOR_OUI1 "\x00\x50\xF2\x11"
#define SIR_MAC_BAD_HTC_HE_VENDOR_OUI2 "\x00\x50\xF2\x12"
#define SIR_MAC_BAD_HTC_HE_VENDOR_OUI_LEN 4
/* Maximum allowable size of a beacon and probe rsp frame */
#define SIR_MAX_BEACON_SIZE 512
#define SIR_MAX_PROBE_RESP_SIZE 512

View file

@ -7061,6 +7061,11 @@ void lim_intersect_ap_he_caps(struct pe_session *session, struct bss_params *add
lim_intersect_he_caps(rcvd_he, peer_he, session);
add_bss->staContext.he_capable = true;
if (wlan_mlme_is_bad_htc_he_iot_ap(session->vdev)) {
peer_he->htc_he = 0;
pe_debug("disable ht control in he cap for iot ap");
}
}
void lim_add_bss_he_cap(struct bss_params *add_bss, tpSirAssocRsp assoc_rsp)

View file

@ -15103,6 +15103,26 @@ QDF_STATUS csr_send_join_req_msg(struct mac_context *mac, uint32_t sessionId,
wlan_mlme_set_ba_2k_jump_iot_ap(vdev,
is_vendor_ap_present);
is_vendor_ap_present = wlan_get_vendor_ie_ptr_from_oui
(SIR_MAC_BAD_HTC_HE_VENDOR_OUI1,
SIR_MAC_BAD_HTC_HE_VENDOR_OUI_LEN,
vendor_ap_search_attr.ie_data,
vendor_ap_search_attr.ie_length);
is_vendor_ap_present =
is_vendor_ap_present &&
wlan_get_vendor_ie_ptr_from_oui
(SIR_MAC_BAD_HTC_HE_VENDOR_OUI2,
SIR_MAC_BAD_HTC_HE_VENDOR_OUI_LEN,
vendor_ap_search_attr.ie_data,
vendor_ap_search_attr.ie_length);
/*
* For SAP with special OUI, if DUT STA connect with
* htc he enabled, SAP can't decode data pkt from DUT.
*/
wlan_mlme_set_bad_htc_he_iot_ap(vdev,
is_vendor_ap_present);
wlan_objmgr_vdev_release_ref(vdev, WLAN_LEGACY_MAC_ID);
}