Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 134088
b: refs/heads/master
c: 4797938
h: refs/heads/master
v: v3
  • Loading branch information
Johannes Berg authored and John W. Linville committed Jan 29, 2009
1 parent 6770701 commit 3b4d489
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 23 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 47166791b7296db5c0a7189401e42b8c7f4cca25
refs/heads/master: 4797938c5dfa22af30fd16679192972f878419a1
5 changes: 2 additions & 3 deletions trunk/drivers/net/wireless/ath9k/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2117,8 +2117,7 @@ static int ath9k_config(struct ieee80211_hw *hw, u32 changed)
struct ieee80211_conf *conf = &hw->conf;

mutex_lock(&sc->mutex);
if (changed & (IEEE80211_CONF_CHANGE_CHANNEL |
IEEE80211_CONF_CHANGE_HT)) {
if (changed & IEEE80211_CONF_CHANGE_CHANNEL) {
struct ieee80211_channel *curchan = hw->conf.channel;
int pos;

Expand All @@ -2144,7 +2143,7 @@ static int ath9k_config(struct ieee80211_hw *hw, u32 changed)

sc->sc_ah->ah_channels[pos].chanmode =
ath_get_extchanmode(sc, curchan,
conf->ht.channel_type);
conf->channel_type);
}

ath_update_chainmask(sc, conf_is_ht(conf));
Expand Down
20 changes: 7 additions & 13 deletions trunk/include/net/mac80211.h
Original file line number Diff line number Diff line change
Expand Up @@ -507,10 +507,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 {
enum nl80211_channel_type channel_type;
};

/**
* enum ieee80211_conf_changed - denotes which configuration changed
*
Expand All @@ -520,9 +516,8 @@ struct ieee80211_ht_conf {
* @IEEE80211_CONF_CHANGE_RADIOTAP: the radiotap flag changed
* @IEEE80211_CONF_CHANGE_PS: the PS flag changed
* @IEEE80211_CONF_CHANGE_POWER: the TX power changed
* @IEEE80211_CONF_CHANGE_CHANNEL: the channel changed
* @IEEE80211_CONF_CHANGE_CHANNEL: the channel/channel_type changed
* @IEEE80211_CONF_CHANGE_RETRY_LIMITS: retry limits changed
* @IEEE80211_CONF_CHANGE_HT: HT configuration changed
*/
enum ieee80211_conf_changed {
IEEE80211_CONF_CHANGE_RADIO_ENABLED = BIT(0),
Expand All @@ -533,7 +528,6 @@ enum ieee80211_conf_changed {
IEEE80211_CONF_CHANGE_POWER = BIT(5),
IEEE80211_CONF_CHANGE_CHANNEL = BIT(6),
IEEE80211_CONF_CHANGE_RETRY_LIMITS = BIT(7),
IEEE80211_CONF_CHANGE_HT = BIT(8),
};

/**
Expand All @@ -547,7 +541,7 @@ enum ieee80211_conf_changed {
* @flags: configuration flags defined above
* @power_level: requested transmit power (in dBm)
* @channel: the channel to tune to
* @ht: the HT configuration for the device
* @channel_type: the channel (HT) type
* @long_frame_max_tx_count: Maximum number of transmissions for a "long" frame
* (a frame not RTS protected), called "dot11LongRetryLimit" in 802.11,
* but actually means the number of transmissions not the number of retries
Expand All @@ -566,7 +560,7 @@ struct ieee80211_conf {
u8 long_frame_max_tx_count, short_frame_max_tx_count;

struct ieee80211_channel *channel;
struct ieee80211_ht_conf ht;
enum nl80211_channel_type channel_type;
};

/**
Expand Down Expand Up @@ -1960,19 +1954,19 @@ void ieee80211_rate_control_unregister(struct rate_control_ops *ops);
static inline bool
conf_is_ht20(struct ieee80211_conf *conf)
{
return conf->ht.channel_type == NL80211_CHAN_HT20;
return conf->channel_type == NL80211_CHAN_HT20;
}

static inline bool
conf_is_ht40_minus(struct ieee80211_conf *conf)
{
return conf->ht.channel_type == NL80211_CHAN_HT40MINUS;
return conf->channel_type == NL80211_CHAN_HT40MINUS;
}

static inline bool
conf_is_ht40_plus(struct ieee80211_conf *conf)
{
return conf->ht.channel_type == NL80211_CHAN_HT40PLUS;
return conf->channel_type == NL80211_CHAN_HT40PLUS;
}

static inline bool
Expand All @@ -1984,7 +1978,7 @@ conf_is_ht40(struct ieee80211_conf *conf)
static inline bool
conf_is_ht(struct ieee80211_conf *conf)
{
return conf->ht.channel_type != NL80211_CHAN_NO_HT;
return conf->channel_type != NL80211_CHAN_NO_HT;
}

#endif /* MAC80211_H */
8 changes: 5 additions & 3 deletions trunk/net/mac80211/ht.c
Original file line number Diff line number Diff line change
Expand Up @@ -131,12 +131,14 @@ u32 ieee80211_enable_ht(struct ieee80211_sub_if_data *sdata,
}

ht_changed = conf_is_ht(&local->hw.conf) != enable_ht ||
channel_type != local->hw.conf.ht.channel_type;
channel_type != local->hw.conf.channel_type;

local->oper_channel_type = channel_type;

if (ht_changed)
ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_HT);
if (ht_changed) {
/* channel_type change automatically detected */
ieee80211_hw_config(local, 0);
}

/* disable HT */
if (!enable_ht)
Expand Down
4 changes: 2 additions & 2 deletions trunk/net/mac80211/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -208,9 +208,9 @@ int ieee80211_hw_config(struct ieee80211_local *local, u32 changed)
}

if (chan != local->hw.conf.channel ||
channel_type != local->hw.conf.ht.channel_type) {
channel_type != local->hw.conf.channel_type) {
local->hw.conf.channel = chan;
local->hw.conf.ht.channel_type = channel_type;
local->hw.conf.channel_type = channel_type;
changed |= IEEE80211_CONF_CHANGE_CHANNEL;
}

Expand Down
2 changes: 1 addition & 1 deletion trunk/net/mac80211/mlme.c
Original file line number Diff line number Diff line change
Expand Up @@ -901,8 +901,8 @@ static void ieee80211_set_disassoc(struct ieee80211_sub_if_data *sdata,

rcu_read_unlock();

/* channel(_type) changes are handled by ieee80211_hw_config */
local->oper_channel_type = NL80211_CHAN_NO_HT;
config_changed |= IEEE80211_CONF_CHANGE_HT;

del_timer_sync(&local->dynamic_ps_timer);
cancel_work_sync(&local->dynamic_ps_enable_work);
Expand Down

0 comments on commit 3b4d489

Please sign in to comment.