MediaTek MT7916AN (Filogic 630) is a DBDC 2*2 G-Band and 3*3 B-Band
chip found on the AsiaRF AW7916-NPD mini PCIe Module.
Add the additional ID.
Signed-off-by: Dennis Schmalacker <dennis-on-github@dclabs.de>
[ improve commit description, wrap to 75 char ]
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
The 32bit counter can only count to 4GiB before wrapping.
Switching to the 64bit variant avoids this issue.
In practice some users are interpreting the counter values as signed
integer bringing down the usable range for 32bit values down to only
2GiB.
Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
Atheros AR9287 is a 2*2 PCI wireless chip used in TP-Link TL-WR841N v7.
Atheros AR9380 is a 3*3 PCI wireless chip used in TP-Link TL-WR2543N v1.
Signed-off-by: Shiji Yang <yangshiji66@qq.com>
Now that iwinfo_hardware_id_from_mtd() is no longer called in case
a compatible string is found we need to add those to devices.txt.
Unfortunately some WiSoCs share the same dtsi and hence also the
compatible string, so detection is now slightly wrong for those,
as they were previously identified parsing the MTD EEPROM data.
As a reminder that this will need fixing, the following entries
have been left in devices.txt:
0x1814 0x3051 0x1814 0x0007 0 0 "Ralink" "Rt3051"
0x1814 0x3052 0x1814 0x0008 0 0 "Ralink" "Rt3052"
0x1814 0x3350 0x1814 0x000b 0 0 "Ralink" "Rt3350"
0x1814 0x3662 0x1814 0x000d 0 0 "Ralink" "Rt3662"
Fixes: fac0787 ("devices: add support for declaring compatible matched devices")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
This reverts to the earlier behaviour, because:
* phys can be renamed, which breaks hardcoding "phy%d"
* /sys/class/ieee80211/*/device can return networks of other phys,
since "device" is a symlink which can have multiple phys
The earlier behaviour fixes both points.
Fixes: 6194aaf0 "nl80211: simplify iterating over phy's devices"
Signed-off-by: Andre Heider <a.heider@gmail.com>
Tested-by: Olcay Korkmaz <nuke_mania@hotmail.com>
[ drop extra Fixes tag related to openwrt issue ]
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
In converting the iwinfo header to enum-define pattern the IWINFO_AUTH
define conversion was wrongly dropped. Readd the missing define to fix
iwinfo always reporting None as encryption.
Fixes: 7e3d7ded29 ("iwinfo: reorganize iwinfo header to enum and defines")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
There's no need to iterate over all devices in /sys/class/net and check
if the phy index matches, sysfs already provides per phy devices.
Signed-off-by: Andre Heider <a.heider@gmail.com>
Providing the channel alone isn't clear as there're overlapping channels
on e.g. band 2 and 6.
Note: This changes the ABI.
Signed-off-by: Andre Heider <a.heider@gmail.com>
So that consumers don't have to fiddle around with mapping frequencies
to bands, which everyone seems to do a little differently.
Note: This changes the ABI.
Signed-off-by: Andre Heider <a.heider@gmail.com>
iwinfo.h have a mixed way to declare defines, some use enum, some define
bits in enum and other have their own special way. In all of this case
the count of all this defines is hardcoded to an arbitrary number.
To make code less error prone, convert everything to a common pattern
and use enum way to calculate the count of each flags.
Also drop defining number for each flag and just declare that the enum
starts from 0.
Move the related char array just below the define declaration to improve
code readability.
No functionl change intended.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
A nice and stable working mainline driver deserves first class support,
and this adds all USB devices supported by it.
The PIDs/VIDs are taken directly from the driver, in the very same order
to make future syncs easy.
The single left out entry is the unknown 148f:760a.
Signed-off-by: Andre Heider <a.heider@gmail.com>
This adds the single missing compatible supported by the mt76 driver,
which is used by a bunch of ramips mt7628an devices.
Signed-off-by: Andre Heider <a.heider@gmail.com>
Some device have embedded wifi card that are not connected with usb or
internall with pci. Such device have fake device_id and only the
vendor_id actually reflect something real but internally they don't have
any id and are just matched by the node compatible binding in DT.
We currently match this with a big if-else to match the single devices
but this can be improved and be matched directly in devices.txt
Rework this so that we can drop the big if-else and move the matching
to devices.txt
When a device is matched using compatible in iwinfo the hardware will be
flagged as embedded and won't print empty ids.
Update devices.txt by migrating all the compatible matching device from
fake id to compatible matching.
Tested-by: Christian Marangi <ansuelsmth@gmail.com> # ipq4019
Co-developed-by: Christian Marangi <ansuelsmth@gmail.com>
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Tested-by: Robert Marko <robimarko@gmail.com> # ipq8074
Reviewed-by: Andre Heider <a.heider@gmail.com>
The "chan_width" var contains an index, not a value.
While at it, make the 40 and 2040 description shorter and clearer.
Signed-off-by: Andre Heider <a.heider@gmail.com>
Match by frequency and not by channel as the radio might have the same
channel on multiple bands:
$ iwinfo radio0 freqlist
[snip]
* 2.432 GHz (Channel 5)
[snip]
* 5.975 GHz (Channel 5)
[snip]
Signed-off-by: Andre Heider <a.heider@gmail.com>
Some defines/enums use bits, while some functions only set a single one.
Make it less painful to get to a name for those.
This avoids hardcoding bit lists for consumers.
Signed-off-by: Andre Heider <a.heider@gmail.com>
Unify how hwmodes are displayed, e.g.:
"802.11ac/ax/b/g/n" instead of "802.11bgnacax".
Luci currently uses a natural sort order, but that probably doesn't work
as intended once "be" is added, so let's do this here.
Signed-off-by: Andre Heider <a.heider@gmail.com>
Use a hyphen for the WEP cipher names, just as the others. Not that
anyone cares anymore, but this let's us use this array instead of
everyone fixing it up on their own.
Signed-off-by: Andre Heider <a.heider@gmail.com>