Just did a sysupgrade to 21.02 from 19.07.8 and started config from scratch. Can confirm that a Galaxy S10 loses internet connectivity after a certain period of time. Have reverted back to 19.08 for now in the hope it will get fixed. If not, will have to consider downgrading my WRT3200 to router/firewall only.
noooo.. bummer
I was hoping it would get ironed out, but alas; looks like I'll be on Davidc502's last build for a while longer
I keep checking back periodically to see if there has been a fix.. I'm not a developer or anything, but it would seem possible since it worked on the swconfig builds (DSA shouldn't be the reason but I've had issues with all of the newer builds and kind of gave up)
Can confirm - 21.02 fails on my WRT3200ACM, just like master does.
I specifically used the firmware built by the OpenWrt team, downloaded using the firmware selector, just in case my compiling from scratch approach was causing the issue.
Same issue with iPhone - connected to WiFi, but no traffic flows. Can’t even access OpenWrt web UI.
Might be time for me to switch over to my R7800.
I have the same problem with WRT1200AC, all workarounds posted here don't work. I had to revert to 19.07.
The problem is only on iPhones and with Samsung S20, all other devices seem to work just fine.
9+ days uptime on WRT1900ACS and wifi is normal. I did a fresh install of 21.02, config from scratch. FWIW I have the following packages: wireguard, vpr, sqm, adblock, and irqbalance (change 'enabled' from '0' to '1' in '/etc/config/irqbalance'.
I also added in luci > startup > local startup the following commands:
echo "0" >> /sys/kernel/debug/ieee80211/phy0/mwlwifi/tx_amsdu
echo "0" >> /sys/kernel/debug/ieee80211/phy1/mwlwifi/tx_amsdu
What wifi devices are connecting to the router?
iPhones/iPads, Roku, Sonos, a few windows devices.
WiFi devices in my network:
- Sony Xperia XZ2 Smartphone (Chip: Don't know the builtin WiFi chip)
- Lenovo ThinkPad T460p running Windows 10 (Chip: Intel Dual Band Wireless-AC 8260)
All my other devices (Desktop PC, PS4, Smart-TV) in my network are connected via LAN cable. No issues here.
After enabling WiFi on the router the devices can successfully connect for a few minutes. Then they loses the connection. A side effect is that the WebUI from OpenWrt isn't longer accessible.
No issue with these WiFi devices on 19.07.
Is there way to support the OpenWrt developer with this issue? Testing bugfixes as example? Currently I don't revert back to 19.07.
Some question here, about the timeout issue:
[ 394.811935] ieee80211 phy0: cmd 0x9122=UpdateEncryption timed out
[ 394.818059] ieee80211 phy0: return code: 0x1122
[ 394.822617] ieee80211 phy0: timeout: 0x1122
WiFi stops working at the above Kernel messages. Here I have a newbie question about the WiFi driver. The first message is printed at this lines in the driver:
static int pcie_wait_complete(struct mwl_priv *priv, unsigned short cmd)
{
unsigned int curr_iteration = MAX_WAIT_FW_COMPLETE_ITERATIONS;
unsigned short int_code = 0;
do {
int_code = le16_to_cpu(*((__le16 *)&priv->pcmd_buf[0]));
usleep_range(1000, 2000);
} while ((int_code != cmd) && (--curr_iteration) && !priv->rmmod);
if (curr_iteration == 0) {
wiphy_err(priv->hw->wiphy, "cmd 0x%04x=%s timed out\n",
cmd, mwl_fwcmd_get_cmd_string(cmd));
wiphy_err(priv->hw->wiphy, "return code: 0x%04x\n", int_code);
return -EIO;
}
if (priv->chip_type != MWL8997)
usleep_range(3000, 5000);
return 0;
}
I don't understand, why there is a query for the command itself, not the result code form the WiFi chip and in the posted second line the FW command will be printed. IMHO this isn't the correct result code. It's the executed command itself.
Here are some result code defined in the driver:
/* Define general result code for each command */
#define HOSTCMD_RESULT_OK 0x0000
/* General error */
#define HOSTCMD_RESULT_ERROR 0x0001
/* Command is not valid */
#define HOSTCMD_RESULT_NOT_SUPPORT 0x0002
/* Command is pending (will be processed) */
#define HOSTCMD_RESULT_PENDING 0x0003
/* System is busy (command ignored) */
#define HOSTCMD_RESULT_BUSY 0x0004
/* Data buffer is not big enough */
#define HOSTCMD_RESULT_PARTIAL_DATA 0x0005
I will change the code and add a IMHO "correct" (print the command results) command wait routine for this issue and print the real response (result) code from the chip.
EDIT:
Or shortened: Why doesn't check the driver the result code, when a command is send via PCIE?
Have I misunderstood something in the driver, or read over something?
My modification works.
Please can somebody test/verify my modification too?
EDIT:
WiFi works now for me on WRT32-X. Without the lose of the connection.
I'm building 21.02.0 with your commit as the mwlwifi package. Let's see how it goes on my WRT32X.
Most eyeballs probably to be had by a submitting PR upstream.
Completely agree. @krjdev please consider submitting a PR.
Yes. But I think it's better a few people can verify the patch. It works for me, but not sure if it fixes the other users issues.
I also didn't test WPA3 at this time.
It was only a test for getting the correct result. A side effect is, that it fixes the WiFi issue fro me, which was also on WPA2 present on my WRT-32X.
This is actually the point. More people will get to see and try this patch if it pops up as a PR.
Okay, agreed.
But there is still an other issue in the driver:
[ 1270.545296] ------------[ cut here ]------------
[ 1270.549972] WARNING: CPU: 0 PID: 19 at target-arm_cortex-a9+vfpv3-d16_musl_eabi/linux-mvebu_cortexa9/mwlwifi-2021-09-15-4adce307/mac80211.c:841 mwl_mac80211_ampdu_action+0x354/0x3d8 [mwlwifi]
[ 1270.567095] Modules linked in: pppoe ppp_async iptable_nat xt_state xt_nat xt_conntrack xt_REDIRECT xt_MASQUERADE xt_FLOWOFFLOAD pppox ppp_generic nf_nat nf_flow_table_hw nf_flow_table nf_conntrack ipt_REJECT xt_time xt_tcpudp xt_multiport xt_mark xt_mac xt_limit xt_comment xt_TCPMSS xt_LOG slhc rfcomm nf_reject_ipv4 nf_log_ipv4 nf_defrag_ipv6 nf_defrag_ipv4 mwifiex_sdio mwifiex iptable_mangle iptable_filter ip_tables hidp hci_uart crc_ccitt btusb btmrvl_sdio btmrvl btintel bnep bluetooth hid evdev input_core mwlwifi mac80211 cfg80211 compat nf_log_ipv6 nf_log_common ip6table_mangle ip6table_filter ip6_tables ip6t_REJECT x_tables nf_reject_ipv6 ecdh_generic ecc sha256_generic libsha256 seqiv jitterentropy_rng drbg kpp hmac ghash_generic ghash_arm_ce gf128mul gcm ecb ctr cmac ccm gpio_button_hotplug
[ 1270.638183] CPU: 0 PID: 19 Comm: kworker/u4:1 Not tainted 5.4.143 #0
[ 1270.644563] Hardware name: Marvell Armada 380/385 (Device Tree)
[ 1270.650566] Workqueue: phy1 ieee80211_ba_session_work [mac80211]
[ 1270.656609] [<c010eeac>] (unwind_backtrace) from [<c010b018>] (show_stack+0x10/0x14)
[ 1270.664391] [<c010b018>] (show_stack) from [<c0730624>] (dump_stack+0x94/0xa8)
[ 1270.671650] [<c0730624>] (dump_stack) from [<c01278c0>] (__warn+0xbc/0xd8)
[ 1270.678556] [<c01278c0>] (__warn) from [<c012792c>] (warn_slowpath_fmt+0x50/0x94)
[ 1270.686082] [<c012792c>] (warn_slowpath_fmt) from [<bf1c5bac>] (mwl_mac80211_ampdu_action+0x354/0x3d8 [mwlwifi])
[ 1270.696341] [<bf1c5bac>] (mwl_mac80211_ampdu_action [mwlwifi]) from [<bf13e77c>] (ieee80211_request_smps_mgd_work+0x380/0x3d0 [mac80211])
[ 1270.708791] [<bf13e77c>] (ieee80211_request_smps_mgd_work [mac80211]) from [<bf13e0b0>] (ieee80211_ba_session_work+0x2b4/0x2b8 [mac80211])
[ 1270.721308] [<bf13e0b0>] (ieee80211_ba_session_work [mac80211]) from [<c013f8b8>] (process_one_work+0x218/0x470)
[ 1270.731529] [<c013f8b8>] (process_one_work) from [<c013fb54>] (worker_thread+0x44/0x5dc)
[ 1270.739657] [<c013fb54>] (worker_thread) from [<c01452ec>] (kthread+0x14c/0x150)
[ 1270.747086] [<c01452ec>] (kthread) from [<c01010e8>] (ret_from_fork+0x14/0x2c)
[ 1270.754339] Exception stack(0xdf4f5fb0 to 0xdf4f5ff8)
[ 1270.759412] 5fa0: 00000000 00000000 00000000 00000000
[ 1270.767624] 5fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 1270.775837] 5fe0: 00000000 00000000 00000000 00000000 00000013 00000000
[ 1270.782492] ---[ end trace b8a7957484f675e5 ]---
...but WiFi still works on my router.
EDIT
Also the LuCI WebUI issue seems to be fixed for me.
EDIT
My current working wireless settings:
onfig wifi-device 'radio0'
option type 'mac80211'
option channel '36'
option hwmode '11a'
option path 'soc/soc:pcie/pci0000:00/0000:00:01.0/0000:01:00.0'
option htmode 'VHT80'
option disabled '0'
option cell_density '0'
option country 'AT'
config wifi-iface 'default_radio0'
option device 'radio0'
option network 'lan'
option mode 'ap'
option macaddr '60:38:e0:c2:bd:32'
option ssid 'XXXXXXXXX'
option key 'XXXXXXXXX'
option encryption 'sae-mixed'
option ieee80211w '1'
config wifi-device 'radio1'
option type 'mac80211'
option channel '11'
option hwmode '11g'
option path 'soc/soc:pcie/pci0000:00/0000:00:02.0/0000:02:00.0'
option htmode 'HT20'
option disabled '0'
option cell_density '0'
option country 'AT'
config wifi-iface 'default_radio1'
option device 'radio1'
option network 'lan'
option mode 'ap'
option macaddr '60:38:e0:c2:bd:31'
option ssid 'XXXXXXXXX'
option key 'XXXXXXXXX'
option encryption 'sae-mixed'
option ieee80211w '1'
config wifi-device 'radio2'
option type 'mac80211'
option channel '34'
option hwmode '11a'
option path 'platform/soc/soc:internal-regs/f10d8000.sdhci/mmc_host/mmc0/mmc0:0001/mmc0:0001:1'
option htmode 'VHT80'
option disabled '1'
option cell_density '0'
option country 'AT'
config wifi-iface 'default_radio2'
option device 'radio2'
option network 'lan'
option mode 'ap'
option ssid 'XXXXXXXXX'
option encryption 'psk2'
option key 'XXXXXXXXX'
How does one build this potential fix into an OpenWrt image? I presume there's some kind of patch file we need to add so that it's applied when the mwlwifi source code is downloaded during the build process?
Actually, all you need to do is to change the repository and commit hash on the makefile of the mwlwifi package. Here is my commit for example:
I had to delete a patch which was already implemented with newer commits on mwlwifi.