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>
This commit is contained in:
committed by
John W. Linville
parent
2e5ef4599a
commit
71063f0e89
@@ -1554,6 +1554,19 @@ static int ieee80211_testmode_cmd(struct wiphy *wiphy, void *data, int len)
|
||||
|
||||
return local->ops->testmode_cmd(&local->hw, data, len);
|
||||
}
|
||||
|
||||
static int ieee80211_testmode_dump(struct wiphy *wiphy,
|
||||
struct sk_buff *skb,
|
||||
struct netlink_callback *cb,
|
||||
void *data, int len)
|
||||
{
|
||||
struct ieee80211_local *local = wiphy_priv(wiphy);
|
||||
|
||||
if (!local->ops->testmode_dump)
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
return local->ops->testmode_dump(&local->hw, skb, cb, data, len);
|
||||
}
|
||||
#endif
|
||||
|
||||
int __ieee80211_request_smps(struct ieee80211_sub_if_data *sdata,
|
||||
@@ -2134,6 +2147,7 @@ struct cfg80211_ops mac80211_config_ops = {
|
||||
.set_wds_peer = ieee80211_set_wds_peer,
|
||||
.rfkill_poll = ieee80211_rfkill_poll,
|
||||
CFG80211_TESTMODE_CMD(ieee80211_testmode_cmd)
|
||||
CFG80211_TESTMODE_DUMP(ieee80211_testmode_dump)
|
||||
.set_power_mgmt = ieee80211_set_power_mgmt,
|
||||
.set_bitrate_mask = ieee80211_set_bitrate_mask,
|
||||
.remain_on_channel = ieee80211_remain_on_channel,
|
||||
|
Reference in New Issue
Block a user