diff options
author | Kevin Lo <kevlo@FreeBSD.org> | 2011-04-29 06:28:29 +0000 |
---|---|---|
committer | Kevin Lo <kevlo@FreeBSD.org> | 2011-04-29 06:28:29 +0000 |
commit | f620e64d23abbc96951cc753e9b96e819767184a (patch) | |
tree | 7ace8a3aaf6360ba442bd208504b82ea925de8f2 /sys | |
parent | f0fb75ebd2c1dd9260cd91b6f820045deb1685b0 (diff) | |
download | src-f620e64d23abbc96951cc753e9b96e819767184a.tar.gz src-f620e64d23abbc96951cc753e9b96e819767184a.zip |
Guard against default ni_chan
PR: kern/144642
Submitted by: Arthur Hartwig <a_hartwig at fastmaildot fm>
Notes
Notes:
svn path=/head/; revision=221199
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/usb/wlan/if_rum.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/sys/dev/usb/wlan/if_rum.c b/sys/dev/usb/wlan/if_rum.c index 9a61c2ef5bf6..63b314de4b19 100644 --- a/sys/dev/usb/wlan/if_rum.c +++ b/sys/dev/usb/wlan/if_rum.c @@ -208,7 +208,7 @@ static void rum_init(void *); static void rum_stop(struct rum_softc *); static void rum_load_microcode(struct rum_softc *, const uint8_t *, size_t); -static int rum_prepare_beacon(struct rum_softc *, +static void rum_prepare_beacon(struct rum_softc *, struct ieee80211vap *); static int rum_raw_xmit(struct ieee80211_node *, struct mbuf *, const struct ieee80211_bpf_params *); @@ -2119,7 +2119,7 @@ rum_load_microcode(struct rum_softc *sc, const uint8_t *ucode, size_t size) rum_pause(sc, hz / 8); } -static int +static void rum_prepare_beacon(struct rum_softc *sc, struct ieee80211vap *vap) { struct ieee80211com *ic = vap->iv_ic; @@ -2127,9 +2127,12 @@ rum_prepare_beacon(struct rum_softc *sc, struct ieee80211vap *vap) struct rum_tx_desc desc; struct mbuf *m0; + if (vap->iv_bss->ni_chan == IEEE80211_CHAN_ANYC) + return; + m0 = ieee80211_beacon_alloc(vap->iv_bss, &RUM_VAP(vap)->bo); if (m0 == NULL) { - return ENOBUFS; + return; } tp = &vap->iv_txparms[ieee80211_chan2mode(ic->ic_bsschan)]; @@ -2144,8 +2147,6 @@ rum_prepare_beacon(struct rum_softc *sc, struct ieee80211vap *vap) m0->m_pkthdr.len); m_freem(m0); - - return 0; } static int |