]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ath9k_hw: Fill rx_enable() for the AR9003 hardware family
authorVasanthakumar Thiagarajan <vasanth@atheros.com>
Thu, 15 Apr 2010 21:38:27 +0000 (17:38 -0400)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 16 Apr 2010 19:43:22 +0000 (15:43 -0400)
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/ath9k/Makefile
drivers/net/wireless/ath/ath9k/ar9003_mac.c [new file with mode: 0644]
drivers/net/wireless/ath/ath9k/ar9003_mac.h
drivers/net/wireless/ath/ath9k/hw.c

index ecf3f8c71d6f21cbb8794b793b6844983fea996f..96af3d96de5cc7c861fe50793048363211611d0a 100644 (file)
@@ -25,6 +25,7 @@ ath9k_hw-y:=  hw.o \
                ani.o \
                btcoex.o \
                mac.o \
+               ar9003_mac.o
 
 obj-$(CONFIG_ATH9K_HW) += ath9k_hw.o
 
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_mac.c b/drivers/net/wireless/ath/ath9k/ar9003_mac.c
new file mode 100644 (file)
index 0000000..ee84e64
--- /dev/null
@@ -0,0 +1,28 @@
+/*
+ * Copyright (c) 2010 Atheros Communications Inc.
+ *
+ * Permission to use, copy, modify, and/or distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+#include "hw.h"
+
+static void ar9003_hw_rx_enable(struct ath_hw *hw)
+{
+       REG_WRITE(hw, AR_CR, 0);
+}
+
+void ar9003_hw_attach_mac_ops(struct ath_hw *hw)
+{
+       struct ath_hw_ops *ops = ath9k_hw_ops(hw);
+
+       ops->rx_enable = ar9003_hw_rx_enable;
+}
index dbf74eba4c58b8839364cff23667faa010f8d23e..2a9d80e9e0c7d14f9953b06bde22cdc686321e2f 100644 (file)
@@ -32,4 +32,6 @@ struct ar9003_rxs {
        u32 status11;
 } __packed;
 
+void ar9003_hw_attach_mac_ops(struct ath_hw *hw);
+
 #endif
index c06c44c396def7178c456324c20c961bc164004c..b4a8af1a544c63cae19e86b54187a210eeb16a38 100644 (file)
@@ -1566,8 +1566,6 @@ int ath9k_hw_reset(struct ath_hw *ah, struct ath9k_channel *chan,
        if (tsf && AR_SREV_9280(ah) && ah->eep_ops->get_eeprom(ah, EEP_OL_PWRCTRL))
                ath9k_hw_settsf64(ah, tsf);
 
-       ar9002_hw_attach_mac_ops(ah);
-
        if (AR_SREV_9280_10_OR_LATER(ah))
                REG_SET_BIT(ah, AR_GPIO_INPUT_EN_VAL, AR_GPIO_JTAG_DISABLE);
 
@@ -3563,6 +3561,8 @@ static void ar9002_hw_attach_ops(struct ath_hw *ah)
        ar5008_hw_attach_phy_ops(ah);
        if (AR_SREV_9280_10_OR_LATER(ah))
                ar9002_hw_attach_phy_ops(ah);
+
+       ar9002_hw_attach_mac_ops(ah);
 }
 
 /* Sets up the AR9003 hardware familiy callbacks */
@@ -3573,4 +3573,6 @@ static void ar9003_hw_attach_ops(struct ath_hw *ah)
        priv_ops->macversion_supported = ar9003_hw_macversion_supported;
 
        ar9003_hw_attach_phy_ops(ah);
+
+       ar9003_hw_attach_mac_ops(ah);
 }