Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 237028
b: refs/heads/master
c: 5cf6cf8
h: refs/heads/master
v: v3
  • Loading branch information
Jussi Kivilinna authored and John W. Linville committed Feb 4, 2011
1 parent 86e7e35 commit 8696ba0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 26 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a6fb071bbf420841481e1c1bcdb65b3ffb33fc8a
refs/heads/master: 5cf6cf819bfffd89fc8c7c3a7406f54da4945a34
27 changes: 5 additions & 22 deletions trunk/drivers/net/wireless/zd1211rw/zd_mac.c
Original file line number Diff line number Diff line change
Expand Up @@ -998,20 +998,9 @@ static void zd_op_configure_filter(struct ieee80211_hw *hw,
* time. */
}

static void set_rts_cts_work(struct work_struct *work)
static void set_rts_cts(struct zd_mac *mac, unsigned int short_preamble)
{
struct zd_mac *mac =
container_of(work, struct zd_mac, set_rts_cts_work);
unsigned long flags;
unsigned int short_preamble;

mutex_lock(&mac->chip.mutex);

spin_lock_irqsave(&mac->lock, flags);
mac->updating_rts_rate = 0;
short_preamble = mac->short_preamble;
spin_unlock_irqrestore(&mac->lock, flags);

zd_chip_set_rts_cts_rate_locked(&mac->chip, short_preamble);
mutex_unlock(&mac->chip.mutex);
}
Expand All @@ -1022,7 +1011,6 @@ static void zd_op_bss_info_changed(struct ieee80211_hw *hw,
u32 changes)
{
struct zd_mac *mac = zd_hw_mac(hw);
unsigned long flags;
int associated;

dev_dbg_f(zd_mac_dev(mac), "changes: %x\n", changes);
Expand Down Expand Up @@ -1060,15 +1048,11 @@ static void zd_op_bss_info_changed(struct ieee80211_hw *hw,
/* TODO: do hardware bssid filtering */

if (changes & BSS_CHANGED_ERP_PREAMBLE) {
spin_lock_irqsave(&mac->lock, flags);
spin_lock_irq(&mac->lock);
mac->short_preamble = bss_conf->use_short_preamble;
if (!mac->updating_rts_rate) {
mac->updating_rts_rate = 1;
/* FIXME: should disable TX here, until work has
* completed and RTS_CTS reg is updated */
queue_work(zd_workqueue, &mac->set_rts_cts_work);
}
spin_unlock_irqrestore(&mac->lock, flags);
spin_unlock_irq(&mac->lock);

set_rts_cts(mac, bss_conf->use_short_preamble);
}
}

Expand Down Expand Up @@ -1142,7 +1126,6 @@ struct ieee80211_hw *zd_mac_alloc_hw(struct usb_interface *intf)

zd_chip_init(&mac->chip, hw, intf);
housekeeping_init(mac);
INIT_WORK(&mac->set_rts_cts_work, set_rts_cts_work);
INIT_WORK(&mac->process_intr, zd_process_intr);

SET_IEEE80211_DEV(hw, &intf->dev);
Expand Down
3 changes: 0 additions & 3 deletions trunk/drivers/net/wireless/zd1211rw/zd_mac.h
Original file line number Diff line number Diff line change
Expand Up @@ -189,9 +189,6 @@ struct zd_mac {
/* Short preamble (used for RTS/CTS) */
unsigned int short_preamble:1;

/* flags to indicate update in progress */
unsigned int updating_rts_rate:1;

/* whether to pass frames with CRC errors to stack */
unsigned int pass_failed_fcs:1;

Expand Down

0 comments on commit 8696ba0

Please sign in to comment.