Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 19b73c7f authored by Sujith's avatar Sujith Committed by John W. Linville
Browse files

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: default avatarSujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 60653678
Loading
Loading
Loading
Loading
+0 −13
Original line number Diff line number Diff line
@@ -564,8 +564,6 @@ enum ath9k_cipher {
#define CTL_5GHT40              8

#define AR_EEPROM_MAC(i)        (0x1d+(i))
#define EEP_SCALE       100
#define EEP_DELTA       10

#define AR_EEPROM_RFSILENT_GPIO_SEL     0x001c
#define AR_EEPROM_RFSILENT_GPIO_SEL_S   2
@@ -606,9 +604,6 @@ struct ath9k_country_entry {
#define REG_CLR_BIT(_a, _r, _f) \
	REG_WRITE(_a, _r, REG_READ(_a, _r) & ~_f)

#define ATH9K_COMP_BUF_MAX_SIZE   9216
#define ATH9K_COMP_BUF_ALIGN_SIZE 512

#define ATH9K_TXQ_USE_LOCKOUT_BKOFF_DIS   0x00000001

#define INIT_AIFS       2
@@ -637,7 +632,6 @@ struct ath9k_country_entry {
				  IEEE80211_WEP_KIDLEN +	\
				  IEEE80211_WEP_CRCLEN))

#define MAX_REG_ADD_COUNT   129
#define MAX_RATE_POWER 63

enum ath9k_power_mode {
@@ -707,13 +701,6 @@ enum phytype {
};
#define PHY_CCK PHY_DS

enum start_adhoc_option {
	START_ADHOC_NO_11A,
	START_ADHOC_PER_11D,
	START_ADHOC_IN_11A,
	START_ADHOC_IN_11B,
};

enum ath9k_tp_scale {
	ATH9K_TP_SCALE_MAX = 0,
	ATH9K_TP_SCALE_50,
+0 −7
Original line number Diff line number Diff line
@@ -551,9 +551,6 @@ void ath_beacon_free(struct ath_softc *sc)

void ath9k_beacon_tasklet(unsigned long data)
{
#define TSF_TO_TU(_h,_l) \
	((((u32)(_h)) << 22) | (((u32)(_l)) >> 10))

	struct ath_softc *sc = (struct ath_softc *)data;
	struct ath_hal *ah = sc->sc_ah;
	struct ath_buf *bf = NULL;
@@ -715,7 +712,6 @@ void ath9k_beacon_tasklet(unsigned long data)

		sc->ast_be_xmit += bc;     /* XXX per-vap? */
	}
#undef TSF_TO_TU
}

/*
@@ -751,8 +747,6 @@ void ath_bstuck_process(struct ath_softc *sc)

void ath_beacon_config(struct ath_softc *sc, int if_id)
{
#define TSF_TO_TU(_h,_l)					\
	((((u32)(_h)) << 22) | (((u32)(_l)) >> 10))
	struct ath_hal *ah = sc->sc_ah;
	u32 nexttbtt, intval;
	struct ath_beacon_config conf;
@@ -975,7 +969,6 @@ void ath_beacon_config(struct ath_softc *sc, int if_id)
		    (ah->ah_caps.hw_caps & ATH9K_HW_CAP_VEOL))
			ath_beacon_start_adhoc(sc, 0);
	}
#undef TSF_TO_TU
}

/* Function to collect beacon rssi data and resync beacon if necessary */
+7 −4
Original line number Diff line number Diff line
@@ -79,6 +79,9 @@ struct ath_node;
		}				\
	} while (0)

#define TSF_TO_TU(_h,_l) \
	((((u32)(_h)) << 22) | (((u32)(_l)) >> 10))

/* XXX: remove */
#define memzero(_buf, _len) memset(_buf, 0, _len)

@@ -382,7 +385,7 @@ int ath_rx_input(struct ath_softc *sc,
		 struct sk_buff *skb,
		 struct ath_recv_status *rx_status,
		 enum ATH_RX_TYPE *status);
int ath__rx_indicate(struct ath_softc *sc,
int _ath_rx_indicate(struct ath_softc *sc,
		     struct sk_buff *skb,
		     struct ath_recv_status *status,
		     u16 keyix);
+3 −5
Original line number Diff line number Diff line
@@ -1099,7 +1099,7 @@ void ath_tx_complete(struct ath_softc *sc, struct sk_buff *skb,
		ath_node_put(sc, an, ATH9K_BH_STATUS_CHANGE);
}

int ath__rx_indicate(struct ath_softc *sc,
int _ath_rx_indicate(struct ath_softc *sc,
		     struct sk_buff *skb,
		     struct ath_recv_status *status,
		     u16 keyix)
@@ -1119,9 +1119,6 @@ int ath__rx_indicate(struct ath_softc *sc,
		skb_pull(skb, padsize);
	}

	/* remove FCS before passing up to protocol stack */
	skb_trim(skb, (skb->len - FCS_LEN));

	/* Prepare rx status */
	ath9k_rx_prepare(sc, skb, status, &rx_status);

@@ -1364,7 +1361,8 @@ static int ath_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
		goto bad2;
	}

	hw->flags = IEEE80211_HW_SIGNAL_DBM |
	hw->flags = IEEE80211_HW_RX_INCLUDES_FCS |
		IEEE80211_HW_SIGNAL_DBM |
		IEEE80211_HW_NOISE_DBM;

	SET_IEEE80211_DEV(hw, &pdev->dev);
+1 −1
Original line number Diff line number Diff line
@@ -448,7 +448,7 @@ static int ath_rx_indicate(struct ath_softc *sc,
	int type;

	/* indicate frame to the stack, which will free the old skb. */
	type = ath__rx_indicate(sc, skb, status, keyix);
	type = _ath_rx_indicate(sc, skb, status, keyix);

	/* allocate a new skb and queue it to for H/W processing */
	nskb = ath_rxbuf_alloc(sc, sc->sc_rxbufsize);
+6 −6

File changed.

Contains only whitespace changes.

Loading