Morse driver ignoring TX power changes

Hi there,

With EU HalowLink2 hardware (MM8108), version 2.11.8 (kernel 5.15.189, openwrt 23.05.6).

Trying to reduce the TX power on the wlan0 interface (in Access Point configuration) takes no effect. Both LUCI and iw dev wlan0 info report 15dBm at all times. OpenWRT successfully stores the desired configuration level and it survives reboots too but it never takes effect at the driver level.

Attempting iw dev wlan0 set txpower fixed 900 takes no effect either. It appears that the Morse driver completely ignores all attempts to reduce the TX power.

Any ideas? Thanks in advance!

(Is there a better avenue for reporting bugs like this that I should be using instead? Especially since there are regulatory considerations here.)

This forum is your best place for reporting these sorts of issues!

Though, we can’t seem to reproduce it on 2.11.8. See below

root@halowlink2-b133:~# iw dev wlan0 info
Interface wlan0
        ...
        channel 36 (5180 MHz), width: 40 MHz, center1: 5190 MHz
        txpower 16.00 dBm
root@halowlink2-b133:~# iw dev wlan0 set txpower fixed 900
root@halowlink2-b133:~# iw dev wlan0 info
Interface wlan0
        ..
        channel 36 (5180 MHz), width: 40 MHz, center1: 5190 MHz
        txpower 9.00 dBm
root@halowlink2-b133:~#

iwinfo is also reporting correctly (no associated stations):

wlan0     ESSID: "halowlink2-b133"
          Access Point: ..
          Mode: Master  Channel: 6 (866.000 MHz)  HT Mode: HT20
          Center Channel 1: 6 2: unknown
          Tx-Power: 9 dBm  Link Quality: unknown/70
          Signal: unknown  Noise: unknown
          Bit Rate: unknown
          Encryption: WPA3 SAE (CCMP)
          Type: dot11ah  HW Mode(s): 802.11ah
          Hardware: 325B:0809 0000:0000 [Morse Micro MM8108-B2]
          TX power offset: none
          Frequency offset: none
          Supports VAPs: yes  PHY name: phy2

Is there any further information you can share?

That’s odd, I can still reproduce this after a factory reset (only since the reset it’s now 16 instead of 15 apparently):

root@halowlink2-f5d7:~# iw dev wlan0 info
Interface wlan0
	ifindex 10
	wdev 0x100000002
	addr ...
	ssid ...
	type AP
	wiphy 1
	channel 132 (5660 MHz), width: 20 MHz, center1: 5660 MHz
	txpower 16.00 dBm
root@halowlink2-f5d7:~# iw dev wlan0 set txpower fixed 900
root@halowlink2-f5d7:~# iw dev wlan0 info
Interface wlan0
	ifindex 10
	wdev 0x100000002
	addr ...
	ssid ...
	type AP
	wiphy 1
	channel 132 (5660 MHz), width: 20 MHz, center1: 5660 MHz
	txpower 16.00 dBm

And:

wlan0     ...
          Mode: Master  Channel: 1 (863.500 MHz)  HT Mode: unknown
          Center Channel 1: 1 2: unknown
          Tx-Power: 16 dBm  Link Quality: 70/70
          Signal: -1 dBm  Noise: -113 dBm
          Bit Rate: 4.5 MBit/s
          Encryption: WPA3 SAE (CCMP)
          Type: dot11ah  HW Mode(s): 802.11ah
          Hardware: 325B:0809 0000:0000 [Morse Micro MM8108-B2]
          TX power offset: none
          Frequency offset: none
          Supports VAPs: yes  PHY name: phy1

I’m happy to get any diagnostic information that would be useful if you can point me on where that would be.

Interesting. I tried it while my AP did not have any associated stations. I doubt that would make a difference but I’d be interested to at least rule out that having stations associated are somehow part of the problem.

Regarding debug, does dmesg or logread show anything after attempting to change the txpower?

It might be worth dumping the netlink command, and seeing if there is any underlying response. In a separate terminal do the following

opkg update
opkg install kmod-nlmon
ip link add nlmon0 type nlmon
ip link set nlmon0 up
tcpdump -i nlmon0 -vv -w /tmp/power.pcap

Let tcpdump run while you set the txpower in a different terminal window. Once done, kill the tcpdump command and share the output pcap here :slight_smile:

I did have an STA connected at the time, but I have tried turning off the STA and repeating the change and it does indeed make no difference.

dmesgand logread do not show any log lines coinciding with the TX power change, nope.

Attached. As best as I can tell, the power level in the request is right, and the follow-up response is successful.

power.pcap.zip (2.1 KB)

Alas the power level remains unchanged.

Could it be specific to regulatory information for the EU bands?

My apologies, can you try this again but use debug_mask=0xf as a module parameter when you insert the morse driver module.

The netlink commands definitely look like they succeeded. And no, I don’t believe this is specific to the regulatory - I tested in an EU band as well, with the same hardware and software. A bit baffling..

I’m going to need some help here on the right way to do this. The rmmod and insmod approach is short-lived as any attempt to do anything with the interface seems to result in the module being reloaded out from underneath me. I tried using uci add system module to force /etc/modules.d/morse to contain the flag but that doesn’t work either. Using /etc/modules.conf.d/morse.conf is ignored.

That said, on one single attempt at messing about with rmmod and insmod, I had some brief success. I managed to get the driver loaded and set the TX power using iw:

[  476.448131] morse_sdio mmc0:0001:2: Morse Driver Version: 0-rel_1_17_4_2025_Dec_04, Morse FW Version: rel_1_17_4_2025_Dec_04
[  476.461394] morse_sdio mmc0:0001:2: Slow clock source selection mode set to: Auto
[  476.471555] morse_sdio mmc0:0001:2: TWT responder mode is enabled
[  476.477762] morse_sdio mmc0:0001:2: morse_mac_ops_add_interface: [id:0 ap]
[  476.503418] morse_sdio mmc0:0001:2: morse_mac_set_txpower: 1600 -> 800 mBm

I then modified the interface from LuCI and tried to reduce the power even further, but suddenly it jumped back up to 16dBm, this time by morse_cmd_vendor_set_channel:

[  480.970610] morse_sdio mmc0:0001:2: morse_cmd_vendor_set_channel: f:863500000 o:1 p:1 i:0 power:1600 mBm

Following that, all attempts to change the TX power again using either LuCI or iw now don’t take effect, and no further log lines appear in dmesg when attempting to do so.

Any follow-up attempts to do this, even with the same steps, now don’t appear to work, even after a reboot.

For some reason I forgot you were using OpenWrt, despite answering an OpenWrt specific question above
Add option debug_mask '0xf' to the wifi-device section of type morse and then run reload_config after saving the file. That should insert the module with the correct parameters.

Thanks for this. I decided to reboot just to see what was happening at startup that was resulting in it ignoring my setting. You can see that it starts off setting to 9dBm and then, like above, the morse_cmd_vendor_set_channel comes along and sets it back to 16dBm:

[   34.275415] morse_sdio mmc0:0001:2: Morse Driver Version: 0-rel_1_17_4_2025_Dec_04, Morse FW Version: rel_1_17_4_2025_Dec_04
[   34.288241] morse_sdio mmc0:0001:2: Slow clock source selection mode set to: Auto
[   34.297729] morse_sdio mmc0:0001:2: TWT responder mode is enabled
[   34.303830] morse_sdio mmc0:0001:2: morse_mac_ops_add_interface: [id:0 ap]
[   34.325133] morse_sdio mmc0:0001:2: morse_mac_set_txpower: 1600 -> 900 mBm
[   34.340431] morse_sdio mmc0:0001:2: hw scan: start
[   34.345255] morse_sdio mmc0:0001:2: scheduled scan: N/A
[   35.181223] morse_sdio mmc0:0001:2: hw scan: complete
[   35.290614] morse_sdio mmc0:0001:2: hw scan: start
[   35.295501] morse_sdio mmc0:0001:2: scheduled scan: N/A
[   36.131151] morse_sdio mmc0:0001:2: hw scan: complete
[   36.188779] morse_sdio mmc0:0001:2: hw scan: start
[   36.193650] morse_sdio mmc0:0001:2: scheduled scan: N/A
[   37.029221] morse_sdio mmc0:0001:2: hw scan: complete
[   37.098557] morse_sdio mmc0:0001:2: hw scan: start
[   37.103442] morse_sdio mmc0:0001:2: scheduled scan: N/A
[   37.939001] morse_sdio mmc0:0001:2: hw scan: complete
[   37.998446] morse_sdio mmc0:0001:2: hw scan: start
[   38.003292] morse_sdio mmc0:0001:2: scheduled scan: N/A
[   38.838874] morse_sdio mmc0:0001:2: hw scan: complete
[   38.900616] morse_sdio mmc0:0001:2: morse_cmd_vendor_set_channel: f:866500000 o:1 p:1 i:0 power:1600 mBm
[   39.109777] morse_sdio mmc0:0001:2: BSS Changed beacon data, reset flag=0, csa_active=0 ecsa_chan_configured=0
[   39.120773] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready

Now if I try to change via iw, I see several lines like:

[  153.354458] morse_sdio mmc0:0001:2: BSS Changed beacon data, reset flag=0, csa_active=0 ecsa_chan_configured=0

… but nothing else, no morse_mac_set_txpower or morse_cmd_vendor_set_channel lines are logged.

So the morse_cmd_vendor_set_channel should just be indicating the maximum power for the configured channel, and any power change should be indicated by the morse_mac_set_txpower which you are only seeing once - as it is skipped when the txpower is already set to the provided value.

So what I’m seeing from this log is that the power should be 9dBm, as subsequent calls aren’t triggering additional morse_mac_set_txpower lines. What happens if you try to set the power to 800?
Where I’m a little confused now is why iw is still reporting the 16dBm :thinking:

So at the moment LuCi is configured with 9dBm, and so at startup it logs:

[   31.576971] morse_sdio mmc0:0001:2: morse_mac_set_txpower: 1600 -> 900 mBm
... some seconds later:
[   36.164583] morse_sdio mmc0:0001:2: morse_cmd_vendor_set_channel: f:867500000 o:1 p:1 i:0 power:900 mBm
[   36.177145] morse_sdio mmc0:0001:2: morse_mac_set_txpower: 900 -> 1600 mBm

Then repeat attempts to set to 900 using iw fail and do not log anything. Switching to 800 using iw succeeds and that is also confirmed by getting info from iw, and then switching from 800 to 900 in the same way succeeds and is also confirmed by iw:

[ 3947.741286] morse_sdio mmc0:0001:2: morse_mac_set_txpower: 1600 -> 800 mBm
[ 3951.282603] morse_sdio mmc0:0001:2: BSS Changed beacon data, reset flag=0, csa_active=0 ecsa_chan_configured=0
[ 3953.780845] morse_sdio mmc0:0001:2: morse_mac_set_txpower: 800 -> 900 mBm

… but if I change the value from LuCI instead of iw, to, say, 10dBm:

[ 4127.744711] morse_sdio mmc0:0001:2: morse_beacon_generate: ieee80211_beacon_get failed
[ 4127.752725] morse_sdio mmc0:0001:2: morse_beacon_tasklet: failed to generate the beacon, ret: -11
[ 4127.779252] morse_sdio mmc0:0001:2: Station disassociated xx:xx:xx:xx:xx:xx, aid=1
[ 4127.787307] morse_sdio mmc0:0001:2: BSS [vif_id:0 ap] beaconing stopped
[ 4127.803956] morse_sdio mmc0:0001:2: morse_mac_set_txpower: 900 -> 1600 mBm
[ 4128.829701] morse_sdio mmc0:0001:2: morse_mac_ops_remove_interface: [id:0 ap]

We then seem to go from the previous 9dBm back up to 16dBm again, instead of to the desired 10dBm.

After having tweaked LuCI settings a bit more to experiment with different channel widths, I now find myself unable to set via iw dev wlan0 set txpower fixed again. Last thing I see in the log is:

[ 8294.719829] morse_sdio mmc0:0001:2: morse_cmd_vendor_set_channel: f:867500000 o:1 p:1 i:0 power:1600 mBm

… but no other morse_mac_set_txpower calls, no matter what value I pass to iw.

Excuse the repeat question, but at this point what was iw actually reporting for the power, 16dBm?

This sounds good.

Can you share the exact commands for how you are doing this? Seems like it’s interpreting the value as something too large and is setting it to the regulatory limit.
Note that the txpower value in UCI is specified in dBm, not mBm as is used in iw.

:fearful:

Apologies I left that out, yes, at that point was reporting 16dBm.

By LuCI I mean the Web UI, so going into the Wireless tab and editing the interface transmit power there.

Sorry for the delay getting back to you here, using LuCI and UCI I can reproduce it. There may be a bug with the netifd script (i need to confirm as I was debugging) responsible for converting /etc/config/wireless into an appropriate iw dev call, and it looks like the AP bringup might be unsetting any configuration that is set to the net device prior to starting.

As you have shown as well, there is also something preventing you from setting the txpower to the same value iw had previously set, which is indicating to me that iw is somehow unaware of the intermediate call by (potentially) hostap.

For now, is it possible for you to leave the setting in LuCI to the default txpower, and use the command line to set the txpower after the AP is brought up? As this is functioning as expected.

I will get back to you with workarounds as soon as I can :slight_smile:

No problem at all, there’s no real urgency for me to get this working through LuCI, this is all just desk prototyping at this stage. That said I’d be happy to test out workarounds and firmware.