]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
mac80211: no need for ht.enabled
authorLuis R. Rodriguez <lrodriguez@atheros.com>
Tue, 23 Dec 2008 23:58:45 +0000 (15:58 -0800)
committerJohn W. Linville <linville@tuxdriver.com>
Thu, 29 Jan 2009 20:59:32 +0000 (15:59 -0500)
We can simply use conf_is_ht() check where needed.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
include/net/mac80211.h
net/mac80211/ht.c
net/mac80211/main.c
net/mac80211/mlme.c

index 1e8db8ae6159640502392c2d65309fcf81e47b3e..9d67fdf1c26acbb3851c0635d037a2ede14420e7 100644 (file)
@@ -508,7 +508,6 @@ static inline int __deprecated __IEEE80211_CONF_SHORT_SLOT_TIME(void)
 #define IEEE80211_CONF_SHORT_SLOT_TIME (__IEEE80211_CONF_SHORT_SLOT_TIME())
 
 struct ieee80211_ht_conf {
-       bool enabled;
        enum nl80211_channel_type channel_type;
 };
 
index c5c0c5271096ca7ae3369c2d99b0eeafe34bd413..f6547de5ac6b2d0a603571a469ff49e950f178bd 100644 (file)
@@ -130,11 +130,10 @@ u32 ieee80211_enable_ht(struct ieee80211_sub_if_data *sdata,
                }
        }
 
-       ht_changed = local->hw.conf.ht.enabled != enable_ht ||
+       ht_changed = conf_is_ht(&local->hw.conf) != enable_ht ||
                     channel_type != local->hw.conf.ht.channel_type;
 
        local->oper_channel_type = channel_type;
-       local->hw.conf.ht.enabled = enable_ht;
 
        if (ht_changed)
                ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_HT);
index 24b14363d6e70c77766c06946ba5407de122dc89..a6cb480dda0dee275087cde13821aaff89886f9f 100644 (file)
@@ -211,16 +211,6 @@ int ieee80211_hw_config(struct ieee80211_local *local, u32 changed)
            channel_type != local->hw.conf.ht.channel_type) {
                local->hw.conf.channel = chan;
                local->hw.conf.ht.channel_type = channel_type;
-               switch (channel_type) {
-               case NL80211_CHAN_NO_HT:
-                       local->hw.conf.ht.enabled = false;
-                       break;
-               case NL80211_CHAN_HT20:
-               case NL80211_CHAN_HT40MINUS:
-               case NL80211_CHAN_HT40PLUS:
-                       local->hw.conf.ht.enabled = true;
-                       break;
-               }
                changed |= IEEE80211_CONF_CHANGE_CHANNEL;
        }
 
index 599a42172a16dfcb6422070af91edae36f7fa7cd..12976026cc45f230c64881bc4a5fd8f2a8973aea 100644 (file)
@@ -901,7 +901,6 @@ static void ieee80211_set_disassoc(struct ieee80211_sub_if_data *sdata,
 
        rcu_read_unlock();
 
-       local->hw.conf.ht.enabled = false;
        local->oper_channel_type = NL80211_CHAN_NO_HT;
        config_changed |= IEEE80211_CONF_CHANGE_HT;