ath9k: Cleanup ath_vif struct
authorRajkumar Manoharan <rmanoharan@atheros.com>
Mon, 4 Apr 2011 17:26:17 +0000 (22:56 +0530)
committerJohn W. Linville <linville@tuxdriver.com>
Thu, 7 Apr 2011 19:34:15 +0000 (15:34 -0400)
Remove unused bssid from ath_vif and set av_bslot on beacon
alloc/return.

Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/ath9k/ath9k.h
drivers/net/wireless/ath/ath9k/beacon.c
drivers/net/wireless/ath/ath9k/main.c

index a43f059..f3a7530 100644 (file)
@@ -346,9 +346,7 @@ struct ath_vif {
        int av_bslot;
        bool is_bslot_active;
        __le64 tsf_adjust; /* TSF adjustment for staggered beacons */
-       enum nl80211_iftype av_opmode;
        struct ath_buf *av_bcbuf;
-       u8 bssid[ETH_ALEN]; /* current BSSID from config_interface */
 };
 
 /*******************/
index f688527..dfd1b98 100644 (file)
@@ -323,6 +323,7 @@ void ath_beacon_return(struct ath_softc *sc, struct ath_vif *avp)
                if (avp->av_bslot != -1) {
                        sc->beacon.bslot[avp->av_bslot] = NULL;
                        sc->nbcnvifs--;
+                       avp->av_bslot = -1;
                }
 
                bf = avp->av_bcbuf;
index 88073f4..6f300d7 100644 (file)
@@ -1450,7 +1450,6 @@ static int ath9k_add_interface(struct ieee80211_hw *hw,
        struct ath_softc *sc = hw->priv;
        struct ath_hw *ah = sc->sc_ah;
        struct ath_common *common = ath9k_hw_common(ah);
-       struct ath_vif *avp = (void *)vif->drv_priv;
        int ret = 0;
 
        mutex_lock(&sc->mutex);
@@ -1491,10 +1490,6 @@ static int ath9k_add_interface(struct ieee80211_hw *hw,
        ath_dbg(common, ATH_DBG_CONFIG,
                "Attach a VIF of type: %d\n", vif->type);
 
-       /* Set the VIF opmode */
-       avp->av_opmode = vif->type;
-       avp->av_bslot = -1;
-
        sc->nvifs++;
 
        ath9k_do_vif_add_setup(hw, vif);
@@ -1910,7 +1905,6 @@ static void ath9k_bss_info_changed(struct ieee80211_hw *hw,
        if (changed & BSS_CHANGED_BSSID) {
                /* Set BSSID */
                memcpy(common->curbssid, bss_conf->bssid, ETH_ALEN);
-               memcpy(avp->bssid, bss_conf->bssid, ETH_ALEN);
                common->curaid = 0;
                ath9k_hw_write_associd(ah);