From 1caae87ac0f388ce65da39f0b667782a658bd5a5 Mon Sep 17 00:00:00 2001 From: Mike Baker Date: Fri, 24 Mar 2006 14:39:27 +0000 Subject: [PATCH] fix txpwr SVN-Revision: 3474 --- openwrt/package/wificonf/wificonf.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/openwrt/package/wificonf/wificonf.c b/openwrt/package/wificonf/wificonf.c index dec61190aa..251ebb9585 100644 --- a/openwrt/package/wificonf/wificonf.c +++ b/openwrt/package/wificonf/wificonf.c @@ -390,9 +390,12 @@ static void setup_bcom(int skfd, char *ifname) val = atoi(nvram_safe_get(wl_var("txpwr"))); if (val <= 0) - val = atoi(nvram_safe_get(wl_var("pa0maxpwr"))); - val = mw_to_qdbm(val); - bcom_set_int(skfd, ifname, "qtxpower", val); + val = atoi(nvram_safe_get("pa0maxpwr")); + + if (val) { + val = mw_to_qdbm(val); + bcom_set_int(skfd, ifname, "qtxpower", val); + } /* Set other options */ val = nvram_enabled(wl_var("lazywds")); -- 2.30.2