diff options
author | Ivo van Doorn <ivdoorn@gmail.com> | 2010-06-29 15:39:29 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-06-30 15:00:49 -0400 |
commit | 1ed7a17a8eb4e60b9e25d9d0eaec19ac704d4f9b (patch) | |
tree | 559df808d64f1ae57d6596ed64adf8b4e2839d12 /drivers | |
parent | f1aa4c541e98afa8b770a75ccaa8504d0bff44a7 (diff) |
rt2x00: Remove unneeded variable
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00mac.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00mac.c b/drivers/net/wireless/rt2x00/rt2x00mac.c index 2071cf321faf..3b838c0bf59f 100644 --- a/drivers/net/wireless/rt2x00/rt2x00mac.c +++ b/drivers/net/wireless/rt2x00/rt2x00mac.c | |||
@@ -563,7 +563,6 @@ void rt2x00mac_bss_info_changed(struct ieee80211_hw *hw, | |||
563 | { | 563 | { |
564 | struct rt2x00_dev *rt2x00dev = hw->priv; | 564 | struct rt2x00_dev *rt2x00dev = hw->priv; |
565 | struct rt2x00_intf *intf = vif_to_intf(vif); | 565 | struct rt2x00_intf *intf = vif_to_intf(vif); |
566 | int update_bssid = 0; | ||
567 | 566 | ||
568 | /* | 567 | /* |
569 | * mac80211 might be calling this function while we are trying | 568 | * mac80211 might be calling this function while we are trying |
@@ -578,10 +577,8 @@ void rt2x00mac_bss_info_changed(struct ieee80211_hw *hw, | |||
578 | * conf->bssid can be NULL if coming from the internal | 577 | * conf->bssid can be NULL if coming from the internal |
579 | * beacon update routine. | 578 | * beacon update routine. |
580 | */ | 579 | */ |
581 | if (changes & BSS_CHANGED_BSSID) { | 580 | if (changes & BSS_CHANGED_BSSID) |
582 | update_bssid = 1; | ||
583 | memcpy(&intf->bssid, bss_conf->bssid, ETH_ALEN); | 581 | memcpy(&intf->bssid, bss_conf->bssid, ETH_ALEN); |
584 | } | ||
585 | 582 | ||
586 | spin_unlock(&intf->lock); | 583 | spin_unlock(&intf->lock); |
587 | 584 | ||
@@ -593,7 +590,7 @@ void rt2x00mac_bss_info_changed(struct ieee80211_hw *hw, | |||
593 | */ | 590 | */ |
594 | if (changes & BSS_CHANGED_BSSID) | 591 | if (changes & BSS_CHANGED_BSSID) |
595 | rt2x00lib_config_intf(rt2x00dev, intf, vif->type, NULL, | 592 | rt2x00lib_config_intf(rt2x00dev, intf, vif->type, NULL, |
596 | update_bssid ? bss_conf->bssid : NULL); | 593 | bss_conf->bssid); |
597 | 594 | ||
598 | /* | 595 | /* |
599 | * Update the beacon. | 596 | * Update the beacon. |