diff options
author | Felix Fietkau <nbd@nbd.name> | 2017-02-24 11:57:27 +0100 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2017-02-24 12:22:29 +0100 |
commit | 703515f889124248480f39d65f8704548cbf1c09 (patch) | |
tree | cd06f11ec2cc4e6ddb75c8982ecaab9882d3a9ed /package/kernel/mac80211/patches/608-00-rt2x00-get-mac-from-device-tree.patch | |
parent | d27dd6298b0f9a66199758b32ce19c0932ef2ee0 (diff) | |
download | upstream-703515f889124248480f39d65f8704548cbf1c09.tar.gz upstream-703515f889124248480f39d65f8704548cbf1c09.tar.bz2 upstream-703515f889124248480f39d65f8704548cbf1c09.zip |
mac80211: sync with master branch as of 9edff13abd97
Includes the following changes:
9edff13abd mac80211: disable potentially harmful PS software retry for A-MPDU sessions
75216a76b0 mac80211: backport upstream fix for CSA in IBSS mode
368cc8ef47 mac80211: update brcmfmac backporting brcmf_err cleanups
66a63d25c4 mac80211: fix build on linux 3.18
9eacb9d7fc rt2x00: mt7620: lots of improvements
fd94fa61a7 mac80211: brcmfmac: update Raspberry Pi patches for linux 4.9
649e766a64 mac80211: update to wireless-testing 2017-01-31
47540afa5d ath9k: add a warning to the tx99 config option
b367eef21d mac80211: rt2x00: add support for external LNA on MT7620
9200e168f2 mac80211: move (& update) upstream accepted brcmfmac patches
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'package/kernel/mac80211/patches/608-00-rt2x00-get-mac-from-device-tree.patch')
-rw-r--r-- | package/kernel/mac80211/patches/608-00-rt2x00-get-mac-from-device-tree.patch | 152 |
1 files changed, 0 insertions, 152 deletions
diff --git a/package/kernel/mac80211/patches/608-00-rt2x00-get-mac-from-device-tree.patch b/package/kernel/mac80211/patches/608-00-rt2x00-get-mac-from-device-tree.patch deleted file mode 100644 index 290f2480b0..0000000000 --- a/package/kernel/mac80211/patches/608-00-rt2x00-get-mac-from-device-tree.patch +++ /dev/null @@ -1,152 +0,0 @@ -From 0e31738ef78a814fcd2a55f2d57a21d322794da1 Mon Sep 17 00:00:00 2001 -From: Mathias Kresin <dev@kresin.me> -Date: Fri, 26 Aug 2016 09:16:53 +0200 -Subject: rt2x00: add support for mac addr from device tree - -On some devices the EEPROMs of Ralink Wi-Fi chips have a default Ralink -MAC address set (RT3062F: 00:0C:43:30:62:00, RT3060F: -00:0C:43:30:60:00). Using multiple of these devices in the same network -can cause nasty issues. - -Allow to override the MAC in the EEPROM with (a known good) one set in -the device tree to bypass the issue. - -Signed-off-by: Mathias Kresin <dev@kresin.me> ---- - drivers/net/wireless/ralink/rt2x00/rt2400pci.c | 5 +---- - drivers/net/wireless/ralink/rt2x00/rt2500pci.c | 5 +---- - drivers/net/wireless/ralink/rt2x00/rt2500usb.c | 5 +---- - drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 5 +---- - drivers/net/wireless/ralink/rt2x00/rt2x00.h | 1 + - drivers/net/wireless/ralink/rt2x00/rt2x00dev.c | 16 ++++++++++++++++ - drivers/net/wireless/ralink/rt2x00/rt61pci.c | 5 +---- - drivers/net/wireless/ralink/rt2x00/rt73usb.c | 5 +---- - 8 files changed, 23 insertions(+), 24 deletions(-) - ---- a/drivers/net/wireless/ralink/rt2x00/rt2400pci.c -+++ b/drivers/net/wireless/ralink/rt2x00/rt2400pci.c -@@ -1459,10 +1459,7 @@ static int rt2400pci_validate_eeprom(str - * Start validation of the data that has been read. - */ - mac = rt2x00_eeprom_addr(rt2x00dev, EEPROM_MAC_ADDR_0); -- if (!is_valid_ether_addr(mac)) { -- eth_random_addr(mac); -- rt2x00_eeprom_dbg(rt2x00dev, "MAC: %pM\n", mac); -- } -+ rt2x00lib_set_mac_address(rt2x00dev, mac); - - rt2x00_eeprom_read(rt2x00dev, EEPROM_ANTENNA, &word); - if (word == 0xffff) { ---- a/drivers/net/wireless/ralink/rt2x00/rt2500pci.c -+++ b/drivers/net/wireless/ralink/rt2x00/rt2500pci.c -@@ -1585,10 +1585,7 @@ static int rt2500pci_validate_eeprom(str - * Start validation of the data that has been read. - */ - mac = rt2x00_eeprom_addr(rt2x00dev, EEPROM_MAC_ADDR_0); -- if (!is_valid_ether_addr(mac)) { -- eth_random_addr(mac); -- rt2x00_eeprom_dbg(rt2x00dev, "MAC: %pM\n", mac); -- } -+ rt2x00lib_set_mac_address(rt2x00dev, mac); - - rt2x00_eeprom_read(rt2x00dev, EEPROM_ANTENNA, &word); - if (word == 0xffff) { ---- a/drivers/net/wireless/ralink/rt2x00/rt2500usb.c -+++ b/drivers/net/wireless/ralink/rt2x00/rt2500usb.c -@@ -1349,10 +1349,7 @@ static int rt2500usb_validate_eeprom(str - * Start validation of the data that has been read. - */ - mac = rt2x00_eeprom_addr(rt2x00dev, EEPROM_MAC_ADDR_0); -- if (!is_valid_ether_addr(mac)) { -- eth_random_addr(mac); -- rt2x00_eeprom_dbg(rt2x00dev, "MAC: %pM\n", mac); -- } -+ rt2x00lib_set_mac_address(rt2x00dev, mac); - - rt2x00_eeprom_read(rt2x00dev, EEPROM_ANTENNA, &word); - if (word == 0xffff) { ---- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c -+++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c -@@ -7531,10 +7531,7 @@ static int rt2800_validate_eeprom(struct - * Start validation of the data that has been read. - */ - mac = rt2800_eeprom_addr(rt2x00dev, EEPROM_MAC_ADDR_0); -- if (!is_valid_ether_addr(mac)) { -- eth_random_addr(mac); -- rt2x00_eeprom_dbg(rt2x00dev, "MAC: %pM\n", mac); -- } -+ rt2x00lib_set_mac_address(rt2x00dev, mac); - - rt2800_eeprom_read(rt2x00dev, EEPROM_NIC_CONF0, &word); - if (word == 0xffff) { ---- a/drivers/net/wireless/ralink/rt2x00/rt2x00.h -+++ b/drivers/net/wireless/ralink/rt2x00/rt2x00.h -@@ -1416,6 +1416,7 @@ static inline void rt2x00debug_dump_fram - */ - u32 rt2x00lib_get_bssidx(struct rt2x00_dev *rt2x00dev, - struct ieee80211_vif *vif); -+void rt2x00lib_set_mac_address(struct rt2x00_dev *rt2x00dev, u8 *eeprom_mac_addr); - - /* - * Interrupt context handlers. ---- a/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c -+++ b/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c -@@ -26,6 +26,8 @@ - #include <linux/module.h> - #include <linux/slab.h> - #include <linux/log2.h> -+#include <linux/of.h> -+#include <linux/of_net.h> - - #include "rt2x00.h" - #include "rt2x00lib.h" -@@ -931,6 +933,21 @@ static void rt2x00lib_rate(struct ieee80 - entry->flags |= IEEE80211_RATE_SHORT_PREAMBLE; - } - -+void rt2x00lib_set_mac_address(struct rt2x00_dev *rt2x00dev, u8 *eeprom_mac_addr) -+{ -+ const char *mac_addr; -+ -+ mac_addr = of_get_mac_address(rt2x00dev->dev->of_node); -+ if (mac_addr) -+ ether_addr_copy(eeprom_mac_addr, mac_addr); -+ -+ if (!is_valid_ether_addr(eeprom_mac_addr)) { -+ eth_random_addr(eeprom_mac_addr); -+ rt2x00_eeprom_dbg(rt2x00dev, "MAC: %pM\n", eeprom_mac_addr); -+ } -+} -+EXPORT_SYMBOL_GPL(rt2x00lib_set_mac_address); -+ - static int rt2x00lib_probe_hw_modes(struct rt2x00_dev *rt2x00dev, - struct hw_mode_spec *spec) - { ---- a/drivers/net/wireless/ralink/rt2x00/rt61pci.c -+++ b/drivers/net/wireless/ralink/rt2x00/rt61pci.c -@@ -2413,10 +2413,7 @@ static int rt61pci_validate_eeprom(struc - * Start validation of the data that has been read. - */ - mac = rt2x00_eeprom_addr(rt2x00dev, EEPROM_MAC_ADDR_0); -- if (!is_valid_ether_addr(mac)) { -- eth_random_addr(mac); -- rt2x00_eeprom_dbg(rt2x00dev, "MAC: %pM\n", mac); -- } -+ rt2x00lib_set_mac_address(rt2x00dev, mac); - - rt2x00_eeprom_read(rt2x00dev, EEPROM_ANTENNA, &word); - if (word == 0xffff) { ---- a/drivers/net/wireless/ralink/rt2x00/rt73usb.c -+++ b/drivers/net/wireless/ralink/rt2x00/rt73usb.c -@@ -1766,10 +1766,7 @@ static int rt73usb_validate_eeprom(struc - * Start validation of the data that has been read. - */ - mac = rt2x00_eeprom_addr(rt2x00dev, EEPROM_MAC_ADDR_0); -- if (!is_valid_ether_addr(mac)) { -- eth_random_addr(mac); -- rt2x00_eeprom_dbg(rt2x00dev, "MAC: %pM\n", mac); -- } -+ rt2x00lib_set_mac_address(rt2x00dev, mac); - - rt2x00_eeprom_read(rt2x00dev, EEPROM_ANTENNA, &word); - if (word == 0xffff) { |