kaloz / mwlwifi

mac80211 driver for the Marvell 88W8864 802.11ac chip
395 stars 119 forks source link

Keep phy2 and radio2 with Linksys WRT 3200ACM European version on 160Mhz and DTS #280

Open p3x-robot opened 6 years ago

p3x-robot commented 6 years ago

Hello @yuhhaurlin !

How are you today?

This is something, I found and this is what is weird for me, given it is the latest LEDE 17.01.4 and your latest driver: Mar 6 19:37:11 192.168.78.1 digi.router hostapd: ACS: Only VHT20/40/80 is supported now

Ok, I found, I had to change the channel instead auto to 100 or 120 as sad in https://github.com/kaloz/mwlwifi/issues/226#issuecomment-338160144 by @BrainSlayer for Europe...

But, I still have a question. :1234:

My wifi /etc/config/wireless:

config wifi-device 'radio0'
    option type 'mac80211'
    option hwmode '11a'
    option path 'soc/soc:pcie-controller/pci0000:00/0000:00:01.0/0000:01:00.0'
    option channel 'auto'
    option country 'FR'
    option htmode 'VHT80'

config wifi-iface 'default_radio0'
    option device 'radio0'
    option network 'lan'
    option mode 'ap'
    option ssid 'patrikx3-digi'
    option encryption 'psk2+ccmp'
    option key '12345678'
    option wps_pushbutton '0'

config wifi-device 'radio1'
    option type 'mac80211'
    option hwmode '11g'
    option path 'soc/soc:pcie-controller/pci0000:00/0000:00:02.0/0000:02:00.0'
    option channel '1'
    option htmode 'HT20'
    option txpower '20'

config wifi-iface 'default_radio1'
    option device 'radio1'
    option network 'lan'
    option mode 'ap'
    option ssid 'patrikx3-digi-slow'
    option key '12345678'
    option encryption 'psk2+ccmp'
    option wps_pushbutton '1'

More info

For the next build I will wish to keep the phy2 (and the radio2 and because phy2 is fixed, I just fix it with the Europan router with this option in the radio2 and remove the option country from the radio0 and radio1:

config wifi-device 'radio1' or 'radio0'
    option country 'FR' # will remove this

Like this mwlwifi should let mwlwifi set it for you...

I found in the README.md that I can keep kmod-mwifiex-sdio and mwifiex-sdio-firmware, given I do not change the radio0, radio1 and because the phy2 is always US I could change to my router FR and it would work.

Do you have and idea what it could be or once phy2 is configured right, is it will work?

In one of your issue comment https://github.com/kaloz/mwlwifi/issues/185#issuecomment-363929704 you said, it might work with disable the option country for radio0 and radio1 and given radio2 is always US, I try to fix it with this option country 'FR' like:

config wifi-device 'radio2'
    option country 'FR'

What do you think master?

Thanks so much!

Patrik

p3x-robot commented 6 years ago

Ok, my bad, I guess @BrainSlayer is in Europe and once I selected the 160 Mhz channel 100, it all started working, and the increase on Android from 280 Mbit went to 400 MBit, awesome!!!

But besides, so do you think I can keep phy2 and radio2 if I disable the radio0 and radio1, so remove the option country 'FR' and only fix it in radio2 so it is fixed US and fix it with the option country 'FS'.

Is that correct?

Reference: https://github.com/kaloz/mwlwifi/issues/226#issuecomment-338160144

BrainSlayer commented 6 years ago

@p3x-robot yes i'm in europe. and 160 mhz works only with channel 100 upwards. for the region setting. it works gobally in cfg80211/mac80211. so you cannot use independend regions per radio as far as i know. but you can maybe mod the driver to hardcode a own region setting (except for mwlwifi, this one is fixed by the chipset)

p3x-robot commented 6 years ago

@BrainSlayer Yesh, it works, you already helped me in a reference in this issue.

My only question now if I can configure to keep the phy2 and radio2 by reconfigure the US country to FR, then I can keep the kmod-mwifiex-sdio and mwifiex-sdio-firmware without having to remove, with some tweaks that @yuhhaurlin said it might work without the remove packages. I think if I can work out the phy2 with radio2, I think it might be much closer to the mwlwifi original closed source driver.

Will test though after the full build is done.

Thanks so much!

Though, it would be cool, if @yuhhaurlin could understand my poor English what I am trying to achive (with this mixed up regions from Europe but still phy2 is fixed with US, but the wireless config could be overridden). I suppose and hope.

yuhhaurlin commented 6 years ago

This will be done later.

p3x-robot commented 6 years ago

Ok, the readme says either i keep the country (code 00 - unset) or remove mwifiex-sdio-firmware kmod-mwifiex-sdio, but the truth is it only works if I remove phy2 and remove mwifiex-sdio-firmware kmod-mwifiex-sdio and then set the country by hand for Europe France.

Than it works. So it either a problem with the chiip (fixed phy2 US, cannot override now way, I set it, luci, /etc/config/wireless), but it always US when i check iw reg get.

Besides need to remove the radio2 as well.

Only solutions is

opkg remove mwifiex-sdio-firmware kmod-mwifiex-sdio
# remove radio2 from /etc/config/network
# set the wifi wireless in LUCI to France and the it is cool

With the European version cannot set mwlwifi at all.

yuhhaurlin commented 6 years ago

The limitation will be removed later. The code will be modified as follows:

  1. Check if there is power table in DTS. If power table is existed, mwlwifi will load the power table to firmware.
  2. Due to firmware can check if region code and power table are programmed in EEPROM, it will reject the power setting from mwlwifi if EEPROM is programmed with region code and power table.
  3. Mapping region code to country code and rejecting setting of country code will be removed from mwlwifi.
  4. If user's setting is conflicted with region code and power table programmed in EEPROM, firmware won't let the setting work. In this way, it won't violate FCC rules and user has the flexibility to set country code.

This job will be done later.

p3x-robot commented 6 years ago

Hey @yuhhaurlin !

How are you?

So one more question, the phy2 I guess will be enabled. But what we will do with the radio2? Is it gonna be enabled (which is weird, because it is open and anyone can connect and works) so we remove the radio2 or disable or how is it going to go?

yuhhaurlin commented 6 years ago

I have no idea about phy2. I only take care of mwlwifi.

p3x-robot commented 6 years ago

Aha, so I still have to remove opkg remove mwifiex-sdio-firmware kmod-mwifiex-sdio, is that right? So is mwlwifi use the 3rd radio that is actually the radar, in my thinking?

yuhhaurlin commented 6 years ago

Phy2 is mwifiex which is another open source driver from Marvell. Mwlwifi is used for 88W8964 of WRT3200ACM (phy0 and phy1). You can use phy2, but I can't support it.

p3x-robot commented 6 years ago
  1. Hm, so given there is no support and is not needed, in the firmware, i actually can just remove totally mwifiex-sdio-firmware , kmod-mwifiex-sdio and freely remove the radio2 in the /etc/config/wireless and that's how it will works with mwlwifi and still mwlwifi will use that 3rd radio for radar detection but in the driver instead of the /etc/config/wireless ?

  2. Now in my understanding is that mwlwifi will do everything including the radar, MU-MIMO and DFS, so only mwlwifi is required for the 3200ACM (no phy2 and no radio2).

yuhhaurlin commented 6 years ago

Mwlwifi can do everything. Phy2 is used for some purposes, but I have no idea of that. I think what I need to do is let it can work with mwlwifi (running DFS).

BrainSlayer commented 6 years ago

@p3x-robot phy2 can be used as additional wifi interface. it has no influence to mwlwifi (phy0 / phy1)

p3x-robot commented 6 years ago

@BrainSlayer you mean remove the mwifiex-sdio-firmware kmod-mwifiex-sdio, but keep the 3rd wifi radio? or how do you complete it so that the DFS/DTS works?

eduperez commented 6 years ago

@BrainSlayer I am currently using phy2 as an "auxiliary channel"; I have both mwifiex-sdio-firmware and kmod-mwifiex-sdio installed. On the 5GHz band at phy0 I only use the DFS-free channels.

p3x-robot commented 6 years ago

@eduperez, you are not in the EU, right? In USA, that's why it works?

p3x-robot commented 6 years ago

@eduperez or using on the 5Ghz 80Mhz?

p3x-robot commented 6 years ago

@eduperez yes, i confirmed, that 80 Mhz works, while 160Mhz is not :)

eduperez commented 6 years ago

@p3x-robot In EU, 80MHz only.

p3x-robot commented 6 years ago

yes, so it is only non DTS frequencies. Got it. What is weird is that radio2 is like half slower than the normal.

p3x-robot commented 6 years ago

i guess until it is completed, 160 Mhz and DTS is not worth dealing with...

howl commented 6 years ago

@yuhhaurlin if what I manage to understand in your explanation about what are you going to do with the country setting being locked by mwlwifi to a permissive one, that will solve a dispute we had time ago about what should be done. If you do what you say letting mwlwifi to take country codes with same fcc rules like most of the european countries as for example FR, DE, ES... will be great.

howl commented 6 years ago

The limitation will be removed later. The code will be modified as follows:

Check if there is power table in DTS. If power table is existed, mwlwifi will load the power table to firmware.
Due to firmware can check if region code and power table are programmed in EEPROM, it will reject the power setting from mwlwifi if EEPROM is programmed with region code and power table.
Mapping region code to country code and rejecting setting of country code will be removed from mwlwifi.
If user's setting is conflicted with region code and power table programmed in EEPROM, firmware won't let the setting work. In this way, it won't violate FCC rules and user has the flexibility to set country code.

This job will be done later.

Hi @yuhhaurlin do you have an estimated date to make this change?

p3x-robot commented 6 years ago

@BrainSlayer @yuhhaurlin @eduperez i bought a Intel® Wireless-AC 9260 for my laptop. what is weird, on if i set up 160Mhz on Windows it works, but on Linux i can get like 1-2 Mbit, but once I set it to 80 Mhz, I get the speed cool like 700Mbit.

My question, is MU-MIMO is only 160Mhz or that is independent from MU-MIMU?

PS: I think maybe the Windows driver is already using not 160Mhz but 80Mhz otherwise it would be weird. How can with 160Mhz in Windows works and in Linux not, but once I am 80Mhz 5Ghz, it flies...

BrainSlayer commented 6 years ago

@p3x-robot no this is not related to mu-mimo in any way. the reason why 160 doesnt work in linux sounds more like a bad or buggy linux driver. personally i avoid intel chipsets in windows and linux systems since intel is known for good cpus but also known for having the worst wireless chipsets ever seen. i tested 160 mhz with qca and broadcom chipsets in linux and it worked without any issues

p3x-robot commented 6 years ago

@BrainSlayer you are right, the driver will be supported in 4.16... i have a back-port and use 80mhz, i dont have MU-MIMO any was so the speed is ok... i get the 800 mbits....

p3x-robot commented 6 years ago

@BrainSlayer always buying the wrong wifi chipsets :-1:

ghost commented 6 years ago

@p3x-robot https://github.com/p3x-robot don't we all at some point, Intel has always wanted their hands in everything but have done poorly for networking.

You cannot go wrong with a solid Broadcom chipset -;)

On Mon, Aug 13, 2018, 08:30 patrikx3 notifications@github.com wrote:

@BrainSlayer https://github.com/BrainSlayer always buying the wrong wifi chipsets 👎

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/kaloz/mwlwifi/issues/280#issuecomment-412518404, or mute the thread https://github.com/notifications/unsubscribe-auth/ARIphGEaBv_7eALCGCRK2aDQBkHSzBWfks5uQX9ygaJpZM4SfR5F .

p3x-robot commented 6 years ago

@BrainSlayer I was already like asking before I buy and talk to you, but I was like Intel is the bomb. And nah, wrong again. Never mind, 80 Mhz is ok for now.... 🔢

BrainSlayer commented 6 years ago

@p3x-robot often you dont have a choice. these intel chipsets are often builtinto laptops and forced by intel to be used and intel wasnt bad at all for networking. remember the old e1000 cards. but they never build a good wifi chipset. i have seen troubles like that cards dont support channel greater than 9 in europe, broken wpa support which leads to constant disconnects etc.

ghost commented 6 years ago

I do agree Intel for networking is good in general, just not wifi chipsets.

Have had a lot of gigabit intel cards that did amazing in windblows or linux (redhat in my early teen years).

Apology for the broad mark on all of Intel networking.

On Mon, Aug 13, 2018, 15:43 Sebastian Gottschall notifications@github.com wrote:

@p3x-robot https://github.com/p3x-robot often you dont have a choice. these intel chipsets are often builtinto laptops and forced by intel to be used and intel wasnt bad at all for networking. remember the old e1000 cards. but they never build a good wifi chipset. i have seen troubles like that cards dont support channel greater than 9 in europe, broken wpa support which leads to constant disconnects etc.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/kaloz/mwlwifi/issues/280#issuecomment-412657360, or mute the thread https://github.com/notifications/unsubscribe-auth/ARIphCyq2ZnMiRkFAWfkJ2XTPchWh_Ofks5uQeUBgaJpZM4SfR5F .

lantis1008 commented 5 years ago

Hi @yuhhaurlin Any update on this issue, and in particular, power table loading for WRT32X devices? https://github.com/kaloz/mwlwifi/issues/305#issuecomment-415702157

UsoriNomen commented 5 years ago

Hi @yuhhaurlin Any update on this issue, and in particular, power table loading for WRT32X devices? #305 (comment)

Bump. I'm looking to maybe buy a WRT32X because they are a really good deal if OpenWrt works well on them.

@lantis1008 Is it worth buying one, or are they still in need of further development?

lantis1008 commented 5 years ago

It’s a good device, but if you have certain wireless chipsets (e.g. ESP) you’ll have a bit of trouble. It could do with a bit of spring cleaning, but it performs admirably in my network setup.

intdev32 commented 5 years ago

Plus,

WRT3200ACM(and WRT32X) mwlwifi driver and Intel 8260 wireless chip have some issues.

Sometimes(first connection, within 3-15min) unstable speed, high ping spike, ping drops.

Stock firmware and other routers works ok.

Turn off Intel 8260 driver advanced option U-APSD and use old intel wireless driver helps a lot. But not enough to me.

UsoriNomen commented 5 years ago

I'm brand new to router flashing, but is there anything I can do to help expedite full OpenWrt support for WRT32X / WRT3200ACM?

I've got a WRT32X spun up with up-to-date OEM firmware, and everything seems great so far, although I've done no diagnostics or testing besides speed tests.

Also, looks like dd-wrt supports the WRT32X, but it's not clear if there are any issues. Does anyone know if dd-wrt runs pretty well?

lantis1008 commented 5 years ago

@UsoriNomen WRT3200ACM/WRT32X is already supported. What makes you think otherwise?

UsoriNomen commented 5 years ago

@lantis1008 Sorry, my phrasing was incorrect. What I meant is: how can an OpenWrt novice help you guys fix the remaining bugs?

And also, I would like to know whether OpenWrt or dd-wrt is more usable, as in which has the least remaining bugs?

lantis1008 commented 5 years ago

Unless you had access to the source code for the closed source binary firmware, you’re pretty much at the whim of the developer.

Subjectively i would say they have a similar number of bugs, but in different areas. It’s more what you like or are used to which makes a decision as to what to use.

UsoriNomen commented 5 years ago

Well, currently I'm more interested in usability than having access to every single possible router setting. But obviously I want more options and control than stock firmware.

UsoriNomen commented 5 years ago

For instance, I don't know what effect the ipv6 bug might have on the devices connected to my network.

https://openwrt.org/unsupported/ipv6_until_bug_fixed

lantis1008 commented 5 years ago

This is now pretty off topic to this issue. If you want to know more you should continue at either the dd wrt forums or Openwrt forums.

No ipv6 would only affect wan connections not the internal network in general.

lantis1008 commented 5 years ago

Hi @yuhhaurlin , still looking for any updates on this issue. If you don't have time to develop it yourself, are you able to provide us any hints on the what this new format for the wrt32x power tables is and how we could try loading it ourselves?

yuhhaurlin commented 5 years ago

Sorry. I am not familiar with WRT32X.

lantis1008 commented 5 years ago

You said you would get one to test with a while ago? WRT32X is able to use mwlwifi, so it should be interesting to you. 88W8964.bin must be able to load an external power table, we just need to know how.

howl commented 5 years ago

@lantis1008 seriously, you still have hope that will ever exists a proper kernel module for these marvel wifi modules?

p3x-robot commented 5 years ago

i doubt they ever will develop more on this driver

httpstorm commented 4 years ago

OpenWRT on WRT3200ACM: to accept user region on devices where the region is hard-coded, the wireless drivers can be modified not to inform the system about the wireless chip's region. The following patches can be applied to r11829. Use for educational purposes only is advised.

With that in place the 5 GHz radio will work at 160 MHz. All radios are available to the user. TX power on radio0 and radio1 is still controlled by the wireless chip, so regulations are still followed. radio2 is limited to 8-15 dBm by the chip.

009-mwlwifi-2019-03-02-DFS-free.patch 609-mwifiex-4.19.91-DFS-free.patch

p3x-robot commented 4 years ago

this repo is dead, no one will pull requests... u know ...

howl commented 4 years ago

@httpstorm this could be interesting for you https://github.com/openwrt/openwrt/pull/2397