aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/wl12xx/rx.c
diff options
context:
space:
mode:
authorKalle Valo <kalle.valo@nokia.com>2009-06-12 07:14:19 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-07-10 14:57:41 -0400
commitff25839bf0c99e828c26864a24417a36a6b6a31e (patch)
treee5891ed357f4285f788056e270df7664b4d5aa13 /drivers/net/wireless/wl12xx/rx.c
parentc4f9f16b309b65f9f578ec4ba78b3efa106cf65d (diff)
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.c27
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,
48 struct ieee80211_rx_status *status, 48 struct ieee80211_rx_status *status,
49 u8 beacon) 49 u8 beacon)
50{ 50{
51 u64 mactime;
52 int ret;
53
51 memset(status, 0, sizeof(struct ieee80211_rx_status)); 54 memset(status, 0, sizeof(struct ieee80211_rx_status));
52 55
53 status->band = IEEE80211_BAND_2GHZ; 56 status->band = IEEE80211_BAND_2GHZ;
@@ -62,27 +65,9 @@ static void wl12xx_rx_status(struct wl12xx *wl,
62 * this one must be atomic, while our SPI routines can sleep. 65 * this one must be atomic, while our SPI routines can sleep.
63 */ 66 */
64 if ((wl->bss_type == BSS_TYPE_IBSS) && beacon) { 67 if ((wl->bss_type == BSS_TYPE_IBSS) && beacon) {
65 u64 mactime; 68 ret = wl12xx_acx_tsf_info(wl, &mactime);
66 int ret; 69 if (ret == 0)
67 struct wl12xx_command cmd; 70 status->mactime = mactime;
68 struct acx_tsf_info *tsf_info;
69
70 memset(&cmd, 0, sizeof(cmd));
71
72 ret = wl12xx_cmd_interrogate(wl, ACX_TSF_INFO,
73 sizeof(struct acx_tsf_info),
74 &cmd);
75 if (ret < 0) {
76 wl12xx_warning("ACX_FW_REV interrogate failed");
77 return;
78 }
79
80 tsf_info = (struct acx_tsf_info *)&(cmd.parameters);
81
82 mactime = tsf_info->current_tsf_lsb |
83 (tsf_info->current_tsf_msb << 31);
84
85 status->mactime = mactime;
86 } 71 }
87 72
88 status->signal = desc->rssi; 73 status->signal = desc->rssi;