From: Bruno Randolf Date: Tue, 21 Dec 2010 08:30:32 +0000 (+0900) Subject: ath5k: Track current TX power separately from max TX power X-Git-Tag: v2.6.38-rc1~476^2~14^2~3^2~65 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=51f00622e5664ae77fd6c8670ddd402d9b77ccc8;p=pandora-kernel.git ath5k: Track current TX power separately from max TX power Add a new variable to keep track of the currently configured tx power. Before max_pwr was re-used for keeping the maximum allowed power as well as the current configuration. Doing a min() on it allows you to lower the txpower, but how would you be able to make it higher again? This patch fixes that by adding a new variable ah_cur_pwr which is used instead of txp_max_pwr to keep the current configuration. txp_max_pwr is used to check if we are within the limits. Another problem fixed by this patch is that it avoids setting a zero txpower when things are initialized first and the current power is not yet set. Signed-off-by: Bruno Randolf Acked-by: Nick Kossifidis Signed-off-by: John W. Linville --- Reading git-diff-tree failed