aboutsummaryrefslogtreecommitdiffstats
path: root/package/mac80211/patches/407-ath9k-override-mac-address-from-platform-data.patch
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2010-04-10 16:50:15 +0000
committerFelix Fietkau <nbd@openwrt.org>2010-04-10 16:50:15 +0000
commitf98e55faf0468bda5773b8276a9d5cdd530f3b80 (patch)
tree655ee3232e58f2f38f6aa6d5930b1df18f2ccb79 /package/mac80211/patches/407-ath9k-override-mac-address-from-platform-data.patch
parent8f25fb608678fa9d5e785f799a21a863b9220f67 (diff)
downloadupstream-f98e55faf0468bda5773b8276a9d5cdd530f3b80.tar.gz
upstream-f98e55faf0468bda5773b8276a9d5cdd530f3b80.tar.bz2
upstream-f98e55faf0468bda5773b8276a9d5cdd530f3b80.zip
mac80211: update to wireless-testing 2010-04-09, add work-in-progress ar9300 patches
SVN-Revision: 20777
Diffstat (limited to 'package/mac80211/patches/407-ath9k-override-mac-address-from-platform-data.patch')
-rw-r--r--package/mac80211/patches/407-ath9k-override-mac-address-from-platform-data.patch14
1 files changed, 7 insertions, 7 deletions
diff --git a/package/mac80211/patches/407-ath9k-override-mac-address-from-platform-data.patch b/package/mac80211/patches/407-ath9k-override-mac-address-from-platform-data.patch
index 93ad941b7e..dc3ba986b3 100644
--- a/package/mac80211/patches/407-ath9k-override-mac-address-from-platform-data.patch
+++ b/package/mac80211/patches/407-ath9k-override-mac-address-from-platform-data.patch
@@ -1,17 +1,17 @@
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
-@@ -16,8 +16,10 @@
+@@ -15,8 +15,10 @@
+ */
- #include <linux/io.h>
#include <linux/etherdevice.h>
+#include <linux/ath9k_platform.h>
#include <asm/unaligned.h>
+#include "ath9k.h"
#include "hw.h"
+ #include "hw-ops.h"
#include "rc.h"
- #include "initvals.h"
-@@ -428,17 +430,23 @@ static int ath9k_hw_rf_claim(struct ath_
+@@ -420,18 +422,23 @@ static void ath9k_hw_init_defaults(struc
static int ath9k_hw_init_macaddr(struct ath_hw *ah)
{
struct ath_common *common = ath9k_hw_common(ah);
@@ -20,10 +20,11 @@
u32 sum;
int i;
u16 eeval;
+ u32 EEP_MAC[] = { EEP_MAC_LSW, EEP_MAC_MID, EEP_MAC_MSW };
sum = 0;
- for (i = 0; i < 3; i++) {
-- eeval = ah->eep_ops->get_eeprom(ah, AR_EEPROM_MAC(i));
+- eeval = ah->eep_ops->get_eeprom(ah, EEP_MAC[i]);
- sum += eeval;
- common->macaddr[2 * i] = eeval >> 8;
- common->macaddr[2 * i + 1] = eeval & 0xff;
@@ -32,12 +33,11 @@
+ memcpy(common->macaddr, pdata->macaddr, ETH_ALEN);
+ else
+ for (i = 0; i < 3; i++) {
-+ eeval = ah->eep_ops->get_eeprom(ah, AR_EEPROM_MAC(i));
++ eeval = ah->eep_ops->get_eeprom(ah, EEP_MAC[i]);
+ sum += eeval;
+ common->macaddr[2 * i] = eeval >> 8;
+ common->macaddr[2 * i + 1] = eeval & 0xff;
+ }
-+
if (!is_valid_ether_addr(common->macaddr)) {
ath_print(common, ATH_DBG_EEPROM,
"eeprom contains invalid mac address: %pM\n",