aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath9k
diff options
context:
space:
mode:
authorSujith <Sujith.Manoharan@atheros.com>2008-08-14 03:58:20 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-08-29 16:24:05 -0400
commit19b73c7f68fb2eeb180eafa70f9859409ec9aa08 (patch)
tree793628c5efb70056e2abca1bac97587e244e8749 /drivers/net/wireless/ath9k
parent60653678939dcbba3aa936250b58179aa3451eee (diff)
ath9k: Add IEEE80211_HW_RX_INCLUDES_FCS to hw flags
Don't trim the FCS before passing the frame to mac80211, move TSF_TO_TU to core.h and delete more unused macros. Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath9k')
-rw-r--r--drivers/net/wireless/ath9k/ath9k.h13
-rw-r--r--drivers/net/wireless/ath9k/beacon.c7
-rw-r--r--drivers/net/wireless/ath9k/core.h11
-rw-r--r--drivers/net/wireless/ath9k/main.c8
-rw-r--r--drivers/net/wireless/ath9k/phy.h12
-rw-r--r--drivers/net/wireless/ath9k/recv.c2
6 files changed, 17 insertions, 36 deletions
diff --git a/drivers/net/wireless/ath9k/ath9k.h b/drivers/net/wireless/ath9k/ath9k.h
index 682d3bb4d494..18028a3abc58 100644
--- a/drivers/net/wireless/ath9k/ath9k.h
+++ b/drivers/net/wireless/ath9k/ath9k.h
@@ -564,8 +564,6 @@ enum ath9k_cipher {
564#define CTL_5GHT40 8 564#define CTL_5GHT40 8
565 565
566#define AR_EEPROM_MAC(i) (0x1d+(i)) 566#define AR_EEPROM_MAC(i) (0x1d+(i))
567#define EEP_SCALE 100
568#define EEP_DELTA 10
569 567
570#define AR_EEPROM_RFSILENT_GPIO_SEL 0x001c 568#define AR_EEPROM_RFSILENT_GPIO_SEL 0x001c
571#define AR_EEPROM_RFSILENT_GPIO_SEL_S 2 569#define AR_EEPROM_RFSILENT_GPIO_SEL_S 2
@@ -606,9 +604,6 @@ struct ath9k_country_entry {
606#define REG_CLR_BIT(_a, _r, _f) \ 604#define REG_CLR_BIT(_a, _r, _f) \
607 REG_WRITE(_a, _r, REG_READ(_a, _r) & ~_f) 605 REG_WRITE(_a, _r, REG_READ(_a, _r) & ~_f)
608 606
609#define ATH9K_COMP_BUF_MAX_SIZE 9216
610#define ATH9K_COMP_BUF_ALIGN_SIZE 512
611
612#define ATH9K_TXQ_USE_LOCKOUT_BKOFF_DIS 0x00000001 607#define ATH9K_TXQ_USE_LOCKOUT_BKOFF_DIS 0x00000001
613 608
614#define INIT_AIFS 2 609#define INIT_AIFS 2
@@ -637,7 +632,6 @@ struct ath9k_country_entry {
637 IEEE80211_WEP_KIDLEN + \ 632 IEEE80211_WEP_KIDLEN + \
638 IEEE80211_WEP_CRCLEN)) 633 IEEE80211_WEP_CRCLEN))
639 634
640#define MAX_REG_ADD_COUNT 129
641#define MAX_RATE_POWER 63 635#define MAX_RATE_POWER 63
642 636
643enum ath9k_power_mode { 637enum ath9k_power_mode {
@@ -707,13 +701,6 @@ enum phytype {
707}; 701};
708#define PHY_CCK PHY_DS 702#define PHY_CCK PHY_DS
709 703
710enum start_adhoc_option {
711 START_ADHOC_NO_11A,
712 START_ADHOC_PER_11D,
713 START_ADHOC_IN_11A,
714 START_ADHOC_IN_11B,
715};
716
717enum ath9k_tp_scale { 704enum ath9k_tp_scale {
718 ATH9K_TP_SCALE_MAX = 0, 705 ATH9K_TP_SCALE_MAX = 0,
719 ATH9K_TP_SCALE_50, 706 ATH9K_TP_SCALE_50,
diff --git a/drivers/net/wireless/ath9k/beacon.c b/drivers/net/wireless/ath9k/beacon.c
index 89e5c65accd0..ee1185622ba6 100644
--- a/drivers/net/wireless/ath9k/beacon.c
+++ b/drivers/net/wireless/ath9k/beacon.c
@@ -551,9 +551,6 @@ void ath_beacon_free(struct ath_softc *sc)
551 551
552void ath9k_beacon_tasklet(unsigned long data) 552void ath9k_beacon_tasklet(unsigned long data)
553{ 553{
554#define TSF_TO_TU(_h,_l) \
555 ((((u32)(_h)) << 22) | (((u32)(_l)) >> 10))
556
557 struct ath_softc *sc = (struct ath_softc *)data; 554 struct ath_softc *sc = (struct ath_softc *)data;
558 struct ath_hal *ah = sc->sc_ah; 555 struct ath_hal *ah = sc->sc_ah;
559 struct ath_buf *bf = NULL; 556 struct ath_buf *bf = NULL;
@@ -715,7 +712,6 @@ void ath9k_beacon_tasklet(unsigned long data)
715 712
716 sc->ast_be_xmit += bc; /* XXX per-vap? */ 713 sc->ast_be_xmit += bc; /* XXX per-vap? */
717 } 714 }
718#undef TSF_TO_TU
719} 715}
720 716
721/* 717/*
@@ -751,8 +747,6 @@ void ath_bstuck_process(struct ath_softc *sc)
751 747
752void ath_beacon_config(struct ath_softc *sc, int if_id) 748void ath_beacon_config(struct ath_softc *sc, int if_id)
753{ 749{
754#define TSF_TO_TU(_h,_l) \
755 ((((u32)(_h)) << 22) | (((u32)(_l)) >> 10))
756 struct ath_hal *ah = sc->sc_ah; 750 struct ath_hal *ah = sc->sc_ah;
757 u32 nexttbtt, intval; 751 u32 nexttbtt, intval;
758 struct ath_beacon_config conf; 752 struct ath_beacon_config conf;
@@ -975,7 +969,6 @@ void ath_beacon_config(struct ath_softc *sc, int if_id)
975 (ah->ah_caps.hw_caps & ATH9K_HW_CAP_VEOL)) 969 (ah->ah_caps.hw_caps & ATH9K_HW_CAP_VEOL))
976 ath_beacon_start_adhoc(sc, 0); 970 ath_beacon_start_adhoc(sc, 0);
977 } 971 }
978#undef TSF_TO_TU
979} 972}
980 973
981/* Function to collect beacon rssi data and resync beacon if necessary */ 974/* Function to collect beacon rssi data and resync beacon if necessary */
diff --git a/drivers/net/wireless/ath9k/core.h b/drivers/net/wireless/ath9k/core.h
index 406225ba4521..ca7e61353547 100644
--- a/drivers/net/wireless/ath9k/core.h
+++ b/drivers/net/wireless/ath9k/core.h
@@ -79,6 +79,9 @@ struct ath_node;
79 } \ 79 } \
80 } while (0) 80 } while (0)
81 81
82#define TSF_TO_TU(_h,_l) \
83 ((((u32)(_h)) << 22) | (((u32)(_l)) >> 10))
84
82/* XXX: remove */ 85/* XXX: remove */
83#define memzero(_buf, _len) memset(_buf, 0, _len) 86#define memzero(_buf, _len) memset(_buf, 0, _len)
84 87
@@ -382,10 +385,10 @@ int ath_rx_input(struct ath_softc *sc,
382 struct sk_buff *skb, 385 struct sk_buff *skb,
383 struct ath_recv_status *rx_status, 386 struct ath_recv_status *rx_status,
384 enum ATH_RX_TYPE *status); 387 enum ATH_RX_TYPE *status);
385int ath__rx_indicate(struct ath_softc *sc, 388int _ath_rx_indicate(struct ath_softc *sc,
386 struct sk_buff *skb, 389 struct sk_buff *skb,
387 struct ath_recv_status *status, 390 struct ath_recv_status *status,
388 u16 keyix); 391 u16 keyix);
389int ath_rx_subframe(struct ath_node *an, struct sk_buff *skb, 392int ath_rx_subframe(struct ath_node *an, struct sk_buff *skb,
390 struct ath_recv_status *status); 393 struct ath_recv_status *status);
391 394
diff --git a/drivers/net/wireless/ath9k/main.c b/drivers/net/wireless/ath9k/main.c
index 2b3b11bb564b..55f48685b5ea 100644
--- a/drivers/net/wireless/ath9k/main.c
+++ b/drivers/net/wireless/ath9k/main.c
@@ -1099,7 +1099,7 @@ void ath_tx_complete(struct ath_softc *sc, struct sk_buff *skb,
1099 ath_node_put(sc, an, ATH9K_BH_STATUS_CHANGE); 1099 ath_node_put(sc, an, ATH9K_BH_STATUS_CHANGE);
1100} 1100}
1101 1101
1102int ath__rx_indicate(struct ath_softc *sc, 1102int _ath_rx_indicate(struct ath_softc *sc,
1103 struct sk_buff *skb, 1103 struct sk_buff *skb,
1104 struct ath_recv_status *status, 1104 struct ath_recv_status *status,
1105 u16 keyix) 1105 u16 keyix)
@@ -1119,9 +1119,6 @@ int ath__rx_indicate(struct ath_softc *sc,
1119 skb_pull(skb, padsize); 1119 skb_pull(skb, padsize);
1120 } 1120 }
1121 1121
1122 /* remove FCS before passing up to protocol stack */
1123 skb_trim(skb, (skb->len - FCS_LEN));
1124
1125 /* Prepare rx status */ 1122 /* Prepare rx status */
1126 ath9k_rx_prepare(sc, skb, status, &rx_status); 1123 ath9k_rx_prepare(sc, skb, status, &rx_status);
1127 1124
@@ -1364,7 +1361,8 @@ static int ath_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
1364 goto bad2; 1361 goto bad2;
1365 } 1362 }
1366 1363
1367 hw->flags = IEEE80211_HW_SIGNAL_DBM | 1364 hw->flags = IEEE80211_HW_RX_INCLUDES_FCS |
1365 IEEE80211_HW_SIGNAL_DBM |
1368 IEEE80211_HW_NOISE_DBM; 1366 IEEE80211_HW_NOISE_DBM;
1369 1367
1370 SET_IEEE80211_DEV(hw, &pdev->dev); 1368 SET_IEEE80211_DEV(hw, &pdev->dev);
diff --git a/drivers/net/wireless/ath9k/phy.h b/drivers/net/wireless/ath9k/phy.h
index 0cd399a5344a..14702344448b 100644
--- a/drivers/net/wireless/ath9k/phy.h
+++ b/drivers/net/wireless/ath9k/phy.h
@@ -18,19 +18,19 @@
18#define PHY_H 18#define PHY_H
19 19
20bool ath9k_hw_ar9280_set_channel(struct ath_hal *ah, 20bool ath9k_hw_ar9280_set_channel(struct ath_hal *ah,
21 struct ath9k_channel 21 struct ath9k_channel
22 *chan); 22 *chan);
23bool ath9k_hw_set_channel(struct ath_hal *ah, 23bool ath9k_hw_set_channel(struct ath_hal *ah,
24 struct ath9k_channel *chan); 24 struct ath9k_channel *chan);
25void ath9k_hw_write_regs(struct ath_hal *ah, u32 modesIndex, 25void ath9k_hw_write_regs(struct ath_hal *ah, u32 modesIndex,
26 u32 freqIndex, int regWrites); 26 u32 freqIndex, int regWrites);
27bool ath9k_hw_set_rf_regs(struct ath_hal *ah, 27bool ath9k_hw_set_rf_regs(struct ath_hal *ah,
28 struct ath9k_channel *chan, 28 struct ath9k_channel *chan,
29 u16 modesIndex); 29 u16 modesIndex);
30void ath9k_hw_decrease_chain_power(struct ath_hal *ah, 30void ath9k_hw_decrease_chain_power(struct ath_hal *ah,
31 struct ath9k_channel *chan); 31 struct ath9k_channel *chan);
32bool ath9k_hw_init_rf(struct ath_hal *ah, 32bool ath9k_hw_init_rf(struct ath_hal *ah,
33 int *status); 33 int *status);
34 34
35#define AR_PHY_BASE 0x9800 35#define AR_PHY_BASE 0x9800
36#define AR_PHY(_n) (AR_PHY_BASE + ((_n)<<2)) 36#define AR_PHY(_n) (AR_PHY_BASE + ((_n)<<2))
diff --git a/drivers/net/wireless/ath9k/recv.c b/drivers/net/wireless/ath9k/recv.c
index 91f635411ab5..6e13c638cc0b 100644
--- a/drivers/net/wireless/ath9k/recv.c
+++ b/drivers/net/wireless/ath9k/recv.c
@@ -448,7 +448,7 @@ static int ath_rx_indicate(struct ath_softc *sc,
448 int type; 448 int type;
449 449
450 /* indicate frame to the stack, which will free the old skb. */ 450 /* indicate frame to the stack, which will free the old skb. */
451 type = ath__rx_indicate(sc, skb, status, keyix); 451 type = _ath_rx_indicate(sc, skb, status, keyix);
452 452
453 /* allocate a new skb and queue it to for H/W processing */ 453 /* allocate a new skb and queue it to for H/W processing */
454 nskb = ath_rxbuf_alloc(sc, sc->sc_rxbufsize); 454 nskb = ath_rxbuf_alloc(sc, sc->sc_rxbufsize);