aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/wireless/zd1211rw/zd_usb.c
diff options
context:
space:
mode:
authorLuis Carlos Cobo <luisca@cozybit.com>2008-03-03 12:32:15 -0800
committerJohn W. Linville <linville@tuxdriver.com>2008-03-06 17:19:47 -0500
commit72e77a8a7921d952bdef2468d9315616eca6b464 (patch)
tree752dfd038edb0a76257eda3b7e04db74ecfe1a7e /drivers/net/wireless/zd1211rw/zd_usb.c
parentf137e05468f2a648aba11377dc824d788683dff4 (diff)
zd1211rw: support for mesh interface and beaconing
The previously unused CR_CAM_MODE register is set to MODE_AP_WDS. This makes the driver ack mesh (WDS) frames. It does not affect Infra functionality of the driver. Previously missing beaconing support has been added. This might also help implement a currently missing ah-hoc mode. Support for interrupts from the device have been added, but we are not handling most of them. Mesh interfaces are considered associated as long as the interface is up. Signed-off-by: Luis Carlos Cobo <luisca@cozybit.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/zd1211rw/zd_usb.c')
-rw-r--r--drivers/net/wireless/zd1211rw/zd_usb.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/net/wireless/zd1211rw/zd_usb.c b/drivers/net/wireless/zd1211rw/zd_usb.c
index 7942b15acfe..e34675c2f8f 100644
--- a/drivers/net/wireless/zd1211rw/zd_usb.c
+++ b/drivers/net/wireless/zd1211rw/zd_usb.c
@@ -97,6 +97,7 @@ MODULE_DEVICE_TABLE(usb, usb_ids);
#define FW_ZD1211B_PREFIX "zd1211/zd1211b_"
/* USB device initialization */
+static void int_urb_complete(struct urb *urb);
static int request_fw_file(
const struct firmware **fw, const char *name, struct device *device)
@@ -336,11 +337,18 @@ static inline void handle_regs_int(struct urb *urb)
struct zd_usb *usb = urb->context;
struct zd_usb_interrupt *intr = &usb->intr;
int len;
+ u16 int_num;
ZD_ASSERT(in_interrupt());
spin_lock(&intr->lock);
- if (intr->read_regs_enabled) {
+ int_num = le16_to_cpu(*(u16 *)(urb->transfer_buffer+2));
+ if (int_num == CR_INTERRUPT) {
+ struct zd_mac *mac = zd_hw_mac(zd_usb_to_hw(urb->context));
+ memcpy(&mac->intr_buffer, urb->transfer_buffer,
+ USB_MAX_EP_INT_BUFFER);
+ schedule_work(&mac->process_intr);
+ } else if (intr->read_regs_enabled) {
intr->read_regs.length = len = urb->actual_length;
if (len > sizeof(intr->read_regs.buffer))
@@ -351,7 +359,6 @@ static inline void handle_regs_int(struct urb *urb)
goto out;
}
- dev_dbg_f(urb_dev(urb), "regs interrupt ignored\n");
out:
spin_unlock(&intr->lock);
}