diff options
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2x00config.c')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00config.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00config.c b/drivers/net/wireless/rt2x00/rt2x00config.c index d134c3be539a..4d5e87b015a0 100644 --- a/drivers/net/wireless/rt2x00/rt2x00config.c +++ b/drivers/net/wireless/rt2x00/rt2x00config.c | |||
@@ -31,7 +31,7 @@ | |||
31 | 31 | ||
32 | void rt2x00lib_config_intf(struct rt2x00_dev *rt2x00dev, | 32 | void rt2x00lib_config_intf(struct rt2x00_dev *rt2x00dev, |
33 | struct rt2x00_intf *intf, | 33 | struct rt2x00_intf *intf, |
34 | enum ieee80211_if_types type, | 34 | enum nl80211_iftype type, |
35 | u8 *mac, u8 *bssid) | 35 | u8 *mac, u8 *bssid) |
36 | { | 36 | { |
37 | struct rt2x00intf_conf conf; | 37 | struct rt2x00intf_conf conf; |
@@ -40,11 +40,11 @@ void rt2x00lib_config_intf(struct rt2x00_dev *rt2x00dev, | |||
40 | conf.type = type; | 40 | conf.type = type; |
41 | 41 | ||
42 | switch (type) { | 42 | switch (type) { |
43 | case IEEE80211_IF_TYPE_IBSS: | 43 | case NL80211_IFTYPE_ADHOC: |
44 | case IEEE80211_IF_TYPE_AP: | 44 | case NL80211_IFTYPE_AP: |
45 | conf.sync = TSF_SYNC_BEACON; | 45 | conf.sync = TSF_SYNC_BEACON; |
46 | break; | 46 | break; |
47 | case IEEE80211_IF_TYPE_STA: | 47 | case NL80211_IFTYPE_STATION: |
48 | conf.sync = TSF_SYNC_INFRA; | 48 | conf.sync = TSF_SYNC_INFRA; |
49 | break; | 49 | break; |
50 | default: | 50 | default: |
@@ -121,7 +121,7 @@ void rt2x00lib_config_antenna(struct rt2x00_dev *rt2x00dev, | |||
121 | * Antenna setup changes require the RX to be disabled, | 121 | * Antenna setup changes require the RX to be disabled, |
122 | * else the changes will be ignored by the device. | 122 | * else the changes will be ignored by the device. |
123 | */ | 123 | */ |
124 | if (test_bit(DEVICE_ENABLED_RADIO, &rt2x00dev->flags)) | 124 | if (test_bit(DEVICE_STATE_ENABLED_RADIO, &rt2x00dev->flags)) |
125 | rt2x00lib_toggle_rx(rt2x00dev, STATE_RADIO_RX_OFF_LINK); | 125 | rt2x00lib_toggle_rx(rt2x00dev, STATE_RADIO_RX_OFF_LINK); |
126 | 126 | ||
127 | /* | 127 | /* |
@@ -136,7 +136,7 @@ void rt2x00lib_config_antenna(struct rt2x00_dev *rt2x00dev, | |||
136 | rt2x00dev->link.ant.active.rx = libconf.ant.rx; | 136 | rt2x00dev->link.ant.active.rx = libconf.ant.rx; |
137 | rt2x00dev->link.ant.active.tx = libconf.ant.tx; | 137 | rt2x00dev->link.ant.active.tx = libconf.ant.tx; |
138 | 138 | ||
139 | if (test_bit(DEVICE_ENABLED_RADIO, &rt2x00dev->flags)) | 139 | if (test_bit(DEVICE_STATE_ENABLED_RADIO, &rt2x00dev->flags)) |
140 | rt2x00lib_toggle_rx(rt2x00dev, STATE_RADIO_RX_ON_LINK); | 140 | rt2x00lib_toggle_rx(rt2x00dev, STATE_RADIO_RX_ON_LINK); |
141 | } | 141 | } |
142 | 142 | ||
@@ -245,6 +245,10 @@ config: | |||
245 | memcpy(&libconf.rf, | 245 | memcpy(&libconf.rf, |
246 | &rt2x00dev->spec.channels[conf->channel->hw_value], | 246 | &rt2x00dev->spec.channels[conf->channel->hw_value], |
247 | sizeof(libconf.rf)); | 247 | sizeof(libconf.rf)); |
248 | |||
249 | memcpy(&libconf.channel, | ||
250 | &rt2x00dev->spec.channels_info[conf->channel->hw_value], | ||
251 | sizeof(libconf.channel)); | ||
248 | } | 252 | } |
249 | 253 | ||
250 | if (flags & CONFIG_UPDATE_ANTENNA) { | 254 | if (flags & CONFIG_UPDATE_ANTENNA) { |