summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mwifiex/cfg80211.c
diff options
context:
space:
mode:
authorAmitkumar Karwar2012-03-16 04:51:48 +0100
committerJohn W. Linville2012-04-09 22:05:58 +0200
commitf85aae6bec67075b6f19f14adfced6f1eb9061b9 (patch)
tree8167296a3dfcda1afaad61808fcce3224ed9ecff /drivers/net/wireless/mwifiex/cfg80211.c
parentmwifiex: update signal strength in mBm units (diff)
downloadkernel-qcow2-linux-f85aae6bec67075b6f19f14adfced6f1eb9061b9.tar.gz
kernel-qcow2-linux-f85aae6bec67075b6f19f14adfced6f1eb9061b9.tar.xz
kernel-qcow2-linux-f85aae6bec67075b6f19f14adfced6f1eb9061b9.zip
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.c18
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,
return mwifiex_dump_station_info(priv, sinfo);
}
+/*
+ * CFG802.11 operation handler to dump station information.
+ */
+static int
+mwifiex_cfg80211_dump_station(struct wiphy *wiphy, struct net_device *dev,
+ int idx, u8 *mac, struct station_info *sinfo)
+{
+ struct mwifiex_private *priv = mwifiex_netdev_get_priv(dev);
+
+ if (!priv->media_connected || idx)
+ return -ENOENT;
+
+ memcpy(mac, priv->cfg_bssid, ETH_ALEN);
+
+ return mwifiex_dump_station_info(priv, sinfo);
+}
+
/* Supported rates to be advertised to the cfg80211 */
static struct ieee80211_rate mwifiex_rates[] = {
@@ -1340,6 +1357,7 @@ static struct cfg80211_ops mwifiex_cfg80211_ops = {
.connect = mwifiex_cfg80211_connect,
.disconnect = mwifiex_cfg80211_disconnect,
.get_station = mwifiex_cfg80211_get_station,
+ .dump_station = mwifiex_cfg80211_dump_station,
.set_wiphy_params = mwifiex_cfg80211_set_wiphy_params,
.set_channel = mwifiex_cfg80211_set_channel,
.join_ibss = mwifiex_cfg80211_join_ibss,