mac80211: remove set but unused variables
authorJohannes Berg <johannes.berg@intel.com>
Wed, 29 Jan 2014 14:23:46 +0000 (15:23 +0100)
committerJohannes Berg <johannes.berg@intel.com>
Tue, 4 Feb 2014 20:58:14 +0000 (21:58 +0100)
Compiling with W=1 found a few variables that are set
but not used (-Wunused-but-set-variable), remove them.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/ibss.c
net/mac80211/status.c
net/mac80211/util.c

index 531477a62f4b46728c0e1afdf763d8f127d697a0..8e444476307ab06cf14a1d7925ba82ad4decbb3d 100644 (file)
@@ -220,7 +220,6 @@ static void __ieee80211_sta_join_ibss(struct ieee80211_sub_if_data *sdata,
 {
        struct ieee80211_if_ibss *ifibss = &sdata->u.ibss;
        struct ieee80211_local *local = sdata->local;
-       struct ieee80211_supported_band *sband;
        struct ieee80211_mgmt *mgmt;
        struct cfg80211_bss *bss;
        u32 bss_change;
@@ -307,8 +306,6 @@ static void __ieee80211_sta_join_ibss(struct ieee80211_sub_if_data *sdata,
 
        memcpy(ifibss->bssid, bssid, ETH_ALEN);
 
-       sband = local->hw.wiphy->bands[chan->band];
-
        presp = ieee80211_ibss_build_presp(sdata, beacon_int, basic_rates,
                                           capability, tsf, &chandef,
                                           &have_higher_than_11mbit, NULL);
index 1ee85c402439bfc886029f9ae6dfe6ec306e013f..e6e574a307c8f3fd552329379919aaf9d071245d 100644 (file)
@@ -479,7 +479,7 @@ static void ieee80211_tx_latency_end_msrmnt(struct ieee80211_local *local,
        u32 msrmnt;
        u16 tid;
        u8 *qc;
-       int i, bin_range_count, bin_count;
+       int i, bin_range_count;
        u32 *bin_ranges;
        __le16 fc;
        struct ieee80211_tx_latency_stat *tx_lat;
@@ -522,7 +522,6 @@ static void ieee80211_tx_latency_end_msrmnt(struct ieee80211_local *local,
        /* count how many Tx frames transmitted with the appropriate latency */
        bin_range_count = tx_latency->n_ranges;
        bin_ranges = tx_latency->ranges;
-       bin_count = tx_lat->bin_count;
 
        for (i = 0; i < bin_range_count; i++) {
                if (msrmnt <= bin_ranges[i]) {
index 128a0c57a0d304acab3f272a611167866f5913f0..503bbced21f0af322795bee7972d589ed4e0e547 100644 (file)
@@ -1374,7 +1374,6 @@ u32 ieee80211_sta_get_rates(struct ieee80211_sub_if_data *sdata,
                            enum ieee80211_band band, u32 *basic_rates)
 {
        struct ieee80211_supported_band *sband;
-       struct ieee80211_rate *bitrates;
        size_t num_rates;
        u32 supp_rates, rate_flags;
        int i, j, shift;
@@ -1386,7 +1385,6 @@ u32 ieee80211_sta_get_rates(struct ieee80211_sub_if_data *sdata,
        if (WARN_ON(!sband))
                return 1;
 
-       bitrates = sband->bitrates;
        num_rates = sband->n_bitrates;
        supp_rates = 0;
        for (i = 0; i < elems->supp_rates_len +