diff options
author | Kalle Valo <kalle.valo@nokia.com> | 2009-06-12 15:14:19 +0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-07-10 22:57:41 +0400 |
commit | ff25839bf0c99e828c26864a24417a36a6b6a31e (patch) | |
tree | e5891ed357f4285f788056e270df7664b4d5aa13 /drivers/net/wireless/wl12xx/rx.c | |
parent | c4f9f16b309b65f9f578ec4ba78b3efa106cf65d (diff) | |
download | linux-ff25839bf0c99e828c26864a24417a36a6b6a31e.tar.xz |
wl12xx: cmd and acx interface rework
Rework cmd and acx interfaces, it was just too confusing earlier. Now
all commands need to contain all the needed headers, either just cmd
headers or both cmd and acx headers. This accomplish to remove the
extra copy done for each command. The interfaces are now properly
documented as well.
Also try to make all commands safe for DMA transfers. I might have missed
some, but most of them should be fixed now.
And this is not all! As a free bonus you will also get some cosmetic
cleanups and code reorganisation. Order today!
Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/wl12xx/rx.c')
-rw-r--r-- | drivers/net/wireless/wl12xx/rx.c | 27 |
1 files changed, 6 insertions, 21 deletions
diff --git a/drivers/net/wireless/wl12xx/rx.c b/drivers/net/wireless/wl12xx/rx.c index 981ea259eb89..5fd916a0b254 100644 --- a/drivers/net/wireless/wl12xx/rx.c +++ b/drivers/net/wireless/wl12xx/rx.c @@ -48,6 +48,9 @@ static void wl12xx_rx_status(struct wl12xx *wl, struct ieee80211_rx_status *status, u8 beacon) { + u64 mactime; + int ret; + memset(status, 0, sizeof(struct ieee80211_rx_status)); status->band = IEEE80211_BAND_2GHZ; @@ -62,27 +65,9 @@ static void wl12xx_rx_status(struct wl12xx *wl, * this one must be atomic, while our SPI routines can sleep. */ if ((wl->bss_type == BSS_TYPE_IBSS) && beacon) { - u64 mactime; - int ret; - struct wl12xx_command cmd; - struct acx_tsf_info *tsf_info; - - memset(&cmd, 0, sizeof(cmd)); - - ret = wl12xx_cmd_interrogate(wl, ACX_TSF_INFO, - sizeof(struct acx_tsf_info), - &cmd); - if (ret < 0) { - wl12xx_warning("ACX_FW_REV interrogate failed"); - return; - } - - tsf_info = (struct acx_tsf_info *)&(cmd.parameters); - - mactime = tsf_info->current_tsf_lsb | - (tsf_info->current_tsf_msb << 31); - - status->mactime = mactime; + ret = wl12xx_acx_tsf_info(wl, &mactime); + if (ret == 0) + status->mactime = mactime; } status->signal = desc->rssi; |