aboutsummaryrefslogtreecommitdiffstats
path: root/package/mac80211/patches/603-rt2x00-introduce-rt2x00eeprom.patch
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2013-04-28 12:37:09 +0000
committerFelix Fietkau <nbd@openwrt.org>2013-04-28 12:37:09 +0000
commitd520c048d8eda9083b3fffb4e4e0a82a8a8b0c6b (patch)
tree55111555c00d21d4857262bd9ca3ee0bc2bcf222 /package/mac80211/patches/603-rt2x00-introduce-rt2x00eeprom.patch
parentacd03cf8d8c3a047108b7983944b0c8d0228f812 (diff)
downloadupstream-d520c048d8eda9083b3fffb4e4e0a82a8a8b0c6b.tar.gz
upstream-d520c048d8eda9083b3fffb4e4e0a82a8a8b0c6b.tar.bz2
upstream-d520c048d8eda9083b3fffb4e4e0a82a8a8b0c6b.zip
mac80211: update to 2013-02-22 from trunk + backports
Signed-off-by: Felix Fietkau <nbd@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/branches/attitude_adjustment@36470 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/mac80211/patches/603-rt2x00-introduce-rt2x00eeprom.patch')
-rw-r--r--package/mac80211/patches/603-rt2x00-introduce-rt2x00eeprom.patch25
1 files changed, 15 insertions, 10 deletions
diff --git a/package/mac80211/patches/603-rt2x00-introduce-rt2x00eeprom.patch b/package/mac80211/patches/603-rt2x00-introduce-rt2x00eeprom.patch
index 4f35ae899f..07e72e39f4 100644
--- a/package/mac80211/patches/603-rt2x00-introduce-rt2x00eeprom.patch
+++ b/package/mac80211/patches/603-rt2x00-introduce-rt2x00eeprom.patch
@@ -101,7 +101,7 @@
+}
--- a/drivers/net/wireless/rt2x00/rt2x00.h
+++ b/drivers/net/wireless/rt2x00/rt2x00.h
-@@ -560,6 +560,7 @@ struct rt2x00lib_ops {
+@@ -559,6 +559,7 @@ struct rt2x00lib_ops {
const u8 *data, const size_t len);
int (*load_firmware) (struct rt2x00_dev *rt2x00dev,
const u8 *data, const size_t len);
@@ -109,7 +109,7 @@
/*
* Device initialization/deinitialization handlers.
-@@ -721,6 +722,7 @@ enum rt2x00_capability_flags {
+@@ -719,6 +720,7 @@ enum rt2x00_capability_flags {
REQUIRE_SW_SEQNO,
REQUIRE_HT_TX_DESC,
REQUIRE_PS_AUTOWAKE,
@@ -117,7 +117,7 @@
/*
* Capabilities
-@@ -976,6 +978,11 @@ struct rt2x00_dev {
+@@ -988,6 +990,11 @@ struct rt2x00_dev {
const struct firmware *fw;
/*
@@ -186,29 +186,34 @@
obj-$(CONFIG_RT2X00_LIB_PCI) += rt2x00pci.o
--- a/drivers/net/wireless/rt2x00/rt2800pci.c
+++ b/drivers/net/wireless/rt2x00/rt2800pci.c
-@@ -89,20 +89,10 @@ static void rt2800pci_mcu_status(struct
+@@ -89,25 +89,11 @@ static void rt2800pci_mcu_status(struct
rt2x00pci_register_write(rt2x00dev, H2M_MAILBOX_CID, ~0);
}
-#if defined(CONFIG_RALINK_RT288X) || defined(CONFIG_RALINK_RT305X)
- static void rt2800pci_read_eeprom_soc(struct rt2x00_dev *rt2x00dev)
+ static int rt2800pci_read_eeprom_soc(struct rt2x00_dev *rt2x00dev)
{
- void __iomem *base_addr = ioremap(0x1F040000, EEPROM_SIZE);
-
+- if (!base_addr)
+- return -ENOMEM;
+-
- memcpy_fromio(rt2x00dev->eeprom, base_addr, EEPROM_SIZE);
-
- iounmap(base_addr);
+ memcpy(rt2x00dev->eeprom, rt2x00dev->eeprom_file->data, EEPROM_SIZE);
+ return 0;
}
-#else
--static inline void rt2800pci_read_eeprom_soc(struct rt2x00_dev *rt2x00dev)
+-static inline int rt2800pci_read_eeprom_soc(struct rt2x00_dev *rt2x00dev)
-{
+- return -ENOMEM;
-}
-#endif /* CONFIG_RALINK_RT288X || CONFIG_RALINK_RT305X */
#ifdef CONFIG_PCI
static void rt2800pci_eepromregister_read(struct eeprom_93cx6 *eeprom)
-@@ -322,6 +312,20 @@ static int rt2800pci_write_firmware(stru
+@@ -331,6 +317,20 @@ static int rt2800pci_write_firmware(stru
}
/*
@@ -229,7 +234,7 @@
* Initialization functions.
*/
static bool rt2800pci_get_entry_state(struct queue_entry *entry)
-@@ -1033,6 +1037,7 @@ static const struct rt2x00lib_ops rt2800
+@@ -1046,6 +1046,7 @@ static const struct rt2x00lib_ops rt2800
.get_firmware_name = rt2800pci_get_firmware_name,
.check_firmware = rt2800_check_firmware,
.load_firmware = rt2800_load_firmware,
@@ -239,7 +244,7 @@
.get_entry_state = rt2800pci_get_entry_state,
--- a/drivers/net/wireless/rt2x00/rt2x00dev.c
+++ b/drivers/net/wireless/rt2x00/rt2x00dev.c
-@@ -1163,6 +1163,10 @@ int rt2x00lib_probe_dev(struct rt2x00_de
+@@ -1318,6 +1318,10 @@ int rt2x00lib_probe_dev(struct rt2x00_de
rt2x00dev->hw->wiphy->flags |= WIPHY_FLAG_IBSS_RSN;
@@ -250,7 +255,7 @@
/*
* Initialize work.
*/
-@@ -1287,6 +1291,11 @@ void rt2x00lib_remove_dev(struct rt2x00_
+@@ -1442,6 +1446,11 @@ void rt2x00lib_remove_dev(struct rt2x00_
*/
if (rt2x00dev->drv_data)
kfree(rt2x00dev->drv_data);