aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/zd1211rw/zd_mac.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/zd1211rw/zd_mac.c')
-rw-r--r--drivers/net/wireless/zd1211rw/zd_mac.c17
1 files changed, 4 insertions, 13 deletions
diff --git a/drivers/net/wireless/zd1211rw/zd_mac.c b/drivers/net/wireless/zd1211rw/zd_mac.c
index e5fedf968c1..7845b6dac83 100644
--- a/drivers/net/wireless/zd1211rw/zd_mac.c
+++ b/drivers/net/wireless/zd1211rw/zd_mac.c
@@ -317,21 +317,12 @@ int zd_mac_request_channel(struct zd_mac *mac, u8 channel)
317 return 0; 317 return 0;
318} 318}
319 319
320int zd_mac_get_channel(struct zd_mac *mac, u8 *channel, u8 *flags) 320u8 zd_mac_get_channel(struct zd_mac *mac)
321{ 321{
322 struct ieee80211_device *ieee = zd_mac_to_ieee80211(mac); 322 u8 channel = zd_chip_get_channel(&mac->chip);
323 323
324 *channel = zd_chip_get_channel(&mac->chip); 324 dev_dbg_f(zd_mac_dev(mac), "channel %u\n", channel);
325 if (ieee->iw_mode != IW_MODE_INFRA) { 325 return channel;
326 spin_lock_irq(&mac->lock);
327 *flags = *channel == mac->requested_channel ?
328 MAC_FIXED_CHANNEL : 0;
329 spin_unlock(&mac->lock);
330 } else {
331 *flags = 0;
332 }
333 dev_dbg_f(zd_mac_dev(mac), "channel %u flags %u\n", *channel, *flags);
334 return 0;
335} 326}
336 327
337/* If wrong rate is given, we are falling back to the slowest rate: 1MBit/s */ 328/* If wrong rate is given, we are falling back to the slowest rate: 1MBit/s */