summaryrefslogtreecommitdiffstats
path: root/package/hostapd-rtk/files
diff options
context:
space:
mode:
Diffstat (limited to 'package/hostapd-rtk/files')
-rw-r--r--package/hostapd-rtk/files/hostapd.sh6
-rwxr-xr-xpackage/hostapd-rtk/files/realtek.sh2
2 files changed, 7 insertions, 1 deletions
diff --git a/package/hostapd-rtk/files/hostapd.sh b/package/hostapd-rtk/files/hostapd.sh
index 45ce0af07..b977db81e 100644
--- a/package/hostapd-rtk/files/hostapd.sh
+++ b/package/hostapd-rtk/files/hostapd.sh
@@ -279,6 +279,7 @@ hostapd_setup_vif() {
local vif="$1"
local driver="$2"
local ifname device channel hwmode
+ local calibration
hostapd_cfg=
@@ -316,6 +317,11 @@ hostapd_setup_vif() {
# enable Space-Time Block Coding for better throughput
append hostapd_cfg "stbc=1" "$N"
+
+ #TODO: make hostapd immune to invalid options
+ # just skip pwrlevel5G for now
+ calibration=$(rtkmib --get wcal | grep -v pwrlevel5G)
+ append hostapd_cfg "$calibration" "$N"
fi
case "$hwmode" in
diff --git a/package/hostapd-rtk/files/realtek.sh b/package/hostapd-rtk/files/realtek.sh
index 27ba1f1e2..092d7843c 100755
--- a/package/hostapd-rtk/files/realtek.sh
+++ b/package/hostapd-rtk/files/realtek.sh
@@ -304,7 +304,7 @@ detect_realtek() {
config wifi-device wlan$devidx
option type realtek
option channel 11
- option macaddr $(cat /sys/class/net/${dev}/address)
+ option macaddr $(rtkmib --get wmac0)
#TODO: enable after realtek merge with hostapd
#option hwmode 11ng
option htmode HT40-