[committed on behalf of sephe]
authorSascha Wildner <swildner@dragonflybsd.org>
Tue, 2 Jan 2007 23:28:49 +0000 (23:28 +0000)
committerSascha Wildner <swildner@dragonflybsd.org>
Tue, 2 Jan 2007 23:28:49 +0000 (23:28 +0000)
commit3135810196c82619e929e0b311413db30f0c0118
tree260647d503d131bf0a969f043e873f598cd35f36
parentf445d2b8907616fbce59e3d65e4a62f62c5e003d
[committed on behalf of sephe]

- Fix ieee80211_node leakage.  The leakage is caused by calling IF_DRAIN()
  on management ifqueue whose mbuf's m_pkthdr.rcvif has special meaning:
  it holds ieee80211_node to which the management frame should be sent and
  the node has its reference count bumped.
  Add a new function ieee80211_drain_mgtq(), which frees ieee80211_node
  pointed by mbuf's m_pkthdr.rcvif before freeing the mbuf.  Use this function
  to drain management ifqueue instead of IF_DRAIN().
- In acx(4), ipw(4), ral(4) and rum(4) 'stop' routines, move
  ieee80211_new_state(IEEE80211_S_INIT) before clearing IFF_RUNNING in
  ifnet.if_flags, so these drivers may send out management frames injected
  by ieee80211_newstate(IEEE80211_S_INIT). (*)

# (*) Without proper hardware TX queue drain functionality, the management
#     frames injected by ieee80211_newstate(IEEE80211_S_INIT) almost no
#     chance to float in the air.
sys/dev/netif/acx/if_acx.c
sys/dev/netif/ipw/if_ipw.c
sys/dev/netif/ral/rt2560.c
sys/dev/netif/ral/rt2661.c
sys/dev/netif/rum/if_rum.c
sys/netproto/802_11/ieee80211_dragonfly.h
sys/netproto/802_11/wlan/ieee80211_dragonfly.c
sys/netproto/802_11/wlan/ieee80211_proto.c