Fix external compiler warning(s). Avoid pointer dereferencing.

This commit is contained in:
Hans Petter Selasky 2013-12-04 12:07:46 +00:00
parent bc2308d49e
commit 8cfe54400e
5 changed files with 8 additions and 8 deletions

View File

@ -1159,7 +1159,7 @@ rsu_event_survey(struct rsu_softc *sc, uint8_t *buf, int len)
wh->i_fc[0] = IEEE80211_FC0_VERSION_0 | IEEE80211_FC0_TYPE_MGT |
IEEE80211_FC0_SUBTYPE_BEACON;
wh->i_fc[1] = IEEE80211_FC1_DIR_NODS;
*(uint16_t *)wh->i_dur = 0;
USETW(wh->i_dur, 0);
IEEE80211_ADDR_COPY(wh->i_addr1, ifp->if_broadcastaddr);
IEEE80211_ADDR_COPY(wh->i_addr2, bss->macaddr);
IEEE80211_ADDR_COPY(wh->i_addr3, bss->macaddr);

View File

@ -1137,7 +1137,7 @@ rum_tx_mgt(struct rum_softc *sc, struct mbuf *m0, struct ieee80211_node *ni)
dur = ieee80211_ack_duration(ic->ic_rt, tp->mgmtrate,
ic->ic_flags & IEEE80211_F_SHPREAMBLE);
*(uint16_t *)wh->i_dur = htole16(dur);
USETW(wh->i_dur, dur);
/* tell hardware to add timestamp for probe responses */
if ((wh->i_fc[0] &
@ -1281,7 +1281,7 @@ rum_tx_data(struct rum_softc *sc, struct mbuf *m0, struct ieee80211_node *ni)
dur = ieee80211_ack_duration(ic->ic_rt, rate,
ic->ic_flags & IEEE80211_F_SHPREAMBLE);
*(uint16_t *)wh->i_dur = htole16(dur);
USETW(wh->i_dur, dur);
}
rum_setup_tx_desc(sc, &data->desc, flags, 0, m0->m_pkthdr.len, rate);

View File

@ -3087,7 +3087,7 @@ run_tx(struct run_softc *sc, struct mbuf *m, struct ieee80211_node *ni)
dur = rt2860_rates[ctl_ridx].sp_ack_dur;
else
dur = rt2860_rates[ctl_ridx].lp_ack_dur;
*(uint16_t *)wh->i_dur = htole16(dur);
USETW(wh->i_dur, dur);
}
/* reserve slots for mgmt packets, just in case */
@ -3207,7 +3207,7 @@ run_tx_mgt(struct run_softc *sc, struct mbuf *m, struct ieee80211_node *ni)
dur = ieee80211_ack_duration(ic->ic_rt, rt2860_rates[ridx].rate,
ic->ic_flags & IEEE80211_F_SHPREAMBLE);
*(uint16_t *)wh->i_dur = htole16(dur);
USETW(wh->i_dur, dur);
}
if (sc->sc_epq[0].tx_nfree == 0) {

View File

@ -1139,7 +1139,7 @@ ural_tx_mgt(struct ural_softc *sc, struct mbuf *m0, struct ieee80211_node *ni)
dur = ieee80211_ack_duration(ic->ic_rt, tp->mgmtrate,
ic->ic_flags & IEEE80211_F_SHPREAMBLE);
*(uint16_t *)wh->i_dur = htole16(dur);
USETW(wh->i_dur, dur);
/* tell hardware to add timestamp for probe responses */
if ((wh->i_fc[0] & IEEE80211_FC0_TYPE_MASK) ==
@ -1330,7 +1330,7 @@ ural_tx_data(struct ural_softc *sc, struct mbuf *m0, struct ieee80211_node *ni)
dur = ieee80211_ack_duration(ic->ic_rt, rate,
ic->ic_flags & IEEE80211_F_SHPREAMBLE);
*(uint16_t *)wh->i_dur = htole16(dur);
USETW(wh->i_dur, dur);
}
ural_setup_tx_desc(sc, &data->desc, flags, m0->m_pkthdr.len, rate);

View File

@ -1767,7 +1767,7 @@ urtw_tx_start(struct urtw_softc *sc, struct ieee80211_node *ni, struct mbuf *m0,
else
dur = URTW_ASIFS_TIME + acktime;
}
*(uint16_t *)wh->i_dur = htole16(dur);
USETW(wh->i_dur, dur);
xferlen = m0->m_pkthdr.len;
xferlen += (sc->sc_flags & URTW_RTL8187B) ? (4 * 8) : (4 * 3);