aboutsummaryrefslogtreecommitdiffstats
path: root/virt/kvm/assigned-dev.c
diff options
context:
space:
mode:
authorBruno Randolf <br1@einfach.org>2010-12-21 03:30:32 -0500
committerJohn W. Linville <linville@tuxdriver.com>2010-12-22 15:43:28 -0500
commit51f00622e5664ae77fd6c8670ddd402d9b77ccc8 (patch)
tree0bb0a32d948306e3b4f7b219ed270e05bf974b34 /virt/kvm/assigned-dev.c
parent56bd29d361a53f3bf6b815b5bf570a23bdc55b35 (diff)
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 <br1@einfach.org> Acked-by: Nick Kossifidis <mickflemm@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'virt/kvm/assigned-dev.c')
0 files changed, 0 insertions, 0 deletions