mac80211: fix a few -Wshadow warnings
authorJohannes Berg <johannes.berg@intel.com>
Fri, 20 Jan 2012 12:52:36 +0000 (13:52 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 27 Jan 2012 19:56:55 +0000 (14:56 -0500)
It seems that -Wshadow is no longer default in
sparse runs, but let's fix the warnings anyway.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
net/mac80211/rx.c
net/mac80211/status.c

index 7514091..73d2138 100644 (file)
@@ -2180,9 +2180,6 @@ ieee80211_rx_h_mgmt_check(struct ieee80211_rx_data *rx)
        if (rx->sdata->vif.type == NL80211_IFTYPE_AP &&
            ieee80211_is_beacon(mgmt->frame_control) &&
            !(rx->flags & IEEE80211_RX_BEACON_REPORTED)) {
-               struct ieee80211_rx_status *status;
-
-               status = IEEE80211_SKB_RXCB(rx->skb);
                cfg80211_report_obss_beacon(rx->local->hw.wiphy,
                                            rx->skb->data, rx->skb->len,
                                            status->freq, GFP_ATOMIC);
index 30c265c..d67f0b9 100644 (file)
@@ -350,7 +350,6 @@ void ieee80211_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb)
        bool send_to_cooked;
        bool acked;
        struct ieee80211_bar *bar;
-       u16 tid;
        int rtap_len;
 
        for (i = 0; i < IEEE80211_TX_MAX_RATES; i++) {
@@ -412,7 +411,7 @@ void ieee80211_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb)
                }
 
                if (!acked && ieee80211_is_back_req(fc)) {
-                       u16 control;
+                       u16 tid, control;
 
                        /*
                         * BAR failed, store the last SSN and retry sending
@@ -516,7 +515,8 @@ void ieee80211_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb)
 
                if (ieee80211_is_nullfunc(hdr->frame_control) ||
                    ieee80211_is_qos_nullfunc(hdr->frame_control)) {
-                       bool acked = info->flags & IEEE80211_TX_STAT_ACK;
+                       acked = info->flags & IEEE80211_TX_STAT_ACK;
+
                        cfg80211_probe_status(skb->dev, hdr->addr1,
                                              cookie, acked, GFP_ATOMIC);
                } else {