Check wep flag in *_tx_mgt since we need to encrypt some management frame
in case of shared authentification. Obtained from: NetBSD
This commit is contained in:
parent
72f1602663
commit
45cc59ef4f
@ -1612,6 +1612,7 @@ rt2560_tx_mgt(struct rt2560_softc *sc, struct mbuf *m0,
|
|||||||
struct rt2560_tx_desc *desc;
|
struct rt2560_tx_desc *desc;
|
||||||
struct rt2560_tx_data *data;
|
struct rt2560_tx_data *data;
|
||||||
struct ieee80211_frame *wh;
|
struct ieee80211_frame *wh;
|
||||||
|
struct ieee80211_key *k;
|
||||||
bus_dma_segment_t segs[RT2560_MAX_SCATTER];
|
bus_dma_segment_t segs[RT2560_MAX_SCATTER];
|
||||||
uint16_t dur;
|
uint16_t dur;
|
||||||
uint32_t flags = 0;
|
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;
|
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,
|
error = bus_dmamap_load_mbuf_sg(sc->prioq.data_dmat, data->map, m0,
|
||||||
segs, &nsegs, 0);
|
segs, &nsegs, 0);
|
||||||
if (error != 0) {
|
if (error != 0) {
|
||||||
|
@ -1430,6 +1430,7 @@ rt2661_tx_mgt(struct rt2661_softc *sc, struct mbuf *m0,
|
|||||||
struct rt2661_tx_desc *desc;
|
struct rt2661_tx_desc *desc;
|
||||||
struct rt2661_tx_data *data;
|
struct rt2661_tx_data *data;
|
||||||
struct ieee80211_frame *wh;
|
struct ieee80211_frame *wh;
|
||||||
|
struct ieee80211_key *k;
|
||||||
bus_dma_segment_t segs[RT2661_MAX_SCATTER];
|
bus_dma_segment_t segs[RT2661_MAX_SCATTER];
|
||||||
uint16_t dur;
|
uint16_t dur;
|
||||||
uint32_t flags = 0; /* XXX HWSEQ */
|
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 */
|
/* send mgt frames at the lowest available rate */
|
||||||
rate = IEEE80211_IS_CHAN_5GHZ(ic->ic_curchan) ? 12 : 2;
|
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,
|
error = bus_dmamap_load_mbuf_sg(sc->mgtq.data_dmat, data->map, m0,
|
||||||
segs, &nsegs, 0);
|
segs, &nsegs, 0);
|
||||||
if (error != 0) {
|
if (error != 0) {
|
||||||
|
@ -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_desc *desc;
|
||||||
struct rum_tx_data *data;
|
struct rum_tx_data *data;
|
||||||
struct ieee80211_frame *wh;
|
struct ieee80211_frame *wh;
|
||||||
|
struct ieee80211_key *k;
|
||||||
uint32_t flags = 0;
|
uint32_t flags = 0;
|
||||||
uint16_t dur;
|
uint16_t dur;
|
||||||
usbd_status error;
|
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 *);
|
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)) {
|
if (!IEEE80211_IS_MULTICAST(wh->i_addr1)) {
|
||||||
flags |= RT2573_TX_NEED_ACK;
|
flags |= RT2573_TX_NEED_ACK;
|
||||||
|
|
||||||
|
@ -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_desc *desc;
|
||||||
struct ural_tx_data *data;
|
struct ural_tx_data *data;
|
||||||
struct ieee80211_frame *wh;
|
struct ieee80211_frame *wh;
|
||||||
|
struct ieee80211_key *k;
|
||||||
uint32_t flags = 0;
|
uint32_t flags = 0;
|
||||||
uint16_t dur;
|
uint16_t dur;
|
||||||
usbd_status error;
|
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;
|
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->m = m0;
|
||||||
data->ni = ni;
|
data->ni = ni;
|
||||||
|
|
||||||
|
@ -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_desc *desc;
|
||||||
struct zyd_tx_data *data;
|
struct zyd_tx_data *data;
|
||||||
struct ieee80211_frame *wh;
|
struct ieee80211_frame *wh;
|
||||||
|
struct ieee80211_key *k;
|
||||||
int xferlen, totlen, rate;
|
int xferlen, totlen, rate;
|
||||||
uint16_t pktlen;
|
uint16_t pktlen;
|
||||||
usbd_status error;
|
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;
|
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->ni = ni;
|
||||||
data->m = m0;
|
data->m = m0;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user