]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/net/wireless/ath/ath5k/eeprom.c
ath5k: cleanup channel to eprom_mode function
[karo-tx-linux.git] / drivers / net / wireless / ath / ath5k / eeprom.c
index b7e0258887e70cf9be193c70e73334e9e8fe0473..94d34ee02265d11fed55b014b84058f39177c905 100644 (file)
@@ -1779,7 +1779,8 @@ ath5k_eeprom_detach(struct ath5k_hw *ah)
 }
 
 int
-ath5k_eeprom_mode_from_channel(struct ieee80211_channel *channel)
+ath5k_eeprom_mode_from_channel(struct ath5k_hw *ah,
+               struct ieee80211_channel *channel)
 {
        switch (channel->hw_value) {
        case AR5K_MODE_11A:
@@ -1789,6 +1790,7 @@ ath5k_eeprom_mode_from_channel(struct ieee80211_channel *channel)
        case AR5K_MODE_11B:
                return AR5K_EEPROM_MODE_11B;
        default:
-               return -1;
+               ATH5K_WARN(ah, "channel is not A/B/G!");
+               return AR5K_EEPROM_MODE_11A;
        }
 }