From: Srishti Piplani Date: Mon, 18 Mar 2019 13:50:50 +0000 (+0530) Subject: [NEUS7920-133][9610] wlbt: Add "support mode" field for GETSTAINFO X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=8b5d93115012a583b66c275b8cae30d41f570c24;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [NEUS7920-133][9610] wlbt: Add "support mode" field for GETSTAINFO Added support mode field to the output of GETSTAINFO ,which gives information about the 11ax, 11ac and 11n support, extracted from assoc IE's. Change-Id: I048e96af9e1f6b08d324c630ea09d82158732f82 SCSC-Bug-Id: SSB-50443 Signed-off-by: Srishti Piplani --- diff --git a/drivers/net/wireless/scsc/dev.h b/drivers/net/wireless/scsc/dev.h index ad46ecf0b0da..f23fd9f65a86 100755 --- a/drivers/net/wireless/scsc/dev.h +++ b/drivers/net/wireless/scsc/dev.h @@ -572,6 +572,7 @@ struct slsi_last_disconnected_sta { u16 tx_data_rate; bool mimo_used; u16 reason; + int support_mode; }; struct slsi_vif_ap { diff --git a/drivers/net/wireless/scsc/ioctl.c b/drivers/net/wireless/scsc/ioctl.c index 7d6395af8379..d842fe4c673c 100755 --- a/drivers/net/wireless/scsc/ioctl.c +++ b/drivers/net/wireless/scsc/ioctl.c @@ -2154,12 +2154,13 @@ int slsi_get_sta_info(struct net_device *dev, char *command, int buf_len) ndev_vif->ap.last_disconnected_sta.address[1], ndev_vif->ap.last_disconnected_sta.address[2]); - len += snprintf(&command[len], (buf_len - len), "%d %d %d %d %d %d %d %u", + len += snprintf(&command[len], (buf_len - len), "%d %d %d %d %d %d %d %u %d", ieee80211_frequency_to_channel(ndev_vif->ap.channel_freq), ndev_vif->ap.last_disconnected_sta.bandwidth, ndev_vif->ap.last_disconnected_sta.rssi, ndev_vif->ap.last_disconnected_sta.tx_data_rate, ndev_vif->ap.last_disconnected_sta.mode, ndev_vif->ap.last_disconnected_sta.antenna_mode, - ndev_vif->ap.last_disconnected_sta.mimo_used, ndev_vif->ap.last_disconnected_sta.reason); + ndev_vif->ap.last_disconnected_sta.mimo_used, ndev_vif->ap.last_disconnected_sta.reason, + ndev_vif->ap.last_disconnected_sta.support_mode); #else len = snprintf(command, buf_len, "wl_get_sta_info : %02x%02x%02x %u %d %d %d %d %d %d %u ", ndev_vif->ap.last_disconnected_sta.address[0], ndev_vif->ap.last_disconnected_sta.address[1], diff --git a/drivers/net/wireless/scsc/mgt.c b/drivers/net/wireless/scsc/mgt.c index 3d009a9e2506..d0bb0a292b69 100755 --- a/drivers/net/wireless/scsc/mgt.c +++ b/drivers/net/wireless/scsc/mgt.c @@ -2153,6 +2153,14 @@ static int slsi_get_sta_mode(struct net_device *dev, const u8 *last_peer_mac) return -EINVAL; } + ndev_vif->ap.last_disconnected_sta.support_mode = 0; + if (cfg80211_find_ie(WLAN_EID_VHT_CAPABILITY, last_peer->assoc_ie->data, + last_peer->assoc_ie->len)) + ndev_vif->ap.last_disconnected_sta.support_mode = 3; + else if (cfg80211_find_ie(WLAN_EID_HT_CAPABILITY, last_peer->assoc_ie->data, + last_peer->assoc_ie->len)) + ndev_vif->ap.last_disconnected_sta.support_mode = 1; + if (ndev_vif->ap.mode == SLSI_80211_MODE_11AC) { /*AP supports VHT*/ peer_ie = cfg80211_find_ie(WLAN_EID_VHT_CAPABILITY, last_peer->assoc_ie->data, last_peer->assoc_ie->len);