The branch main has been updated by imp:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=fba6f8efb674772b3deff0b5f5674c73d1b0624d

commit fba6f8efb674772b3deff0b5f5674c73d1b0624d
Author:     Warner Losh <[email protected]>
AuthorDate: 2022-04-06 02:01:22 +0000
Commit:     Warner Losh <[email protected]>
CommitDate: 2022-04-06 03:42:05 +0000

    malo: Remove write only variables, but leave hardware reads in place
    
    Sponsored by:           Netflix
---
 sys/dev/malo/if_malo.c    |  9 +++------
 sys/dev/malo/if_malohal.c | 10 ++++------
 2 files changed, 7 insertions(+), 12 deletions(-)

diff --git a/sys/dev/malo/if_malo.c b/sys/dev/malo/if_malo.c
index 0b5d7e9d950d..89c48c04db7f 100644
--- a/sys/dev/malo/if_malo.c
+++ b/sys/dev/malo/if_malo.c
@@ -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;
 
diff --git a/sys/dev/malo/if_malohal.c b/sys/dev/malo/if_malohal.c
index ed74a7324b2c..7fb8537f4cd3 100644
--- a/sys/dev/malo/if_malohal.c
+++ b/sys/dev/malo/if_malohal.c
@@ -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

Reply via email to