ath5k: cleanup channel to eprom_mode function
Stop returning negative values from ath5k_eeprom_mode_from_channel. Yell loudly about that case in that function instead and return the default/zero/mode A. This cleans up the callers, but needs to pass ah down to ath5k_eeprom_mode_from_channel for ATH5K_WARN. For that purpose we also need the declaration to be moved to ath5k.h. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Acked-by: Nick Kossifidis <mickflemm@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Esse commit está contido em:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
Referência em uma nova issue
Block a user