As of right now I am using v18.06.2 with a self compiled image from image builder. So I guess it doesn't have much debugging enabled in kernel config.
That said, I am going to build another image based on v18.06.2 from source after enabling the above options. That should provide more info on whats going on. Also I wanted to provide more logs but the post gets really big so next time I'll probably use pastebin.
As I am running v18.06.2 your patches dont work with it so I think whatever is going on, it's with driver code. I was also able to find the source of management_frame
error and it was linking to Frame.c file somewhere in the driver build directory. I did so through gdb after loading symbols from mtlk.o file there.
Yeah I understand but I also tried to use progmodels from the above link. Mine have a Rev38 in them and contain A_nCB too so basically 5ghz.
I am not really sure that country flag is important at the moment becasue I think I am able to turn it on without it and I think you can use any country you want for now because we are testing so I am using US but I am not myself in the US anyway. Also I cant change txpower so it wont matter what country I use it doesnt go beyond 29 dBm anyway. As it is 5ghz I can use 36-165 channels if I use US (look here).
Yeah I understand that completely, if I was able to translate the C language to my brain I would definitely help but I dont know anything about it also I learned C++ (a bit) and C# on my own and I am terrible with shifting operators. That being said I am hoping @vittorio88 and @Mandrake-Lee can join you in development soon. They were working on the last wave300 driver and got it work somewhat so maybe they can help you with this one.
Good luck though.
Edit: I am not able to use channel 36 though I can use channel 40. even with US as country. So if you take a look at the above website in 5ghz channels list. I can use every 2nd channel (40,48,56,etc) but I am not able to use 140,149 and after that it's same as above 2nd channel thing. So I think it does depend on the country I guess (learning stuff every day I presume).
Edit2: Your theory was spot on, I think my phone only sees 5ghz wifi on some specific channles like 153,161 etc and it shows no wifi among lower channels 36,40 etc. I was able to choose different channels on wave300 and on some of them it doesnt crash if I scan from HH5A but starting from 153 the wave300 crashes. I think there's still something buggy related to channel configuration but it should be working among lower channels.
Edit3: If HH5A is on the same channel as WAVE300 then it also crashes with the following log while the router was booting up:
[ 51.324052] [4294718488] mtlk0(mtlk_mbss_send_vap_activate:3152): CID-0000: Entering mtlk_mbss_send_vap_activate
[ 51.334255] [4294718500] mtlk0(mtlk_mbss_send_vap_activate:3159): CID-0000: Start activation
[ 51.342831] [4294718508] mtlk0(__mtlk_dump:69): dump of UMI_ACTIVATE_VAP:
[ 51.345595] [4294718512] mtlk3(handle_rx_ind:1066): CID-0000: msdulen > nbuf size ->> 208 > 0
[ 51.345678] CPU 0 Unable to handle kernel paging request at virtual address 00000014, epc == 80311a8c, ra == 80311b60
[ 51.345687] Oops[#1]:
[ 51.345704] CPU: 0 PID: 3215 Comm: luci Not tainted 4.9.152 #0
[ 51.345715] task: 83ac2f00 task.stack: 82458000
[ 51.345737] $ 0 : 00000000 00000001 00000001 00000001
[ 51.345757] $ 4 : 00000000 00000000 00000000 000004d9
[ 51.345778] $ 8 : 00000030 8020b6e0 0000000e 3038203e
[ 51.345799] $12 : 303a206d 0000002b 00000000 7364756c
[ 51.345820] $16 : 8272bce0 826de900 00000000 8272bd08
[ 51.345842] $20 : 8052f0a0 00010000 8380dee4 8269a3e4
[ 51.345862] $24 : 00000002 800de588
[ 51.345884] $28 : 82458000 8380de68 826de900 80311b60
[ 51.345889] Hi : 003d97a2
[ 51.345894] Lo : 4b800000
[ 51.345905] epc : 80311a8c 0x80311a8c
[ 51.345915] ra : 80311b60 0x80311b60
[ 51.345930] Status: 1100ff03 KERNEL EXL IE
[ 51.345937] Cause : 00800008 (ExcCode 02)
[ 51.345941] BadVA : 00000014
[ 51.345948] PrId : 00019556 (MIPS 34Kc)
[ 51.346209] Modules linked in: mtlk mtlkroot ath9k ath9k_common ath9k_hw ath pppoe nf_conntrack_ipv6 mac80211 iptable_nat ipt_REJECT ipt_MASQUERADE cfg80211 xt_time xt_tcpudp xt_tcpmss xt_statistic xt_state xt_recent xt_nat xt_multiport xt_mark xt_mac xt_limit xt_length xt_hl xt_helper xt_ecn xt_dscp xt_conntrack xt_connmark xt_connlimit xt_connbytes xt_comment xt_TCPMSS xt_REDIRECT xt_LOG xt_HL xt_DSCP xt_CT xt_CLASSIFY pppox ppp_async owl_loader nf_reject_ipv4 nf_nat_redirect nf_nat_masquerade_ipv4 nf_conntrack_ipv4 nf_nat_ipv4 nf_nat nf_log_ipv4 nf_defrag_ipv6 nf_defrag_ipv4 nf_conntrack_rtcache nf_conntrack_netlink ltq_deu_vr9 iptable_mangle iptable_filter ipt_ECN ip_tables crc_ccitt compat fuse sch_cake nf_conntrack act_skbedit act_mirred em_u32 cls_u32 cls_tcindex cls_flow cls_route cls_fw
[ 51.346410] sch_tbf sch_htb sch_hfsc sch_ingress drv_dsl_cpe_api ledtrig_usbport drv_mei_cpe xt_set ip_set_list_set ip_set_hash_netiface ip_set_hash_netport ip_set_hash_netnet ip_set_hash_net ip_set_hash_netportnet ip_set_hash_mac ip_set_hash_ipportnet ip_set_hash_ipportip ip_set_hash_ipport ip_set_hash_ipmark ip_set_hash_ip ip_set_bitmap_port ip_set_bitmap_ipmac ip_set_bitmap_ip ip_set nfnetlink ip6t_REJECT nf_reject_ipv6 nf_log_ipv6 nf_log_common ip6table_mangle ip6table_filter ip6_tables x_tables pppoatm ppp_generic slhc ifb tun ntfs br2684 atm drv_ifxos usb_storage dwc2 uhci_hcd ohci_platform ohci_hcd ehci_platform sd_mod scsi_mod ehci_hcd gpio_button_hotplug ext4 jbd2 mbcache crc32c_generic
Process luci (pid: 3215, threadinfo=82458000, task=83ac2f00, tls=77fdddc0)
[ 51.346460] Stack : 00000000 8000c4ec 0000000b ecb64f30 826de900 826de900 0000007f 00010000
[ 51.346497] 826f8ff0 8052f0a0 817401bc 80311b60 8052f0a0 817401bc 8380dee4 8269a3e4
[ 51.346532] 8269a010 8168ab44 8108ec94 8108ec80 7fffffff 8269a010 00000000 0000001e
[ 51.346566] 00000000 00000001 806841e0 00000001 00000000 826de918 017f000d 82493510
[ 51.346600] 826de900 000000d0 0c443240 8272bce0 00000000 00000003 82ddbe7c 82ddbe78
[ 51.346607] ...
[ 51.346622] Call Trace:
[ 51.346623] [<8000c4ec>] 0x8000c4ec
[ 51.346700] [<80311b60>] 0x80311b60
[ 51.346749] [<8168ab44>] 0x8168ab44 [mtlk@81600000+0x16db30]
[ 51.346866] [<800335a0>] 0x800335a0
[ 51.346876] [<800de588>] 0x800de588
[ 51.346903] [<8007366c>] 0x8007366c
[ 51.346931] [<80032b14>] 0x80032b14
[ 51.347020] [<80032ef4>] 0x80032ef4
[ 51.347030] [<8000307c>] 0x8000307c
[ 51.347040] [<80032ef4>] 0x80032ef4
[ 51.347067] [<8000a9e8>] 0x8000a9e8
[ 51.347088]
[ 51.347140] Code: 1000ffe8 00000000 8e640000 <8c820014> 30430001 10600002 00000000 2444ffff 8e82000c
[ 51.347142]
[ 51.347151] ---[ end trace a6dff1cbc83035b6 ]---
[ 51.361528] Kernel panic - not syncing: Fatal exception in interrupt
[ 51.704678] Rebooting in 3 seconds..
I am still using the old firmware, havent flashed the new one yet.
Edit4: It's ProgModel_38_RevA files with A_nCB.
ProgModel_A_CB_38_RevA_wave300.bin
ProgModel_A_CB_wave300.bin
ProgModel_A_nCB_38_RevA.bin
ProgModel_A_nCB_38_RevA_wave300.bin
ProgModel_A_nCB_wave300.bin