summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/rtl8180_max2820.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-06-25 12:27:29 +0200
committerIngo Molnar <mingo@elte.hu>2008-06-25 12:27:29 +0200
commit5ce001b0e56638c726270d4f9e05d46d4250dfbb (patch)
treec21cf007ddef99d5e8b23dde9621bd9152e676a8 /drivers/net/wireless/rtl8180_max2820.c
parent7c9f8861e6c9c839f913e49b98c3854daca18f27 (diff)
parent543cf4cb3fe6f6cae3651ba918b9c56200b257d0 (diff)
Merge branch 'linus' into stackprotectortip-stackprotector-2008-06-25_10.27_Wed
Diffstat (limited to 'drivers/net/wireless/rtl8180_max2820.c')
-rw-r--r--drivers/net/wireless/rtl8180_max2820.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/wireless/rtl8180_max2820.c b/drivers/net/wireless/rtl8180_max2820.c
index a34dfd382b6d..6c825fd7f3b6 100644
--- a/drivers/net/wireless/rtl8180_max2820.c
+++ b/drivers/net/wireless/rtl8180_max2820.c
@@ -78,7 +78,8 @@ static void max2820_rf_set_channel(struct ieee80211_hw *dev,
struct ieee80211_conf *conf)
{
struct rtl8180_priv *priv = dev->priv;
- int channel = ieee80211_frequency_to_channel(conf->channel->center_freq);
+ int channel = conf ?
+ ieee80211_frequency_to_channel(conf->channel->center_freq) : 1;
unsigned int chan_idx = channel - 1;
u32 txpw = priv->channels[chan_idx].hw_value & 0xFF;
u32 chan = max2820_chan[chan_idx];
@@ -87,7 +88,7 @@ static void max2820_rf_set_channel(struct ieee80211_hw *dev,
* sa2400, for MAXIM we do this directly from BB */
rtl8180_write_phy(dev, 3, txpw);
- max2820_write_phy_antenna(dev, chan);
+ max2820_write_phy_antenna(dev, channel);
write_max2820(dev, 3, chan);
}