aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorDmitry Shmidt <dimitrysh@google.com>2012-07-26 18:02:38 -0700
committerDmitry Shmidt <dimitrysh@google.com>2012-07-27 10:04:44 -0700
commite4639327fc09d76113dc5e126c2891467821c82b (patch)
tree101a03515941d8cda499195b5bd1f90157f1a75f /drivers/net
parent62618c1b041107fdd08920ef507a9db4bc18649a (diff)
downloadkernel_samsung_crespo-e4639327fc09d76113dc5e126c2891467821c82b.zip
kernel_samsung_crespo-e4639327fc09d76113dc5e126c2891467821c82b.tar.gz
kernel_samsung_crespo-e4639327fc09d76113dc5e126c2891467821c82b.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.c14
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 */