]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
rt2x00: Remove unneeded variable
authorIvo van Doorn <ivdoorn@gmail.com>
Tue, 29 Jun 2010 19:39:29 +0000 (21:39 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 30 Jun 2010 19:00:49 +0000 (15:00 -0400)
The update_bssid is set only when BSS_CHANGED_BSSID is used,
but the check if that field is true is done later in the function
but also only when BSS_CHANGED_BSSID is set. This makes the
variable useless, as it can never result in a negative check.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/rt2x00/rt2x00mac.c

index 2071cf321fafeebf14b55413f1f1c0e61754a0f7..3b838c0bf59f21d21f2a08f926edf0b1e4b3b06a 100644 (file)
@@ -563,7 +563,6 @@ void rt2x00mac_bss_info_changed(struct ieee80211_hw *hw,
 {
        struct rt2x00_dev *rt2x00dev = hw->priv;
        struct rt2x00_intf *intf = vif_to_intf(vif);
-       int update_bssid = 0;
 
        /*
         * mac80211 might be calling this function while we are trying
@@ -578,10 +577,8 @@ void rt2x00mac_bss_info_changed(struct ieee80211_hw *hw,
         * conf->bssid can be NULL if coming from the internal
         * beacon update routine.
         */
-       if (changes & BSS_CHANGED_BSSID) {
-               update_bssid = 1;
+       if (changes & BSS_CHANGED_BSSID)
                memcpy(&intf->bssid, bss_conf->bssid, ETH_ALEN);
-       }
 
        spin_unlock(&intf->lock);
 
@@ -593,7 +590,7 @@ void rt2x00mac_bss_info_changed(struct ieee80211_hw *hw,
         */
        if (changes & BSS_CHANGED_BSSID)
                rt2x00lib_config_intf(rt2x00dev, intf, vif->type, NULL,
-                                     update_bssid ? bss_conf->bssid : NULL);
+                                     bss_conf->bssid);
 
        /*
         * Update the beacon.