aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/cfg.c
diff options
context:
space:
mode:
authorWill Hawkins <hawkinsw@opentechinstitute.org>2012-06-20 11:51:14 -0400
committerJohannes Berg <johannes.berg@intel.com>2012-06-20 14:03:41 -0400
commit6abe0563224f8540c88e1d84d2bb394bd408c951 (patch)
tree97a5764b38a6851fe0021b0cf4ac45d049911b5a /net/mac80211/cfg.c
parent9ea4fa158f3a038d5be82ccc7e142f198233f059 (diff)
mac80211: Track auth frame registrations on IBSS ifaces
Track userspace registrations for authentication frames received on an IBSS interface. This field will be used to decide whether or not to send "open system" authentication frames when a new station joins an adhoc network. Signed-off-by: Will Hawkins <hawkinsw@opentechinstitute.org> [redesign the code flow a bit] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/cfg.c')
-rw-r--r--net/mac80211/cfg.c28
1 files changed, 21 insertions, 7 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index 17162fcc24bc..a6abcd473434 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -2516,16 +2516,30 @@ static void ieee80211_mgmt_frame_register(struct wiphy *wiphy,
2516 u16 frame_type, bool reg) 2516 u16 frame_type, bool reg)
2517{ 2517{
2518 struct ieee80211_local *local = wiphy_priv(wiphy); 2518 struct ieee80211_local *local = wiphy_priv(wiphy);
2519 struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
2519 2520
2520 if (frame_type != (IEEE80211_FTYPE_MGMT | IEEE80211_STYPE_PROBE_REQ)) 2521 switch (frame_type) {
2521 return; 2522 case IEEE80211_FTYPE_MGMT | IEEE80211_STYPE_AUTH:
2523 if (sdata->vif.type == NL80211_IFTYPE_ADHOC) {
2524 struct ieee80211_if_ibss *ifibss = &sdata->u.ibss;
2522 2525
2523 if (reg) 2526 if (reg)
2524 local->probe_req_reg++; 2527 ifibss->auth_frame_registrations++;
2525 else 2528 else
2526 local->probe_req_reg--; 2529 ifibss->auth_frame_registrations--;
2530 }
2531 break;
2532 case IEEE80211_FTYPE_MGMT | IEEE80211_STYPE_PROBE_REQ:
2533 if (reg)
2534 local->probe_req_reg++;
2535 else
2536 local->probe_req_reg--;
2527 2537
2528 ieee80211_queue_work(&local->hw, &local->reconfig_filter); 2538 ieee80211_queue_work(&local->hw, &local->reconfig_filter);
2539 break;
2540 default:
2541 break;
2542 }
2529} 2543}
2530 2544
2531static int ieee80211_set_antenna(struct wiphy *wiphy, u32 tx_ant, u32 rx_ant) 2545static int ieee80211_set_antenna(struct wiphy *wiphy, u32 tx_ant, u32 rx_ant)