mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-13 08:07:32 -04:00
qcacld-3.0: Fill correct mode information for deleted sta
80211 mode information is not getting filled correctly, fill correct 802.11 mode information. Change-Id: I7013db95c5010bdaac1f84209534f63d6c7f5719 CRs-Fixed: 2133109
This commit is contained in:
parent
cf5a506bba
commit
d523f0dcab
3 changed files with 62 additions and 1 deletions
|
|
@ -790,6 +790,14 @@ struct hdd_fw_txrx_stats {
|
|||
* @max_mcs_idx: Max supported mcs index of the station
|
||||
* @rx_mcs_map: VHT Rx mcs map
|
||||
* @tx_mcs_map: VHT Tx mcs map
|
||||
* @freq : Frequency of the current station
|
||||
* @dot11_mode: 802.11 Mode of the connection
|
||||
* @ht_present: HT caps present or not in the current station
|
||||
* @vht_present: VHT caps present or not in the current station
|
||||
* @ht_caps: HT capabilities of current station
|
||||
* @vht_caps: VHT capabilities of current station
|
||||
* @reason_code: Disconnection reason code for current station
|
||||
* @rssi: RSSI of the current station reported from F/W
|
||||
*/
|
||||
struct hdd_station_info {
|
||||
bool in_use;
|
||||
|
|
@ -823,6 +831,7 @@ struct hdd_station_info {
|
|||
uint8_t rx_mcs_map;
|
||||
uint8_t tx_mcs_map;
|
||||
uint32_t freq;
|
||||
uint8_t dot11_mode;
|
||||
bool ht_present;
|
||||
bool vht_present;
|
||||
struct ieee80211_ht_cap ht_caps;
|
||||
|
|
|
|||
|
|
@ -5266,7 +5266,7 @@ static int hdd_get_cached_station_remote(struct hdd_context *hdd_ctx,
|
|||
|
||||
nl_buf_len += hdd_add_link_standard_info_sap_get_len() +
|
||||
hdd_add_ap_standard_info_sap_get_len(stainfo) +
|
||||
(sizeof(stainfo->mode) + NLA_HDRLEN) +
|
||||
(sizeof(stainfo->dot11_mode) + NLA_HDRLEN) +
|
||||
(sizeof(stainfo->ch_width) + NLA_HDRLEN) +
|
||||
(sizeof(stainfo->tx_rate) + NLA_HDRLEN) +
|
||||
(sizeof(stainfo->rx_rate) + NLA_HDRLEN);
|
||||
|
|
|
|||
|
|
@ -1396,6 +1396,55 @@ static int calcuate_max_phy_rate(int mode, int nss, int ch_width,
|
|||
return maxrate;
|
||||
}
|
||||
|
||||
/**
|
||||
* hdd_convert_dot11mode_from_phymode() - get dot11 mode from phymode
|
||||
* @phymode: phymode of sta associated to SAP
|
||||
*
|
||||
* The function is to convert the phymode to corresponding dot11 mode
|
||||
*
|
||||
* Return: dot11mode.
|
||||
*/
|
||||
|
||||
|
||||
static int hdd_convert_dot11mode_from_phymode(int phymode)
|
||||
{
|
||||
|
||||
switch (phymode) {
|
||||
|
||||
case MODE_11A:
|
||||
return QCA_WLAN_802_11_MODE_11A;
|
||||
|
||||
case MODE_11B:
|
||||
return QCA_WLAN_802_11_MODE_11B;
|
||||
|
||||
case MODE_11G:
|
||||
case MODE_11GONLY:
|
||||
return QCA_WLAN_802_11_MODE_11G;
|
||||
|
||||
case MODE_11NA_HT20:
|
||||
case MODE_11NG_HT20:
|
||||
case MODE_11NA_HT40:
|
||||
case MODE_11NG_HT40:
|
||||
return QCA_WLAN_802_11_MODE_11N;
|
||||
|
||||
case MODE_11AC_VHT20:
|
||||
case MODE_11AC_VHT40:
|
||||
case MODE_11AC_VHT80:
|
||||
case MODE_11AC_VHT20_2G:
|
||||
case MODE_11AC_VHT40_2G:
|
||||
case MODE_11AC_VHT80_2G:
|
||||
#ifdef CONFIG_160MHZ_SUPPORT
|
||||
case MODE_11AC_VHT80_80:
|
||||
case MODE_11AC_VHT160:
|
||||
#endif
|
||||
return QCA_WLAN_802_11_MODE_11AC;
|
||||
|
||||
default:
|
||||
return QCA_WLAN_802_11_MODE_INVALID;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* hdd_fill_station_info() - fill stainfo once connected
|
||||
* @stainfo: peer stainfo associate to SAP
|
||||
|
|
@ -1425,6 +1474,9 @@ static void hdd_fill_station_info(struct hdd_adapter *adapter,
|
|||
|
||||
stainfo->freq = cds_chan_to_freq(event->chan_info.chan_id);
|
||||
stainfo->sta_type = event->staType;
|
||||
stainfo->dot11_mode =
|
||||
hdd_convert_dot11mode_from_phymode(event->chan_info.info);
|
||||
|
||||
stainfo->nss = event->chan_info.nss;
|
||||
stainfo->rate_flags = event->chan_info.rate_flags;
|
||||
stainfo->ampdu = event->ampdu;
|
||||
|
|
|
|||
Loading…
Reference in a new issue