freebsd-dev/sys/net80211
Adrian Chadd 23401900d3 Fix a panic in the wifi stack when a software beacon miss occurs in the wrong state.
The ieee80211_swbmiss() callout is not called with the ic lock held, so it's
quite possible the scheduler will run the callout during a state change.

This patch:

* changes the swbmiss callout to be locked by the ic lock
* enforces the ic lock being held across the beacon vap functions
  by grabbing it inside beacon_miss() and beacon_swmiss().

This ensures that the ic lock is held (and thus the VAP state
stays constant) during beacon miss and software miss processing.
Since the callout is removed whilst the ic lock is held, it also
ensures that the ic lock can't be called during a state change
or exhibit any race conditions seen above.

Both Edgar and Joel report that this patch fixes the crash and
doesn't introduce new issues.

Reported by:	Edgar Martinez <emartinez@kbcnetworks.com>
Reported by:	Joel Dahl <joel@vnode.se>
Reported by:	emaste
2011-10-02 02:42:31 +00:00
..
_ieee80211.h Revert r220907 and r220915. 2011-04-22 00:44:27 +00:00
ieee80211_acl.c Change i_len in ieee80211req to be unsigned and fix other signed/unsigned 2011-06-16 09:37:20 +00:00
ieee80211_action.c Fix off by one in ieee80211_send_action_register 2009-11-11 14:58:48 +00:00
ieee80211_action.h Revamp 802.11 action frame handling: 2009-07-05 17:59:19 +00:00
ieee80211_adhoc.c Fix some corner cases in the net80211 sequence number retransmission 2011-05-04 02:23:59 +00:00
ieee80211_adhoc.h
ieee80211_ageq.c Fix memset sizeofs 2011-07-07 15:41:40 +00:00
ieee80211_ageq.h Add ieee80211_ageq; a facility for staging packets that require 2009-07-05 18:17:37 +00:00
ieee80211_alq.c Fix up the net80211 alq logging - this commit makes it usable. 2011-05-11 17:20:35 +00:00
ieee80211_alq.h Implement very basic ALQ logging for net80211. 2011-04-21 03:59:37 +00:00
ieee80211_amrr.c sysctl(9) cleanup checkpoint: amd64 GENERIC builds cleanly. 2011-01-12 19:53:50 +00:00
ieee80211_amrr.h net80211 rate control framework (net80211 ratectl). 2010-04-07 15:29:13 +00:00
ieee80211_crypto_ccmp.c - Introduce IEEE80211_KEY_NOREPLAY, a per-key flag to ignore replay 2010-07-01 20:50:12 +00:00
ieee80211_crypto_none.c
ieee80211_crypto_tkip.c - Introduce IEEE80211_KEY_NOREPLAY, a per-key flag to ignore replay 2010-07-01 20:50:12 +00:00
ieee80211_crypto_wep.c
ieee80211_crypto.c Correct handling of keys that already have a hardware/device key index: 2009-07-21 19:36:32 +00:00
ieee80211_crypto.h - Introduce IEEE80211_KEY_NOREPLAY, a per-key flag to ignore replay 2010-07-01 20:50:12 +00:00
ieee80211_ddb.c Merge the remainder of kern_vimage.c and vimage.h into vnet.c and 2009-08-01 19:26:27 +00:00
ieee80211_dfs.c Print out a big warning if DFS can't find a channel to use. 2011-06-27 05:57:14 +00:00
ieee80211_dfs.h
ieee80211_freebsd.c Specify a CTLTYPE_FOO so that a future sysctl(8) change does not need 2011-01-18 21:14:13 +00:00
ieee80211_freebsd.h Make this code a little more portable by wrapping the mtx calls into 2010-04-14 18:29:40 +00:00
ieee80211_hostap.c Fix some corner cases in the net80211 sequence number retransmission 2011-05-04 02:23:59 +00:00
ieee80211_hostap.h
ieee80211_ht.c Correctly handle BAR TX failures. 2011-08-19 15:21:13 +00:00
ieee80211_ht.h Complete the MCS rate table based on the final 802.11n std. While here 2011-03-10 18:17:24 +00:00
ieee80211_hwmp.c Add missing braces. 2010-06-10 20:40:38 +00:00
ieee80211_input.c Add initial support for MIMO statistics to net80211. 2011-04-08 09:20:45 +00:00
ieee80211_input.h Fix some corner cases in the net80211 sequence number retransmission 2011-05-04 02:23:59 +00:00
ieee80211_ioctl.c Change i_len in ieee80211req to be unsigned and fix other signed/unsigned 2011-06-16 09:37:20 +00:00
ieee80211_ioctl.h Change i_len in ieee80211req to be unsigned and fix other signed/unsigned 2011-06-16 09:37:20 +00:00
ieee80211_mesh.c Fix some corner cases in the net80211 sequence number retransmission 2011-05-04 02:23:59 +00:00
ieee80211_mesh.h Update mesh code to to D4.0. 2010-01-12 22:22:27 +00:00
ieee80211_monitor.c count packets 2009-06-02 00:04:10 +00:00
ieee80211_monitor.h
ieee80211_node.c Revert r220907 and r220915. 2011-04-22 00:44:27 +00:00
ieee80211_node.h Add initial support for MIMO statistics to net80211. 2011-04-08 09:20:45 +00:00
ieee80211_output.c This patch fixes beacon frame sequence number generation. The code 2011-08-24 08:53:33 +00:00
ieee80211_phy.c
ieee80211_phy.h add ieee80211_isratevalid 2009-05-29 23:39:16 +00:00
ieee80211_power.c Fix memset sizeofs 2011-07-07 15:41:40 +00:00
ieee80211_power.h
ieee80211_proto.c Fix a panic in the wifi stack when a software beacon miss occurs in the wrong state. 2011-10-02 02:42:31 +00:00
ieee80211_proto.h Add initial support for MIMO statistics to net80211. 2011-04-08 09:20:45 +00:00
ieee80211_radiotap.c purge dead code 2009-06-08 21:16:06 +00:00
ieee80211_radiotap.h
ieee80211_ratectl_none.c Some device drivers calculate various timing related things based on 2010-11-13 14:59:54 +00:00
ieee80211_ratectl.c Instead of using the AMRR ratectl algo as default for drivers which have 2010-11-06 18:17:20 +00:00
ieee80211_ratectl.h The ni_rctls checks are used to verify that a ratectl algo has set up 2010-11-14 09:59:52 +00:00
ieee80211_regdomain.c
ieee80211_regdomain.h
ieee80211_rssadapt.c Remove GNU-style struct initialization. 2010-06-12 07:02:43 +00:00
ieee80211_rssadapt.h net80211 rate control framework (net80211 ratectl). 2010-04-07 15:29:13 +00:00
ieee80211_scan_sta.c When setting a fixed channel on adapters with 11n support the scan 2011-08-08 16:29:07 +00:00
ieee80211_scan.c Change return code semantics of start_scan_locked(). Instead of reporting 2011-01-30 14:00:50 +00:00
ieee80211_scan.h Implementation of the upcoming Wireless Mesh standard, 802.11s, on the 2009-07-11 15:02:45 +00:00
ieee80211_sta.c Fix a panic in the wifi stack when a software beacon miss occurs in the wrong state. 2011-10-02 02:42:31 +00:00
ieee80211_sta.h
ieee80211_superg.c distribute sysctl decls so global variables can be made static 2009-05-30 20:11:23 +00:00
ieee80211_superg.h make superg/fast-frames state dynamically-allocated (and indirect off 2009-05-02 20:16:55 +00:00
ieee80211_tdma.c Fix a panic in the wifi stack when a software beacon miss occurs in the wrong state. 2011-10-02 02:42:31 +00:00
ieee80211_tdma.h Overhaul monitor mode handling: 2009-05-20 20:00:40 +00:00
ieee80211_var.h Add a callback for ADDBA response timeouts. 2011-06-20 11:46:03 +00:00
ieee80211_wds.c Fix some corner cases in the net80211 sequence number retransmission 2011-05-04 02:23:59 +00:00
ieee80211_wds.h
ieee80211_xauth.c
ieee80211.c While determining the maxrate for ieee80211_media_setup() honor 2011-03-13 11:47:43 +00:00
ieee80211.h Add a new mgmt subtype "ACTION NO ACK" defined in 802.11n-2009, while here 2011-02-21 19:59:43 +00:00