diff options
| author | Kevin Lo <kevlo@FreeBSD.org> | 2007-11-06 07:30:12 +0000 |
|---|---|---|
| committer | Kevin Lo <kevlo@FreeBSD.org> | 2007-11-06 07:30:12 +0000 |
| commit | 02f0a39fed9bad2bbc066775089c0706ed969c2d (patch) | |
| tree | e3045ff26a3b52e03dfd3bf67b99dd9a6772dcff /sys/dev | |
| parent | 755911cd91f18b65a2913492486cf3da0e8b8692 (diff) | |
Notes
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/ral/rt2560.c | 11 | ||||
| -rw-r--r-- | sys/dev/ral/rt2661.c | 11 | ||||
| -rw-r--r-- | sys/dev/usb/if_rum.c | 11 | ||||
| -rw-r--r-- | sys/dev/usb/if_ural.c | 11 | ||||
| -rw-r--r-- | sys/dev/usb/if_zyd.c | 11 |
5 files changed, 55 insertions, 0 deletions
diff --git a/sys/dev/ral/rt2560.c b/sys/dev/ral/rt2560.c index b72ca403f1499..58f459054f834 100644 --- a/sys/dev/ral/rt2560.c +++ b/sys/dev/ral/rt2560.c @@ -1612,6 +1612,7 @@ rt2560_tx_mgt(struct rt2560_softc *sc, struct mbuf *m0, struct rt2560_tx_desc *desc; struct rt2560_tx_data *data; struct ieee80211_frame *wh; + struct ieee80211_key *k; bus_dma_segment_t segs[RT2560_MAX_SCATTER]; uint16_t dur; uint32_t flags = 0; @@ -1622,6 +1623,16 @@ rt2560_tx_mgt(struct rt2560_softc *sc, struct mbuf *m0, rate = IEEE80211_IS_CHAN_5GHZ(ic->ic_curchan) ? 12 : 2; + wh = mtod(m0, struct ieee80211_frame *); + + if (wh->i_fc[1] & IEEE80211_FC1_WEP) { + k = ieee80211_crypto_encap(ic, ni, m0); + if (k == NULL) { + m_freem(m0); + return ENOBUFS; + } + } + error = bus_dmamap_load_mbuf_sg(sc->prioq.data_dmat, data->map, m0, segs, &nsegs, 0); if (error != 0) { diff --git a/sys/dev/ral/rt2661.c b/sys/dev/ral/rt2661.c index 60171ee6e74bb..8d6e859a14f0c 100644 --- a/sys/dev/ral/rt2661.c +++ b/sys/dev/ral/rt2661.c @@ -1430,6 +1430,7 @@ rt2661_tx_mgt(struct rt2661_softc *sc, struct mbuf *m0, struct rt2661_tx_desc *desc; struct rt2661_tx_data *data; struct ieee80211_frame *wh; + struct ieee80211_key *k; bus_dma_segment_t segs[RT2661_MAX_SCATTER]; uint16_t dur; uint32_t flags = 0; /* XXX HWSEQ */ @@ -1441,6 +1442,16 @@ rt2661_tx_mgt(struct rt2661_softc *sc, struct mbuf *m0, /* send mgt frames at the lowest available rate */ rate = IEEE80211_IS_CHAN_5GHZ(ic->ic_curchan) ? 12 : 2; + wh = mtod(m0, struct ieee80211_frame *); + + if (wh->i_fc[1] & IEEE80211_FC1_WEP) { + k = ieee80211_crypto_encap(ic, ni, m0); + if (k == NULL) { + m_freem(m0); + return ENOBUFS; + } + } + error = bus_dmamap_load_mbuf_sg(sc->mgtq.data_dmat, data->map, m0, segs, &nsegs, 0); if (error != 0) { diff --git a/sys/dev/usb/if_rum.c b/sys/dev/usb/if_rum.c index aa060f4f7d2f3..55433158ee852 100644 --- a/sys/dev/usb/if_rum.c +++ b/sys/dev/usb/if_rum.c @@ -1132,6 +1132,7 @@ rum_tx_mgt(struct rum_softc *sc, struct mbuf *m0, struct ieee80211_node *ni) struct rum_tx_desc *desc; struct rum_tx_data *data; struct ieee80211_frame *wh; + struct ieee80211_key *k; uint32_t flags = 0; uint16_t dur; usbd_status error; @@ -1147,6 +1148,16 @@ rum_tx_mgt(struct rum_softc *sc, struct mbuf *m0, struct ieee80211_node *ni) wh = mtod(m0, struct ieee80211_frame *); + if (wh->i_fc[1] & IEEE80211_FC1_WEP) { + k = ieee80211_crypto_encap(ic, ni, m0); + if (k == NULL) { + m_freem(m0); + return ENOBUFS; + } + } + + wh = mtod(m0, struct ieee80211_frame *); + if (!IEEE80211_IS_MULTICAST(wh->i_addr1)) { flags |= RT2573_TX_NEED_ACK; diff --git a/sys/dev/usb/if_ural.c b/sys/dev/usb/if_ural.c index 819a730dec893..c2b063ff683d9 100644 --- a/sys/dev/usb/if_ural.c +++ b/sys/dev/usb/if_ural.c @@ -1192,6 +1192,7 @@ ural_tx_mgt(struct ural_softc *sc, struct mbuf *m0, struct ieee80211_node *ni) struct ural_tx_desc *desc; struct ural_tx_data *data; struct ieee80211_frame *wh; + struct ieee80211_key *k; uint32_t flags = 0; uint16_t dur; usbd_status error; @@ -1202,6 +1203,16 @@ ural_tx_mgt(struct ural_softc *sc, struct mbuf *m0, struct ieee80211_node *ni) rate = IEEE80211_IS_CHAN_5GHZ(ic->ic_curchan) ? 12 : 2; + wh = mtod(m0, struct ieee80211_frame *); + + if (wh->i_fc[1] & IEEE80211_FC1_WEP) { + k = ieee80211_crypto_encap(ic, ni, m0); + if (k == NULL) { + m_freem(m0); + return ENOBUFS; + } + } + data->m = m0; data->ni = ni; diff --git a/sys/dev/usb/if_zyd.c b/sys/dev/usb/if_zyd.c index 1cece8b8e753f..45be4d1029d3e 100644 --- a/sys/dev/usb/if_zyd.c +++ b/sys/dev/usb/if_zyd.c @@ -2014,6 +2014,7 @@ zyd_tx_mgt(struct zyd_softc *sc, struct mbuf *m0, struct ieee80211_node *ni) struct zyd_tx_desc *desc; struct zyd_tx_data *data; struct ieee80211_frame *wh; + struct ieee80211_key *k; int xferlen, totlen, rate; uint16_t pktlen; usbd_status error; @@ -2023,6 +2024,16 @@ zyd_tx_mgt(struct zyd_softc *sc, struct mbuf *m0, struct ieee80211_node *ni) rate = IEEE80211_IS_CHAN_5GHZ(ic->ic_curchan) ? 12 : 2; + wh = mtod(m0, struct ieee80211_frame *); + + if (wh->i_fc[1] & IEEE80211_FC1_WEP) { + k = ieee80211_crypto_encap(ic, ni, m0); + if (k == NULL) { + m_freem(m0); + return ENOBUFS; + } + } + data->ni = ni; data->m = m0; |
