Hi Nick Nick Kossifidis schrieb:
> 2012/7/29 Thomas Huehn <tho...@net.t-labs.tu-berlin.de>: >> Hi Nick, >> >> >>> Anyway if readability is the issue we can just do something like >>> >>> int txpower_halfdb = 0; >>> >>> [...] >>> >>> if(ah->power_level) { >>> txpower_halfdb = ah->power_level * 2; >>> } else { >>> txpower_halfdb = AR5K_TUNE_MAX_TXPOWER; >>> } >>> >>> and then it'll look like this >>> >>> ret = ath5k_hw_txpower(ah, channel, txpower_halfdb); >> > How will we distinguish the case when a user asks for the max power > from the case where we have initialized ah->ah_txpower.txp_requested > to max ? I do not sea any use-case where someone would need this distinction. But if there is such a need, I would rather store this information in a variable (e.g. user_set_power=true) explicitly rather than infer it from fact that our power variable is not initialised. Probably to much of a personal taste than to be considered further I guess. Greetings Thomas _______________________________________________ ath5k-devel mailing list ath5k-devel@lists.ath5k.org https://lists.ath5k.org/mailman/listinfo/ath5k-devel