diff options
author | monthadar <monthadar@FreeBSD.org> | 2012-07-31 07:22:50 +0000 |
---|---|---|
committer | monthadar <monthadar@FreeBSD.org> | 2012-07-31 07:22:50 +0000 |
commit | 3e4ae46ebb3b2ac38170d6efa2e98605dbf3924d (patch) | |
tree | c8ad117ddc612b8fd9e62105c131bfed6d6d09d2 /sys/dev/wtap | |
parent | b2b6fd98900a0c2f51e7585fb119ece152eb21f8 (diff) | |
download | FreeBSD-src-3e4ae46ebb3b2ac38170d6efa2e98605dbf3924d.zip FreeBSD-src-3e4ae46ebb3b2ac38170d6efa2e98605dbf3924d.tar.gz |
Fix wtap to not panic in wtap_beacon_intrp.
* Changed KASSERT to be debug printf (DWTAP_PRINTF). If state is not
IEEE80211_S_RUN we return without scheduling a new callout;
* When net80211 stack changes state to IEEE802_11_INIT we stop the
beacon callout task;
Diffstat (limited to 'sys/dev/wtap')
-rw-r--r-- | sys/dev/wtap/if_wtap.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/dev/wtap/if_wtap.c b/sys/dev/wtap/if_wtap.c index 5b5d355..9439930 100644 --- a/sys/dev/wtap/if_wtap.c +++ b/sys/dev/wtap/if_wtap.c @@ -230,8 +230,10 @@ wtap_beacon_intrp(void *arg) struct ieee80211vap *vap = arg; struct mbuf *m; - KASSERT(vap->iv_state >= IEEE80211_S_RUN, - ("not running, state %d", vap->iv_state)); + if (vap->iv_state < IEEE80211_S_RUN) { + DWTAP_PRINTF("Skip beacon, not running, state %d", vap->iv_state); + return ; + } DWTAP_PRINTF("[%d] beacon intrp\n", avp->id); //burst mode /* * Update dynamic beacon contents. If this returns @@ -289,6 +291,8 @@ wtap_newstate(struct ieee80211vap *vap, enum ieee80211_state nstate, int arg) default: goto bad; } + } else if (nstate == IEEE80211_S_INIT) { + callout_stop(&avp->av_swba); } return 0; bad: |