Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
This commit is contained in:
@@ -8,9 +8,9 @@ PKG_LICENSE_FILES:=
|
||||
|
||||
PKG_SOURCE_URL:=https://github.com/openwrt/mt76
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_DATE:=2025-02-14
|
||||
PKG_SOURCE_VERSION:=e5fef138524e63314cb96ff8314048d175294e95
|
||||
PKG_MIRROR_HASH:=4d6ea8669b3034c97f5b341a5473facf4fe21262a2fde71257b57c4d1c86be5e
|
||||
PKG_SOURCE_DATE:=2025-08-13
|
||||
PKG_SOURCE_VERSION:=903a7e0ace79dc9802b381fa05ecd2028122dd1b
|
||||
PKG_MIRROR_HASH:=fcff7a90c8745091b8113e7833dc1f25e2767ff76da1f7adad27bde225c834df
|
||||
|
||||
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
|
||||
PKG_USE_NINJA:=0
|
||||
|
||||
@@ -0,0 +1,84 @@
|
||||
--- a/mt7915/main.c
|
||||
+++ b/mt7915/main.c
|
||||
@@ -1224,10 +1224,9 @@ static void mt7915_sta_rc_work(void *dat
|
||||
|
||||
static void mt7915_sta_rc_update(struct ieee80211_hw *hw,
|
||||
struct ieee80211_vif *vif,
|
||||
- struct ieee80211_link_sta *link_sta,
|
||||
+ struct ieee80211_sta *sta,
|
||||
u32 changed)
|
||||
{
|
||||
- struct ieee80211_sta *sta = link_sta->sta;
|
||||
struct mt7915_phy *phy = mt7915_hw_phy(hw);
|
||||
struct mt7915_dev *dev = phy->dev;
|
||||
struct mt7915_sta *msta = (struct mt7915_sta *)sta->drv_priv;
|
||||
@@ -1771,7 +1770,7 @@ const struct ieee80211_ops mt7915_ops =
|
||||
.stop_ap = mt7915_stop_ap,
|
||||
.sta_state = mt76_sta_state,
|
||||
.sta_pre_rcu_remove = mt76_sta_pre_rcu_remove,
|
||||
- .link_sta_rc_update = mt7915_sta_rc_update,
|
||||
+ .sta_rc_update = mt7915_sta_rc_update,
|
||||
.set_key = mt7915_set_key,
|
||||
.ampdu_action = mt7915_ampdu_action,
|
||||
.set_rts_threshold = mt7915_set_rts_threshold,
|
||||
--- a/mt7996/main.c
|
||||
+++ b/mt7996/main.c
|
||||
@@ -715,8 +715,7 @@ static void mt7996_configure_filter(stru
|
||||
}
|
||||
|
||||
static int
|
||||
-mt7996_get_txpower(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
|
||||
- unsigned int link_id, int *dbm)
|
||||
+mt7996_get_txpower(struct ieee80211_hw *hw, struct ieee80211_vif *vif, int *dbm)
|
||||
{
|
||||
struct mt7996_vif *mvif = (struct mt7996_vif *)vif->drv_priv;
|
||||
struct mt7996_phy *phy = mt7996_vif_link_phy(&mvif->deflink);
|
||||
@@ -1714,13 +1713,12 @@ out:
|
||||
rcu_read_unlock();
|
||||
}
|
||||
|
||||
-static void mt7996_link_sta_rc_update(struct ieee80211_hw *hw,
|
||||
- struct ieee80211_vif *vif,
|
||||
- struct ieee80211_link_sta *link_sta,
|
||||
- u32 changed)
|
||||
+static void mt7996_sta_rc_update(struct ieee80211_hw *hw,
|
||||
+ struct ieee80211_vif *vif,
|
||||
+ struct ieee80211_sta *sta,
|
||||
+ u32 changed)
|
||||
{
|
||||
struct mt7996_dev *dev = mt7996_hw_dev(hw);
|
||||
- struct ieee80211_sta *sta = link_sta->sta;
|
||||
|
||||
mt7996_link_rate_ctrl_update(&changed, sta);
|
||||
ieee80211_queue_work(hw, &dev->rc_work);
|
||||
@@ -2213,7 +2211,7 @@ const struct ieee80211_ops mt7996_ops =
|
||||
.link_info_changed = mt7996_link_info_changed,
|
||||
.sta_state = mt7996_sta_state,
|
||||
.sta_pre_rcu_remove = mt76_sta_pre_rcu_remove,
|
||||
- .link_sta_rc_update = mt7996_link_sta_rc_update,
|
||||
+ .sta_rc_update = mt7996_sta_rc_update,
|
||||
.set_key = mt7996_set_key,
|
||||
.ampdu_action = mt7996_ampdu_action,
|
||||
.set_rts_threshold = mt7996_set_rts_threshold,
|
||||
--- a/mac80211.c
|
||||
+++ b/mac80211.c
|
||||
@@ -1704,7 +1704,7 @@ s8 mt76_get_power_bound(struct mt76_phy
|
||||
EXPORT_SYMBOL_GPL(mt76_get_power_bound);
|
||||
|
||||
int mt76_get_txpower(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
|
||||
- unsigned int link_id, int *dbm)
|
||||
+ int *dbm)
|
||||
{
|
||||
struct mt76_phy *phy = mt76_vif_phy(hw, vif);
|
||||
int n_chains, delta;
|
||||
--- a/mt76.h
|
||||
+++ b/mt76.h
|
||||
@@ -1520,7 +1520,7 @@ int mt76_get_min_avg_rssi(struct mt76_de
|
||||
s8 mt76_get_power_bound(struct mt76_phy *phy, s8 txpower);
|
||||
|
||||
int mt76_get_txpower(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
|
||||
- unsigned int link_id, int *dbm);
|
||||
+ int *dbm);
|
||||
int mt76_init_sar_power(struct ieee80211_hw *hw,
|
||||
const struct cfg80211_sar_specs *sar);
|
||||
int mt76_get_sar_power(struct mt76_phy *phy,
|
||||
-29
@@ -1,29 +0,0 @@
|
||||
From ee6dac9b6b765e8aab5727688463880c52f6193d Mon Sep 17 00:00:00 2001
|
||||
From: David Bauer <mail@david-bauer.net>
|
||||
Date: Wed, 2 Apr 2025 02:45:26 +0200
|
||||
Subject: [PATCH] wifi: mt76: mt7915: mcu: increase eeprom command timeout
|
||||
|
||||
Increase the timeout for MCU_EXT_CMD_EFUSE_BUFFER_MODE command.
|
||||
|
||||
Regular retries upon hardware-recovery have been observed. Increasing
|
||||
the timeout slightly remedies this problem.
|
||||
|
||||
Signed-off-by: David Bauer <mail@david-bauer.net>
|
||||
Link: https://patch.msgid.link/20250402004528.1036715-2-mail@david-bauer.net
|
||||
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
---
|
||||
mt7915/mcu.c | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
--- a/mt7915/mcu.c
|
||||
+++ b/mt7915/mcu.c
|
||||
@@ -208,6 +208,9 @@ mt7915_mcu_set_timeout(struct mt76_dev *
|
||||
case MCU_EXT_CMD_BSS_INFO_UPDATE:
|
||||
mdev->mcu.timeout = 2 * HZ;
|
||||
return;
|
||||
+ case MCU_EXT_CMD_EFUSE_BUFFER_MODE:
|
||||
+ mdev->mcu.timeout = 10 * HZ;
|
||||
+ return;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
From 0534761b76e1b2e3390b345e524ce959f3fa50fb Mon Sep 17 00:00:00 2001
|
||||
From: David Bauer <mail@david-bauer.net>
|
||||
Date: Wed, 2 Apr 2025 02:45:25 +0200
|
||||
Subject: [PATCH] wifi: mt76: mt7915: mcu: lower default timeout
|
||||
|
||||
The default timeout set in mt76_connac2_mcu_fill_message of 20 seconds
|
||||
leads to excessive stalling in case messages are lost.
|
||||
|
||||
Testing showed that a smaller timeout of 5 seconds is sufficient in
|
||||
normal operation.
|
||||
|
||||
Signed-off-by: David Bauer <mail@david-bauer.net>
|
||||
Link: https://patch.msgid.link/20250402004528.1036715-1-mail@david-bauer.net
|
||||
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
---
|
||||
mt7915/mcu.c | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
--- a/mt7915/mcu.c
|
||||
+++ b/mt7915/mcu.c
|
||||
@@ -197,6 +197,8 @@ mt7915_mcu_parse_response(struct mt76_de
|
||||
static void
|
||||
mt7915_mcu_set_timeout(struct mt76_dev *mdev, int cmd)
|
||||
{
|
||||
+ mdev->mcu.timeout = 5 * HZ;
|
||||
+
|
||||
if ((cmd & __MCU_CMD_FIELD_ID) != MCU_CMD_EXT_CID)
|
||||
return;
|
||||
|
||||
-56
@@ -1,56 +0,0 @@
|
||||
From 79dd14f2e8161b656341b6653261779199aedbe4 Mon Sep 17 00:00:00 2001
|
||||
From: David Bauer <mail@david-bauer.net>
|
||||
Date: Wed, 2 Apr 2025 02:45:27 +0200
|
||||
Subject: [PATCH] wifi: mt76: mt7915: mcu: re-init MCU before loading FW patch
|
||||
|
||||
Restart the MCU and release the patch semaphore before loading the MCU
|
||||
patch firmware from the host.
|
||||
|
||||
This fixes failures upon error recovery in case the semaphore was
|
||||
previously taken and never released by the host.
|
||||
|
||||
This happens from time to time upon triggering a full-chip error
|
||||
recovery. Under this circumstance, the hardware restart fails and the
|
||||
radio is rendered inoperational.
|
||||
|
||||
Signed-off-by: David Bauer <mail@david-bauer.net>
|
||||
Link: https://patch.msgid.link/20250402004528.1036715-3-mail@david-bauer.net
|
||||
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
---
|
||||
mt7915/mcu.c | 25 +++++++++++++++----------
|
||||
1 file changed, 15 insertions(+), 10 deletions(-)
|
||||
|
||||
--- a/mt7915/mcu.c
|
||||
+++ b/mt7915/mcu.c
|
||||
@@ -2097,16 +2097,21 @@ static int mt7915_load_firmware(struct m
|
||||
{
|
||||
int ret;
|
||||
|
||||
- /* make sure fw is download state */
|
||||
- if (mt7915_firmware_state(dev, false)) {
|
||||
- /* restart firmware once */
|
||||
- mt76_connac_mcu_restart(&dev->mt76);
|
||||
- ret = mt7915_firmware_state(dev, false);
|
||||
- if (ret) {
|
||||
- dev_err(dev->mt76.dev,
|
||||
- "Firmware is not ready for download\n");
|
||||
- return ret;
|
||||
- }
|
||||
+ /* Release Semaphore if taken by previous failed attempt */
|
||||
+ ret = mt76_connac_mcu_patch_sem_ctrl(&dev->mt76, false);
|
||||
+ if (ret != PATCH_REL_SEM_SUCCESS) {
|
||||
+ dev_err(dev->mt76.dev, "Could not release semaphore\n");
|
||||
+ /* Continue anyways */
|
||||
+ }
|
||||
+
|
||||
+ /* Always restart MCU firmware */
|
||||
+ mt76_connac_mcu_restart(&dev->mt76);
|
||||
+
|
||||
+ /* Check if MCU is ready */
|
||||
+ ret = mt7915_firmware_state(dev, false);
|
||||
+ if (ret) {
|
||||
+ dev_err(dev->mt76.dev, "Firmware did not enter download state\n");
|
||||
+ return ret;
|
||||
}
|
||||
|
||||
ret = mt76_connac2_load_patch(&dev->mt76, fw_name_var(dev, ROM_PATCH));
|
||||
@@ -8,7 +8,7 @@ as adding/removing interfaces.
|
||||
|
||||
--- a/hostapd/config_file.c
|
||||
+++ b/hostapd/config_file.c
|
||||
@@ -5207,7 +5207,12 @@ struct hostapd_config * hostapd_config_r
|
||||
@@ -5207,7 +5207,14 @@ struct hostapd_config * hostapd_config_r
|
||||
int errors = 0;
|
||||
size_t i;
|
||||
|
||||
@@ -19,6 +19,8 @@ as adding/removing interfaces.
|
||||
+ } else {
|
||||
+ f = fopen(fname, "r");
|
||||
+ }
|
||||
+ wpa_printf(MSG_INFO, "Configuration file: Reading configuration file '%s'",
|
||||
+ fname);
|
||||
if (f == NULL) {
|
||||
wpa_printf(MSG_ERROR, "Could not open configuration file '%s' "
|
||||
"for reading.", fname);
|
||||
@@ -39,3 +41,35 @@ as adding/removing interfaces.
|
||||
if (f == NULL) {
|
||||
wpa_printf(MSG_ERROR, "Failed to open config file '%s', "
|
||||
"error: %s", name, strerror(errno));
|
||||
--- a/hostapd/main.c
|
||||
+++ b/hostapd/main.c
|
||||
@@ -406,7 +406,11 @@ hostapd_interface_init(struct hapd_inter
|
||||
struct hostapd_iface *iface;
|
||||
int k;
|
||||
|
||||
- wpa_printf(MSG_DEBUG, "Configuration file: %s", config_fname);
|
||||
+ if (!strncmp(config_fname, "data:", 5)) {
|
||||
+ wpa_printf(MSG_DEBUG, "Configuration file: %s", "<inline>");
|
||||
+ } else {
|
||||
+ wpa_printf(MSG_DEBUG, "Configuration file: %s", config_fname);
|
||||
+ }
|
||||
iface = hostapd_init(interfaces, config_fname);
|
||||
if (!iface)
|
||||
return NULL;
|
||||
--- a/src/ap/hostapd.c
|
||||
+++ b/src/ap/hostapd.c
|
||||
@@ -2893,7 +2893,12 @@ hostapd_interface_init_bss(struct hapd_i
|
||||
}
|
||||
}
|
||||
|
||||
- wpa_printf(MSG_INFO, "Configuration file: %s (phy %s)%s",
|
||||
- config_fname, phy, iface ? "" : " --> new PHY");
|
||||
+ if (!strncmp(config_fname, "data:", 5)) {
|
||||
+ wpa_printf(MSG_INFO, "Configuration file: %s (phy %s)%s",
|
||||
+ "<inline>", phy, iface ? "" : " --> new PHY");
|
||||
+ } else {
|
||||
+ wpa_printf(MSG_INFO, "Configuration file: %s (phy %s)%s",
|
||||
+ config_fname, phy, iface ? "" : " --> new PHY");
|
||||
+ }
|
||||
if (iface) {
|
||||
struct hostapd_config *conf;
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
From: Felix Fietkau <nbd@nbd.name>
|
||||
Date: Sat, 9 Aug 2025 15:55:11 +0200
|
||||
Subject: [PATCH] ucode: adjust for new ext resource type
|
||||
|
||||
ucv_resource_dataptr always returns null for resources with embedded data.
|
||||
|
||||
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
---
|
||||
|
||||
--- a/ucode.c
|
||||
+++ b/ucode.c
|
||||
@@ -449,7 +449,7 @@ rpc_ucode_script_call(struct ubus_contex
|
||||
res = uc_vm_stack_pop(&script->vm);
|
||||
|
||||
/* The handler function invoked a nested aync ubus request and returned it */
|
||||
- if (ucv_resource_dataptr(res, "ubus.deferred")) {
|
||||
+ if (ucv_resource_data(res, "ubus.deferred")) {
|
||||
/* Install guard timer in case the reply callback is never called */
|
||||
callctx->timeout.cb = rpc_ucode_request_timeout;
|
||||
uloop_timeout_set(&callctx->timeout, request_timeout);
|
||||
@@ -395,18 +395,25 @@
|
||||
compatible = "gpio-leds";
|
||||
|
||||
led-0 {
|
||||
gpios = <&ath9k 0 GPIO_ACTIVE_LOW>;
|
||||
color = <LED_COLOR_ID_GREEN>;
|
||||
function = LED_FUNCTION_WLAN_5GHZ;
|
||||
linux,default-trigger = "phy0tpt";
|
||||
};
|
||||
|
||||
led-1 {
|
||||
gpios = <&ath9k 1 GPIO_ACTIVE_LOW>;
|
||||
color = <LED_COLOR_ID_GREEN>;
|
||||
function = LED_FUNCTION_WPS;
|
||||
};
|
||||
|
||||
system_green: led-1 {
|
||||
system_green: led-2 {
|
||||
gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
|
||||
color = <LED_COLOR_ID_GREEN>;
|
||||
function = LED_FUNCTION_STATUS;
|
||||
};
|
||||
|
||||
led-2 {
|
||||
led-3 {
|
||||
gpios = <&gpio0 3 GPIO_ACTIVE_LOW>;
|
||||
color = <LED_COLOR_ID_GREEN>;
|
||||
function = LED_FUNCTION_USB;
|
||||
@@ -415,7 +422,7 @@
|
||||
trigger-sources = <&hub_port1>;
|
||||
};
|
||||
|
||||
led-3 {
|
||||
led-4 {
|
||||
gpios = <&gpio0 4 GPIO_ACTIVE_LOW>;
|
||||
color = <LED_COLOR_ID_GREEN>;
|
||||
function = LED_FUNCTION_USB;
|
||||
|
||||
Reference in New Issue
Block a user