regdb: Generalize the mW to dBm power conversion
authorchaitanya.mgit@gmail.com <chaitanya.mgit@gmail.com>
Mon, 26 May 2014 12:31:44 +0000 (18:01 +0530)
committerJohannes Berg <johannes.berg@intel.com>
Tue, 27 May 2014 15:58:58 +0000 (17:58 +0200)
commita9fb54169b197f31aff24c8d6270dd1e56cde395
tree1a41f5b50ba2f49af825d657141d61d83ad65683
parentc7d37a66e345df2fdf1aa7b2c9a6d3d53846ca5b
regdb: Generalize the mW to dBm power conversion

Generalize the power conversion from mW to dBm
using log. This should fix the below compilation
error for country NO which adds a new power value
2000mW which is not handled earlier.

 CC [M]  net/wireless/wext-sme.o
 CC [M]  net/wireless/regdb.o
net/wireless/regdb.c:1130:1: error: Unknown undeclared here (not in
a function)
net/wireless/regdb.c:1130:9: error: expected } before power
make[2]: *** [net/wireless/regdb.o] Error 1
make[1]: *** [net/wireless] Error 2
make: *** [net] Error 2

Reported-By: John Walker <john@x109.net>
Signed-off-by: Chaitanya T K <chaitanya.mgit@gmail.com>
Acked-by: John W. Linville <linville@tuxdriver.com>
[remove unneeded parentheses, fix rounding by using %.0f]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/wireless/genregdb.awk