[committed on behalf of sephe]
commita583cfb98978f9dce2d8fab7e1137cc0b6157232
authorSascha Wildner <swildner@dragonflybsd.org>
Tue, 2 Jan 2007 23:28:49 +0000 (2 23:28 +0000)
committerSascha Wildner <swildner@dragonflybsd.org>
Tue, 2 Jan 2007 23:28:49 +0000 (2 23:28 +0000)
tree83e55dd0fae3a8151654394c6e5a5bdd28656705
parent6a2f8cc8442141152043b8f15ad26fd309506a04
[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