Troubles with disabling WLan powersave mode

Hello together,

for different reasons I need to disable the WLAN powersave mode on Jeton TX2.
Therefore I found this command

iw dev wlan0 set power_save off

The command itself seems to do the job, but I cannot make it turning off powersave mode automatically.
I tried to autorun it at startup using cron, unfortunately it does not do the job.
Any recommendation on how to turn of power saving automatically?
Turning it of manually is not a really good solution, because the system should run automatically.
A solution to turn powersave mode off permanently would also be fine.

Yours sincerely,
Simon

lil_scorpion_,

Sorry for late reply. If you could build the kernel image, below patch should work.

--- a/drivers/net/wireless/bcmdhd/dhd_linux.c
+++ b/drivers/net/wireless/bcmdhd/dhd_linux.c
@@ -6155,6 +6155,7 @@ dhd_preinit_ioctls(dhd_pub_t *dhd)
 #endif
        }

+       dhd_slpauto_config(dhd, 0);
        DHD_ERROR(("Firmware up: op_mode=0x%04x, MAC="MACDBG"\n",
                dhd->op_mode, MAC2STRDBG(dhd->mac.octet)));
        /* Set Country code  */

Hi, @WayneWWW could you please elaborate on this? Because I didn’t understand which file I should modify.
Thanks a lot in advance!