[Refactor and sync wifi from Openwrt]
[Description]
Refactor and sync wifi from Openwrt
1.mt76/mac80211/hostapd/iw/wireless-regdb
[Release-log]
N/A
diff --git a/recipes-connectivity/hostapd/files/patches/905-master-Support-configuring-BSS-Termination-TSF-by-using-hos.patch b/recipes-connectivity/hostapd/files/patches/905-master-Support-configuring-BSS-Termination-TSF-by-using-hos.patch
index f6832e3..ad9c926 100644
--- a/recipes-connectivity/hostapd/files/patches/905-master-Support-configuring-BSS-Termination-TSF-by-using-hos.patch
+++ b/recipes-connectivity/hostapd/files/patches/905-master-Support-configuring-BSS-Termination-TSF-by-using-hos.patch
@@ -1,31 +1,21 @@
-From 56613ad9b568a3ac7467105beaa162c68ffbbf70 Mon Sep 17 00:00:00 2001
-From: "howard.hsu" <howard-yh.hsu@mediatek.com>
-Date: Wed, 19 Jan 2022 20:20:03 +0800
-Subject: [PATCH 4/9] Support configuring BSS Termination TSF by using
+From 6a949f8644546d689b7271228d19b1b1ad80632f Mon Sep 17 00:00:00 2001
+From: Howard Hsu <howard-yh.hsu@mediatek.com>
+Date: Thu, 9 Jun 2022 19:56:18 +0800
+Subject: [PATCH 1/6] Support configuring BSS Termination TSF by using
hostapd_cli command
---
- hostapd/ctrl_iface.c | 9 +++++++++
- src/ap/ap_config.c | 1 +
- src/ap/ap_config.h | 1 +
- 3 files changed, 11 insertions(+)
+ hostapd/ctrl_iface.c | 5 +++++
+ src/ap/ap_config.c | 1 +
+ src/ap/ap_config.h | 1 +
+ src/ap/ctrl_iface_ap.c | 4 ++++
+ 4 files changed, 11 insertions(+)
diff --git a/hostapd/ctrl_iface.c b/hostapd/ctrl_iface.c
-index f50fafb..1b5a091 100644
+index 4718368..e0a7e4f 100644
--- a/hostapd/ctrl_iface.c
+++ b/hostapd/ctrl_iface.c
-@@ -954,6 +954,10 @@ static int hostapd_ctrl_iface_bss_tm_req(struct hostapd_data *hapd,
- wpa_printf(MSG_DEBUG, "Invalid bss_term data");
- return -1;
- }
-+ if (hapd->conf->bss_termination_tsf) {
-+ WPA_PUT_LE64(&bss_term_dur[2], hapd->conf->bss_termination_tsf);
-+ }
-+
- end++;
- WPA_PUT_LE16(&bss_term_dur[10], atoi(end));
- }
-@@ -1589,6 +1593,11 @@ static int hostapd_ctrl_iface_set(struct hostapd_data *hapd, char *cmd)
+@@ -1326,6 +1326,11 @@ static int hostapd_ctrl_iface_set(struct hostapd_data *hapd, char *cmd)
#endif /* CONFIG_DPP */
} else if (os_strcasecmp(cmd, "setband") == 0) {
ret = hostapd_ctrl_iface_set_band(hapd, value);
@@ -38,7 +28,7 @@
ret = hostapd_set_iface(hapd->iconf, hapd->conf, cmd, value);
if (ret)
diff --git a/src/ap/ap_config.c b/src/ap/ap_config.c
-index 1f04686..078a3fc 100644
+index 23b67e1..f248281 100644
--- a/src/ap/ap_config.c
+++ b/src/ap/ap_config.c
@@ -170,6 +170,7 @@ void hostapd_config_defaults_bss(struct hostapd_bss_config *bss)
@@ -50,10 +40,10 @@
diff --git a/src/ap/ap_config.h b/src/ap/ap_config.h
-index f3aff36..7301bbb 100644
+index f795ee9..5dab8be 100644
--- a/src/ap/ap_config.h
+++ b/src/ap/ap_config.h
-@@ -549,6 +549,7 @@ struct hostapd_bss_config {
+@@ -557,6 +557,7 @@ struct hostapd_bss_config {
int wnm_sleep_mode;
int wnm_sleep_mode_no_keys;
int bss_transition;
@@ -61,6 +51,21 @@
/* IEEE 802.11u - Interworking */
int interworking;
+diff --git a/src/ap/ctrl_iface_ap.c b/src/ap/ctrl_iface_ap.c
+index c496e4f..aad5180 100644
+--- a/src/ap/ctrl_iface_ap.c
++++ b/src/ap/ctrl_iface_ap.c
+@@ -1202,6 +1202,10 @@ int hostapd_ctrl_iface_bss_tm_req(struct hostapd_data *hapd,
+ wpa_printf(MSG_DEBUG, "Invalid bss_term data");
+ return -1;
+ }
++ if (hapd->conf->bss_termination_tsf) {
++ WPA_PUT_LE64(&bss_term_dur[2], hapd->conf->bss_termination_tsf);
++ }
++
+ end++;
+ WPA_PUT_LE16(&bss_term_dur[10], atoi(end));
+ }
--
2.18.0