]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/net/wireless/rtl8180_max2820.c
Merge branch 'topic/misc' into topic/pcsp-fix
[linux-2.6-omap-h63xx.git] / drivers / net / wireless / rtl8180_max2820.c
index a34dfd382b6df1470b766aec4bcb89fa73fa3d9b..6c825fd7f3b6f86f0b677860980a852d5ff918e8 100644 (file)
@@ -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);
 }