mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-13 08:07:32 -04:00
qcacld-3.0: Support NSS configuration for TDLS from user space
qcacld-2.0 to qcacld-3.0 propagation TDLS NSS can be changed dynamically by the user, if that happens the newer NSS value needs to be recorded in the MAC context and should be used to form TDLS management frames. Update driver to keep the user configured NSS value in the MAC context and uses the NSS value in the tdls protocol engine to construct management frames. Change-Id: I4098e3c5e3a03c4de6ae40c837a5616613623979 CRs-Fixed: 968106
This commit is contained in:
parent
2ad7de2b2d
commit
5041b2579e
5 changed files with 31 additions and 2 deletions
|
|
@ -6665,10 +6665,19 @@ static int drv_cmd_set_antenna_mode(hdd_adapter_t *adapter,
|
|||
goto exit;
|
||||
}
|
||||
|
||||
hdd_info("Successfully switched to mode: %d x %d", mode, mode);
|
||||
ret = 0;
|
||||
hdd_ctx->current_antenna_mode = mode;
|
||||
/* Update the user requested nss in the mac context.
|
||||
* This will be used in tdls protocol engine to form tdls
|
||||
* Management frames.
|
||||
*/
|
||||
sme_update_user_configured_nss(
|
||||
hdd_ctx->hHal,
|
||||
hdd_ctx->current_antenna_mode);
|
||||
|
||||
hdd_info("Successfully switched to mode: %d x %d",
|
||||
hdd_ctx->current_antenna_mode,
|
||||
hdd_ctx->current_antenna_mode);
|
||||
ret = 0;
|
||||
exit:
|
||||
hdd_info("Set antenna status: %d current mode: %d",
|
||||
ret, hdd_ctx->current_antenna_mode);
|
||||
|
|
|
|||
|
|
@ -1084,6 +1084,7 @@ typedef struct sAniSirGlobal {
|
|||
bool first_scan_done;
|
||||
int8_t first_scan_bucket_threshold;
|
||||
enum auth_tx_ack_status auth_ack_status;
|
||||
uint8_t user_configured_nss;
|
||||
} tAniSirGlobal;
|
||||
|
||||
typedef enum {
|
||||
|
|
|
|||
|
|
@ -548,6 +548,7 @@ static void populate_dot11f_tdls_ht_vht_cap(tpAniSirGlobal pMac,
|
|||
else
|
||||
nss = pMac->vdev_type_nss_2g.tdls;
|
||||
|
||||
nss = QDF_MIN(nss, pMac->user_configured_nss);
|
||||
if (IS_DOT11_MODE_HT(selfDot11Mode)) {
|
||||
/* Include HT Capability IE */
|
||||
populate_dot11f_ht_caps(pMac, NULL, htCap);
|
||||
|
|
@ -2266,6 +2267,9 @@ lim_tdls_populate_matching_rate_set(tpAniSirGlobal mac_ctx, tpDphHashNode stads,
|
|||
nss = mac_ctx->vdev_type_nss_5g.tdls;
|
||||
else
|
||||
nss = mac_ctx->vdev_type_nss_2g.tdls;
|
||||
|
||||
nss = QDF_MIN(nss, mac_ctx->user_configured_nss);
|
||||
|
||||
/* compute the matching MCS rate set, if peer is 11n capable and self mode is 11n */
|
||||
#ifdef FEATURE_WLAN_TDLS
|
||||
if (stads->mlmStaContext.htCapability)
|
||||
|
|
|
|||
|
|
@ -978,6 +978,7 @@ QDF_STATUS sme_register_mgmt_frame_ind_callback(tHalHandle hal,
|
|||
sir_mgmt_frame_ind_callback callback);
|
||||
|
||||
QDF_STATUS sme_update_nss(tHalHandle h_hal, uint8_t nss);
|
||||
void sme_update_user_configured_nss(tHalHandle hal, uint8_t nss);
|
||||
|
||||
bool sme_is_any_session_in_connected_state(tHalHandle h_hal);
|
||||
|
||||
|
|
|
|||
|
|
@ -14459,6 +14459,20 @@ QDF_STATUS sme_update_nss(tHalHandle h_hal, uint8_t nss)
|
|||
return status;
|
||||
}
|
||||
|
||||
/**
|
||||
* sme_update_user_configured_nss() - sets the nss based on user request
|
||||
* @hal: Pointer to HAL
|
||||
* @nss: number of streams
|
||||
*
|
||||
* Return: None
|
||||
*/
|
||||
void sme_update_user_configured_nss(tHalHandle hal, uint8_t nss)
|
||||
{
|
||||
tpAniSirGlobal mac_ctx = PMAC_STRUCT(hal);
|
||||
|
||||
mac_ctx->user_configured_nss = nss;
|
||||
}
|
||||
|
||||
/**
|
||||
* sme_set_rssi_threshold_breached_cb() - set rssi threshold breached callback
|
||||
* @hal: global hal handle
|
||||
|
|
|
|||
Loading…
Reference in a new issue