|
@@ -170,23 +170,27 @@ void rt2x00lib_config(struct rt2x00_dev *rt2x00dev,
|
|
|
unsigned int ieee80211_flags)
|
|
|
{
|
|
|
struct rt2x00lib_conf libconf;
|
|
|
+ u16 hw_value;
|
|
|
|
|
|
memset(&libconf, 0, sizeof(libconf));
|
|
|
|
|
|
libconf.conf = conf;
|
|
|
|
|
|
if (ieee80211_flags & IEEE80211_CONF_CHANGE_CHANNEL) {
|
|
|
- if (conf_is_ht40(conf))
|
|
|
+ if (conf_is_ht40(conf)) {
|
|
|
__set_bit(CONFIG_CHANNEL_HT40, &rt2x00dev->flags);
|
|
|
- else
|
|
|
+ hw_value = rt2x00ht_center_channel(rt2x00dev, conf);
|
|
|
+ } else {
|
|
|
__clear_bit(CONFIG_CHANNEL_HT40, &rt2x00dev->flags);
|
|
|
+ hw_value = conf->channel->hw_value;
|
|
|
+ }
|
|
|
|
|
|
memcpy(&libconf.rf,
|
|
|
- &rt2x00dev->spec.channels[conf->channel->hw_value],
|
|
|
+ &rt2x00dev->spec.channels[hw_value],
|
|
|
sizeof(libconf.rf));
|
|
|
|
|
|
memcpy(&libconf.channel,
|
|
|
- &rt2x00dev->spec.channels_info[conf->channel->hw_value],
|
|
|
+ &rt2x00dev->spec.channels_info[hw_value],
|
|
|
sizeof(libconf.channel));
|
|
|
}
|
|
|
|