diff options
author | Johannes Berg <johannes.berg@intel.com> | 2010-10-13 06:06:24 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-10-13 15:45:22 -0400 |
commit | 7be5086d4cb7cceb71d724a9524d5e927785d04f (patch) | |
tree | eaf0b7d527b9b91c704c8f339d855923c0a34571 /net/mac80211/cfg.c | |
parent | 271733cf844a2f5f186ef3b40c26d6397b71039a (diff) |
mac80211: add probe request filter flag
Using the frame registration notification, we
can see when probe requests are requested and
notify the low-level driver via filtering. The
flag is also set in AP and IBSS modes.
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 | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index 25fb351e00f8..18bd0e550600 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c | |||
@@ -1604,6 +1604,23 @@ static int ieee80211_mgmt_tx(struct wiphy *wiphy, struct net_device *dev, | |||
1604 | return 0; | 1604 | return 0; |
1605 | } | 1605 | } |
1606 | 1606 | ||
1607 | static void ieee80211_mgmt_frame_register(struct wiphy *wiphy, | ||
1608 | struct net_device *dev, | ||
1609 | u16 frame_type, bool reg) | ||
1610 | { | ||
1611 | struct ieee80211_local *local = wiphy_priv(wiphy); | ||
1612 | |||
1613 | if (frame_type != (IEEE80211_FTYPE_MGMT | IEEE80211_STYPE_PROBE_REQ)) | ||
1614 | return; | ||
1615 | |||
1616 | if (reg) | ||
1617 | local->probe_req_reg++; | ||
1618 | else | ||
1619 | local->probe_req_reg--; | ||
1620 | |||
1621 | ieee80211_queue_work(&local->hw, &local->reconfig_filter); | ||
1622 | } | ||
1623 | |||
1607 | struct cfg80211_ops mac80211_config_ops = { | 1624 | struct cfg80211_ops mac80211_config_ops = { |
1608 | .add_virtual_intf = ieee80211_add_iface, | 1625 | .add_virtual_intf = ieee80211_add_iface, |
1609 | .del_virtual_intf = ieee80211_del_iface, | 1626 | .del_virtual_intf = ieee80211_del_iface, |
@@ -1655,4 +1672,5 @@ struct cfg80211_ops mac80211_config_ops = { | |||
1655 | .cancel_remain_on_channel = ieee80211_cancel_remain_on_channel, | 1672 | .cancel_remain_on_channel = ieee80211_cancel_remain_on_channel, |
1656 | .mgmt_tx = ieee80211_mgmt_tx, | 1673 | .mgmt_tx = ieee80211_mgmt_tx, |
1657 | .set_cqm_rssi_config = ieee80211_set_cqm_rssi_config, | 1674 | .set_cqm_rssi_config = ieee80211_set_cqm_rssi_config, |
1675 | .mgmt_frame_register = ieee80211_mgmt_frame_register, | ||
1658 | }; | 1676 | }; |