[NEUS7920-133][9610] wlbt: Add "support mode" field for GETSTAINFO
authorSrishti Piplani <srishti.p@samsung.com>
Mon, 18 Mar 2019 13:50:50 +0000 (19:20 +0530)
committerYoungmin Nam <youngmin.nam@samsung.com>
Tue, 21 May 2019 10:45:21 +0000 (19:45 +0900)
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 <srishti.p@samsung.com>
drivers/net/wireless/scsc/dev.h
drivers/net/wireless/scsc/ioctl.c
drivers/net/wireless/scsc/mgt.c

index ad46ecf0b0da68010345c56fb1b10b6e055883f0..f23fd9f65a8635828c8281c6674bbe338fc4ce54 100755 (executable)
@@ -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 {
index 7d6395af8379f0091bcb13070b89cf70bd35bbd8..d842fe4c673c4114c509dfa1d18a6e5f8b53d106 100755 (executable)
@@ -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],
index 3d009a9e2506dceeba1fabe9a654feb2d3f5ac82..d0bb0a292b69d110fc22624dc1f6c9df048d10c0 100755 (executable)
@@ -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);