diff options
author | Dmitry Shmidt <dimitrysh@google.com> | 2012-07-26 18:02:38 -0700 |
---|---|---|
committer | KalimochoAz <calimochoazucarado@gmail.com> | 2012-08-30 21:29:40 +0200 |
commit | 07c9f947fa69e8293e987e95bd8ecb13041b3f47 (patch) | |
tree | 50c83a1d3b79414e541f98f7e9d64c8dacbf86ac /drivers/net | |
parent | 0aa219229725d0f6d410c182b9f1843e0ae65fc2 (diff) | |
download | kernel_samsung_crespo-07c9f947fa69e8293e987e95bd8ecb13041b3f47.zip kernel_samsung_crespo-07c9f947fa69e8293e987e95bd8ecb13041b3f47.tar.gz kernel_samsung_crespo-07c9f947fa69e8293e987e95bd8ecb13041b3f47.tar.bz2 |
net: wireless: bcmdhd: Fill station_info packet fields
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/wireless/bcmdhd/wl_cfg80211.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/net/wireless/bcmdhd/wl_cfg80211.c b/drivers/net/wireless/bcmdhd/wl_cfg80211.c index 2365bdd..b10a5ef 100644 --- a/drivers/net/wireless/bcmdhd/wl_cfg80211.c +++ b/drivers/net/wireless/bcmdhd/wl_cfg80211.c @@ -2999,6 +2999,7 @@ wl_cfg80211_get_station(struct wiphy *wiphy, struct net_device *dev, sta->idle * 1000)); #endif } else if (wl_get_mode_by_netdev(wl, dev) == WL_MODE_BSS) { + get_pktcnt_t pktcnt; u8 *curmacp = wl_read_prof(wl, dev, WL_PROF_BSSID); err = -ENODEV; if (!wl_get_drv_status(wl, CONNECTED, dev) || @@ -3035,6 +3036,19 @@ wl_cfg80211_get_station(struct wiphy *wiphy, struct net_device *dev, sinfo->signal = rssi; WL_DBG(("RSSI %d dBm\n", rssi)); + err = wldev_ioctl(dev, WLC_GET_PKTCNTS, &pktcnt, + sizeof(pktcnt), false); + if (!err) { + sinfo->filled |= (STATION_INFO_RX_PACKETS | + STATION_INFO_RX_DROP_MISC | + STATION_INFO_TX_PACKETS | + STATION_INFO_TX_FAILED); + sinfo->rx_packets = pktcnt.rx_good_pkt; + sinfo->rx_dropped_misc = pktcnt.rx_bad_pkt; + sinfo->tx_packets = pktcnt.tx_good_pkt; + sinfo->tx_failed = pktcnt.tx_bad_pkt; + } + get_station_err: if (err && (err != -ETIMEDOUT) && (err != -EIO)) { /* Disconnect due to zero BSSID or error to get RSSI */ |