mwl8k: remove mwl8k_vif::bssid, which is now useless
authorLennert Buytenhek <buytenh@wantstofly.org>
Mon, 4 Jan 2010 20:55:21 +0000 (21:55 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 5 Jan 2010 22:13:25 +0000 (17:13 -0500)
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/mwl8k.c

index df0596c..ed666b7 100644 (file)
@@ -211,9 +211,6 @@ struct mwl8k_vif {
        /* Local MAC address.  */
        u8 mac_addr[ETH_ALEN];
 
-       /* BSSID of AP.  */
-       u8 bssid[ETH_ALEN];
-
        /* Index into station database. Returned by UPDATE_STADB.  */
        u8      peer_id;
 
@@ -2001,7 +1998,7 @@ struct mwl8k_cmd_set_post_scan {
 } __attribute__((packed));
 
 static int
-mwl8k_cmd_set_post_scan(struct ieee80211_hw *hw, __u8 *mac)
+mwl8k_cmd_set_post_scan(struct ieee80211_hw *hw, const __u8 *mac)
 {
        struct mwl8k_cmd_set_post_scan *cmd;
        int rc;
@@ -2077,7 +2074,6 @@ struct mwl8k_cmd_update_set_aid {
 static int
 mwl8k_cmd_set_aid(struct ieee80211_hw *hw, struct ieee80211_vif *vif)
 {
-       struct mwl8k_vif *mv_vif = MWL8K_VIF(vif);
        struct mwl8k_cmd_update_set_aid *cmd;
        u16 prot_mode;
        int rc;
@@ -2090,7 +2086,7 @@ mwl8k_cmd_set_aid(struct ieee80211_hw *hw, struct ieee80211_vif *vif)
        cmd->header.length = cpu_to_le16(sizeof(*cmd));
        cmd->aid = cpu_to_le16(vif->bss_conf.aid);
 
-       memcpy(cmd->bssid, mv_vif->bssid, ETH_ALEN);
+       memcpy(cmd->bssid, vif->bss_conf.bssid, ETH_ALEN);
 
        if (vif->bss_conf.use_cts_prot) {
                prot_mode = MWL8K_FRAME_PROT_11G;
@@ -2945,7 +2941,6 @@ static void mwl8k_bss_info_changed(struct ieee80211_hw *hw,
                                   u32 changed)
 {
        struct mwl8k_priv *priv = hw->priv;
-       struct mwl8k_vif *mwl8k_vif = MWL8K_VIF(vif);
        int rc;
 
        if ((changed & BSS_CHANGED_ASSOC) == 0)
@@ -2958,8 +2953,6 @@ static void mwl8k_bss_info_changed(struct ieee80211_hw *hw,
                return;
 
        if (vif->bss_conf.assoc) {
-               memcpy(mwl8k_vif->bssid, vif->bss_conf.bssid, ETH_ALEN);
-
                /* Install rates */
                rc = mwl8k_cmd_set_rate(hw, vif);
                if (rc)
@@ -2991,10 +2984,8 @@ static void mwl8k_bss_info_changed(struct ieee80211_hw *hw,
                 * Finalize the join.  Tell rx handler to process
                 * next beacon from our BSSID.
                 */
-               memcpy(priv->capture_bssid, mwl8k_vif->bssid, ETH_ALEN);
+               memcpy(priv->capture_bssid, vif->bss_conf.bssid, ETH_ALEN);
                priv->capture_beacon = true;
-       } else {
-               memset(mwl8k_vif->bssid, 0, ETH_ALEN);
        }
 
 out:
@@ -3097,7 +3088,7 @@ static void mwl8k_configure_filter(struct ieee80211_hw *hw,
                         */
                        mwl8k_cmd_set_pre_scan(hw);
                } else {
-                       u8 *bssid;
+                       const u8 *bssid;
 
                        /*
                         * Enable the BSS filter.
@@ -3109,7 +3100,7 @@ static void mwl8k_configure_filter(struct ieee80211_hw *hw,
                         */
                        bssid = "\x01\x00\x00\x00\x00\x00";
                        if (priv->vif != NULL)
-                               bssid = MWL8K_VIF(priv->vif)->bssid;
+                               bssid = priv->vif->bss_conf.bssid;
 
                        mwl8k_cmd_set_post_scan(hw, bssid);
                }