mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
malo: Remove write only variables, but leave hardware reads in place
Sponsored by: Netflix
This commit is contained in:
parent
d483782ecf
commit
fba6f8efb6
2 changed files with 7 additions and 12 deletions
|
|
@ -1032,8 +1032,8 @@ malo_tx_start(struct malo_softc *sc, struct ieee80211_node *ni,
|
|||
{
|
||||
#define IS_DATA_FRAME(wh) \
|
||||
((wh->i_fc[0] & (IEEE80211_FC0_TYPE_MASK)) == IEEE80211_FC0_TYPE_DATA)
|
||||
int error, ismcast, iswep;
|
||||
int copyhdrlen, hdrlen, pktlen;
|
||||
int error, iswep;
|
||||
int hdrlen, pktlen;
|
||||
struct ieee80211_frame *wh;
|
||||
struct ieee80211com *ic = &sc->malo_ic;
|
||||
struct ieee80211vap *vap = ni->ni_vap;
|
||||
|
|
@ -1044,13 +1044,10 @@ malo_tx_start(struct malo_softc *sc, struct ieee80211_node *ni,
|
|||
|
||||
wh = mtod(m0, struct ieee80211_frame *);
|
||||
iswep = wh->i_fc[1] & IEEE80211_FC1_PROTECTED;
|
||||
ismcast = IEEE80211_IS_MULTICAST(wh->i_addr1);
|
||||
copyhdrlen = hdrlen = ieee80211_anyhdrsize(wh);
|
||||
hdrlen = ieee80211_anyhdrsize(wh);
|
||||
pktlen = m0->m_pkthdr.len;
|
||||
if (IEEE80211_QOS_HAS_SEQ(wh)) {
|
||||
qos = *(uint16_t *)ieee80211_getqos(wh);
|
||||
if (IEEE80211_IS_DSTODS(wh))
|
||||
copyhdrlen -= sizeof(qos);
|
||||
} else
|
||||
qos = 0;
|
||||
|
||||
|
|
|
|||
|
|
@ -178,13 +178,12 @@ fail:
|
|||
static void
|
||||
malo_hal_send_cmd(struct malo_hal *mh)
|
||||
{
|
||||
uint32_t dummy;
|
||||
|
||||
bus_dmamap_sync(mh->mh_dmat, mh->mh_dmamap,
|
||||
BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE);
|
||||
|
||||
malo_hal_write4(mh, MALO_REG_GEN_PTR, mh->mh_cmdaddr);
|
||||
dummy = malo_hal_read4(mh, MALO_REG_INT_CODE);
|
||||
malo_hal_read4(mh, MALO_REG_INT_CODE);
|
||||
|
||||
malo_hal_write4(mh, MALO_REG_H2A_INTERRUPT_EVENTS,
|
||||
MALO_H2ARIC_BIT_DOOR_BELL);
|
||||
|
|
@ -309,19 +308,18 @@ malo_hal_fw_reset(struct malo_hal *mh)
|
|||
static void
|
||||
malo_hal_trigger_pcicmd(struct malo_hal *mh)
|
||||
{
|
||||
uint32_t dummy;
|
||||
|
||||
bus_dmamap_sync(mh->mh_dmat, mh->mh_dmamap, BUS_DMASYNC_PREWRITE);
|
||||
|
||||
malo_hal_write4(mh, MALO_REG_GEN_PTR, mh->mh_cmdaddr);
|
||||
dummy = malo_hal_read4(mh, MALO_REG_INT_CODE);
|
||||
malo_hal_read4(mh, MALO_REG_INT_CODE);
|
||||
|
||||
malo_hal_write4(mh, MALO_REG_INT_CODE, 0x00);
|
||||
dummy = malo_hal_read4(mh, MALO_REG_INT_CODE);
|
||||
malo_hal_read4(mh, MALO_REG_INT_CODE);
|
||||
|
||||
malo_hal_write4(mh, MALO_REG_H2A_INTERRUPT_EVENTS,
|
||||
MALO_H2ARIC_BIT_DOOR_BELL);
|
||||
dummy = malo_hal_read4(mh, MALO_REG_INT_CODE);
|
||||
malo_hal_read4(mh, MALO_REG_INT_CODE);
|
||||
}
|
||||
|
||||
static int
|
||||
|
|
|
|||
Loading…
Reference in a new issue