diff options
author | Amitkumar Karwar <akarwar@marvell.com> | 2012-03-15 23:51:48 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-04-09 16:05:58 -0400 |
commit | f85aae6bec67075b6f19f14adfced6f1eb9061b9 (patch) | |
tree | 8167296a3dfcda1afaad61808fcce3224ed9ecff /drivers/net/wireless/mwifiex/cfg80211.c | |
parent | c9919be642252baae7a80cacff52a3ed586b0547 (diff) |
mwifiex: add cfg80211 dump_station handler
This enables user to dump station information using
"iw dev <devname> station dump" command.
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/mwifiex/cfg80211.c')
-rw-r--r-- | drivers/net/wireless/mwifiex/cfg80211.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/net/wireless/mwifiex/cfg80211.c b/drivers/net/wireless/mwifiex/cfg80211.c index 65050384c42b..4f6541996748 100644 --- a/drivers/net/wireless/mwifiex/cfg80211.c +++ b/drivers/net/wireless/mwifiex/cfg80211.c | |||
@@ -604,6 +604,23 @@ mwifiex_cfg80211_get_station(struct wiphy *wiphy, struct net_device *dev, | |||
604 | return mwifiex_dump_station_info(priv, sinfo); | 604 | return mwifiex_dump_station_info(priv, sinfo); |
605 | } | 605 | } |
606 | 606 | ||
607 | /* | ||
608 | * CFG802.11 operation handler to dump station information. | ||
609 | */ | ||
610 | static int | ||
611 | mwifiex_cfg80211_dump_station(struct wiphy *wiphy, struct net_device *dev, | ||
612 | int idx, u8 *mac, struct station_info *sinfo) | ||
613 | { | ||
614 | struct mwifiex_private *priv = mwifiex_netdev_get_priv(dev); | ||
615 | |||
616 | if (!priv->media_connected || idx) | ||
617 | return -ENOENT; | ||
618 | |||
619 | memcpy(mac, priv->cfg_bssid, ETH_ALEN); | ||
620 | |||
621 | return mwifiex_dump_station_info(priv, sinfo); | ||
622 | } | ||
623 | |||
607 | /* Supported rates to be advertised to the cfg80211 */ | 624 | /* Supported rates to be advertised to the cfg80211 */ |
608 | 625 | ||
609 | static struct ieee80211_rate mwifiex_rates[] = { | 626 | static struct ieee80211_rate mwifiex_rates[] = { |
@@ -1340,6 +1357,7 @@ static struct cfg80211_ops mwifiex_cfg80211_ops = { | |||
1340 | .connect = mwifiex_cfg80211_connect, | 1357 | .connect = mwifiex_cfg80211_connect, |
1341 | .disconnect = mwifiex_cfg80211_disconnect, | 1358 | .disconnect = mwifiex_cfg80211_disconnect, |
1342 | .get_station = mwifiex_cfg80211_get_station, | 1359 | .get_station = mwifiex_cfg80211_get_station, |
1360 | .dump_station = mwifiex_cfg80211_dump_station, | ||
1343 | .set_wiphy_params = mwifiex_cfg80211_set_wiphy_params, | 1361 | .set_wiphy_params = mwifiex_cfg80211_set_wiphy_params, |
1344 | .set_channel = mwifiex_cfg80211_set_channel, | 1362 | .set_channel = mwifiex_cfg80211_set_channel, |
1345 | .join_ibss = mwifiex_cfg80211_join_ibss, | 1363 | .join_ibss = mwifiex_cfg80211_join_ibss, |