Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 351798
b: refs/heads/master
c: 70277f4
h: refs/heads/master
v: v3
  • Loading branch information
Stanislaw Gruszka authored and John W. Linville committed Jan 7, 2013
1 parent 70e1dcc commit 605b2f5
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 93476b1e685036e8513be8df34ca442096af6b4c
refs/heads/master: 70277f47b58b174a6b0b891dcd06ae5125afb73b
1 change: 1 addition & 0 deletions trunk/drivers/net/wireless/iwlegacy/3945-mac.c
Original file line number Diff line number Diff line change
Expand Up @@ -3474,6 +3474,7 @@ struct ieee80211_ops il3945_mac_ops = {
.sta_add = il3945_mac_sta_add,
.sta_remove = il_mac_sta_remove,
.tx_last_beacon = il_mac_tx_last_beacon,
.flush = il_mac_flush,
};

static int
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/net/wireless/iwlegacy/4965-mac.c
Original file line number Diff line number Diff line change
Expand Up @@ -6308,6 +6308,7 @@ const struct ieee80211_ops il4965_mac_ops = {
.sta_remove = il_mac_sta_remove,
.channel_switch = il4965_mac_channel_switch,
.tx_last_beacon = il_mac_tx_last_beacon,
.flush = il_mac_flush,
};

static int
Expand Down
36 changes: 36 additions & 0 deletions trunk/drivers/net/wireless/iwlegacy/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -4707,6 +4707,42 @@ il_mac_change_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
}
EXPORT_SYMBOL(il_mac_change_interface);

void
il_mac_flush(struct ieee80211_hw *hw, bool drop)
{
struct il_priv *il = hw->priv;
unsigned long timeout = jiffies + msecs_to_jiffies(500);
int i;

mutex_lock(&il->mutex);
D_MAC80211("enter\n");

if (il->txq == NULL)
goto out;

for (i = 0; i < il->hw_params.max_txq_num; i++) {
struct il_queue *q;

if (i == il->cmd_queue)
continue;

q = &il->txq[i].q;
if (q->read_ptr == q->write_ptr)
continue;

if (time_after(jiffies, timeout)) {
IL_ERR("Failed to flush queue %d\n", q->id);
break;
}

msleep(20);
}
out:
D_MAC80211("leave\n");
mutex_unlock(&il->mutex);
}
EXPORT_SYMBOL(il_mac_flush);

/*
* On every watchdog tick we check (latest) time stamp. If it does not
* change during timeout period and queue is not empty we reset firmware.
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/net/wireless/iwlegacy/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -1723,6 +1723,7 @@ void il_mac_remove_interface(struct ieee80211_hw *hw,
struct ieee80211_vif *vif);
int il_mac_change_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
enum nl80211_iftype newtype, bool newp2p);
void il_mac_flush(struct ieee80211_hw *hw, bool drop);
int il_alloc_txq_mem(struct il_priv *il);
void il_free_txq_mem(struct il_priv *il);

Expand Down

0 comments on commit 605b2f5

Please sign in to comment.