diff options
author | Arend van Spriel <arend@broadcom.com> | 2011-09-29 15:34:34 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-10-03 16:12:32 -0700 |
commit | e4e2f462aea3308891855a078b655675e7cc3c94 (patch) | |
tree | aa82f99dacfe8c1246ea2f3fb6b3642d573e3d18 | |
parent | 28bb0f60ce2ae66831735c650804942fa9da0b70 (diff) | |
download | op-kernel-dev-e4e2f462aea3308891855a078b655675e7cc3c94.zip op-kernel-dev-e4e2f462aea3308891855a078b655675e7cc3c94.tar.gz |
staging: brcm80211: use d11rxhdr structure in brcms_c_recover_tsf64()
All information needed for this function is available in the d11rxhdr
structure. This is the last place where the brcms_d11rxhdr structure
so it can be removed.
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | drivers/staging/brcm80211/brcmsmac/d11.h | 17 | ||||
-rw-r--r-- | drivers/staging/brcm80211/brcmsmac/main.c | 9 | ||||
-rw-r--r-- | drivers/staging/brcm80211/brcmsmac/types.h | 1 |
3 files changed, 3 insertions, 24 deletions
diff --git a/drivers/staging/brcm80211/brcmsmac/d11.h b/drivers/staging/brcm80211/brcmsmac/d11.h index 1f05e8a..ed51616 100644 --- a/drivers/staging/brcm80211/brcmsmac/d11.h +++ b/drivers/staging/brcm80211/brcmsmac/d11.h @@ -1407,23 +1407,6 @@ struct d11rxhdr { u16 RxStatus2; u16 RxTSFTime; u16 RxChan; -}; - -/* - * rxhdr: received frame header data - * rssi: rssi computed by PHY - * rxpwr0: obsoleted, place holder for legacy ROM code. use rxpwr[] - * rxpwr1: obsoleted, place holder for legacy ROM code. use rxpwr[] - * do_rssi_ma: do per-pkt sampling for per-antenna ma in HIGH - * rxpwr: rssi for supported antennas - */ -struct brcms_d11rxhdr { - struct d11rxhdr rxh_cpu; - s8 rssi; - s8 rxpwr0; - s8 rxpwr1; - s8 do_rssi_ma; - s8 rxpwr[WL_RSSI_ANT_MAX]; } __packed; /* PhyRxStatus_0: */ diff --git a/drivers/staging/brcm80211/brcmsmac/main.c b/drivers/staging/brcm80211/brcmsmac/main.c index bdc0611..4f79a42 100644 --- a/drivers/staging/brcm80211/brcmsmac/main.c +++ b/drivers/staging/brcm80211/brcmsmac/main.c @@ -783,7 +783,6 @@ brcms_b_recv(struct brcms_hardware *wlc_hw, uint fifo, bool bound) struct sk_buff *tail = NULL; uint n = 0; uint bound_limit = bound ? RXBND : -1; - struct brcms_d11rxhdr *wlc_rxhdr = NULL; BCMMSG(wlc_hw->wlc->wiphy, "wl%d\n", wlc_hw->unit); /* gather received frames */ @@ -813,7 +812,6 @@ brcms_b_recv(struct brcms_hardware *wlc_hw, uint fifo, bool bound) rxh_le = (struct d11rxhdr_le *)p->data; rxh = (struct d11rxhdr *)p->data; - wlc_rxhdr = (struct brcms_d11rxhdr *) p->data; /* fixup rx header endianness */ rxh->RxFrameSize = le16_to_cpu(rxh_le->RxFrameSize); @@ -8117,7 +8115,7 @@ brcms_b_read_tsf(struct brcms_hardware *wlc_hw, u32 *tsf_l_ptr, * are used. Finally, the tsf_h is read from the tsf register. */ static u64 brcms_c_recover_tsf64(struct brcms_c_info *wlc, - struct brcms_d11rxhdr *rxh) + struct d11rxhdr *rxh) { u32 tsf_h, tsf_l; u16 rx_tsf_0_15, rx_tsf_16_31; @@ -8125,7 +8123,7 @@ static u64 brcms_c_recover_tsf64(struct brcms_c_info *wlc, brcms_b_read_tsf(wlc->hw, &tsf_l, &tsf_h); rx_tsf_16_31 = (u16)(tsf_l >> 16); - rx_tsf_0_15 = rxh->rxh_cpu.RxTSFTime; + rx_tsf_0_15 = rxh->RxTSFTime; /* * a greater tsf time indicates the low 16 bits of @@ -8145,14 +8143,13 @@ prep_mac80211_status(struct brcms_c_info *wlc, struct d11rxhdr *rxh, struct sk_buff *p, struct ieee80211_rx_status *rx_status) { - struct brcms_d11rxhdr *wlc_rxh = (struct brcms_d11rxhdr *) rxh; int preamble; int channel; u32 rspec; unsigned char *plcp; /* fill in TSF and flag its presence */ - rx_status->mactime = brcms_c_recover_tsf64(wlc, wlc_rxh); + rx_status->mactime = brcms_c_recover_tsf64(wlc, rxh); rx_status->flag |= RX_FLAG_MACTIME_MPDU; channel = BRCMS_CHAN_CHANNEL(rxh->RxChan); diff --git a/drivers/staging/brcm80211/brcmsmac/types.h b/drivers/staging/brcm80211/brcmsmac/types.h index 415ab8b..23969fe 100644 --- a/drivers/staging/brcm80211/brcmsmac/types.h +++ b/drivers/staging/brcm80211/brcmsmac/types.h @@ -336,7 +336,6 @@ struct dma_pub; struct si_pub; struct tx_status; struct d11rxhdr; -struct brcms_d11rxhdr; struct txpwr_limits; /* iovar structure */ |