diff options
author | Wey-Yi Guy <wey-yi.w.guy@intel.com> | 2011-05-20 12:05:54 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-06-01 15:12:28 -0400 |
commit | 71063f0e8939b5b6ea5121faed47987e094ef018 (patch) | |
tree | 97936964a23ef6d26819c0267ea246cd0301ed9e /net/mac80211/cfg.c | |
parent | 2e5ef4599addb1046086b63743f41822858a23b7 (diff) |
nl80211: add testmode dump support
This adds dump support to testmode. The testmode
dump support in nl80211 requires using two of the
six cb->args, the rest can be used by the driver
to figure out where the dump position is at or to
store other data across invocations.
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/cfg.c')
-rw-r--r-- | net/mac80211/cfg.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index be70c70d3f5b..6e56c6ee7ccd 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c | |||
@@ -1554,6 +1554,19 @@ static int ieee80211_testmode_cmd(struct wiphy *wiphy, void *data, int len) | |||
1554 | 1554 | ||
1555 | return local->ops->testmode_cmd(&local->hw, data, len); | 1555 | return local->ops->testmode_cmd(&local->hw, data, len); |
1556 | } | 1556 | } |
1557 | |||
1558 | static int ieee80211_testmode_dump(struct wiphy *wiphy, | ||
1559 | struct sk_buff *skb, | ||
1560 | struct netlink_callback *cb, | ||
1561 | void *data, int len) | ||
1562 | { | ||
1563 | struct ieee80211_local *local = wiphy_priv(wiphy); | ||
1564 | |||
1565 | if (!local->ops->testmode_dump) | ||
1566 | return -EOPNOTSUPP; | ||
1567 | |||
1568 | return local->ops->testmode_dump(&local->hw, skb, cb, data, len); | ||
1569 | } | ||
1557 | #endif | 1570 | #endif |
1558 | 1571 | ||
1559 | int __ieee80211_request_smps(struct ieee80211_sub_if_data *sdata, | 1572 | int __ieee80211_request_smps(struct ieee80211_sub_if_data *sdata, |
@@ -2134,6 +2147,7 @@ struct cfg80211_ops mac80211_config_ops = { | |||
2134 | .set_wds_peer = ieee80211_set_wds_peer, | 2147 | .set_wds_peer = ieee80211_set_wds_peer, |
2135 | .rfkill_poll = ieee80211_rfkill_poll, | 2148 | .rfkill_poll = ieee80211_rfkill_poll, |
2136 | CFG80211_TESTMODE_CMD(ieee80211_testmode_cmd) | 2149 | CFG80211_TESTMODE_CMD(ieee80211_testmode_cmd) |
2150 | CFG80211_TESTMODE_DUMP(ieee80211_testmode_dump) | ||
2137 | .set_power_mgmt = ieee80211_set_power_mgmt, | 2151 | .set_power_mgmt = ieee80211_set_power_mgmt, |
2138 | .set_bitrate_mask = ieee80211_set_bitrate_mask, | 2152 | .set_bitrate_mask = ieee80211_set_bitrate_mask, |
2139 | .remain_on_channel = ieee80211_remain_on_channel, | 2153 | .remain_on_channel = ieee80211_remain_on_channel, |