Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 327656
b: refs/heads/master
c: 57eebdf
h: refs/heads/master
v: v3
  • Loading branch information
Johannes Berg committed Aug 20, 2012
1 parent 1227b7d commit 543d5a3
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 19 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: 90bcf867ceef50155a1a14af4dc248061f6b8b94
refs/heads/master: 57eebdf3c28fe7134597acad529fc40f99b76601
34 changes: 16 additions & 18 deletions trunk/net/mac80211/mlme.c
Original file line number Diff line number Diff line change
Expand Up @@ -712,6 +712,7 @@ static void ieee80211_chswitch_work(struct work_struct *work)
/* XXX: shouldn't really modify cfg80211-owned data! */
ifmgd->associated->channel = sdata->local->oper_channel;

/* XXX: wait for a beacon first? */
ieee80211_wake_queues_by_reason(&sdata->local->hw,
IEEE80211_QUEUE_STOP_REASON_CSA);
out:
Expand Down Expand Up @@ -788,36 +789,33 @@ void ieee80211_sta_process_chanswitch(struct ieee80211_sub_if_data *sdata,

sdata->local->csa_channel = new_ch;

ifmgd->flags |= IEEE80211_STA_CSA_RECEIVED;

if (sw_elem->mode)
ieee80211_stop_queues_by_reason(&sdata->local->hw,
IEEE80211_QUEUE_STOP_REASON_CSA);

if (sdata->local->ops->channel_switch) {
/* use driver's channel switch callback */
struct ieee80211_channel_switch ch_switch;
memset(&ch_switch, 0, sizeof(ch_switch));
ch_switch.timestamp = timestamp;
if (sw_elem->mode) {
ch_switch.block_tx = true;
ieee80211_stop_queues_by_reason(&sdata->local->hw,
IEEE80211_QUEUE_STOP_REASON_CSA);
}
ch_switch.channel = new_ch;
ch_switch.count = sw_elem->count;
ifmgd->flags |= IEEE80211_STA_CSA_RECEIVED;
struct ieee80211_channel_switch ch_switch = {
.timestamp = timestamp,
.block_tx = sw_elem->mode,
.channel = new_ch,
.count = sw_elem->count,
};

drv_channel_switch(sdata->local, &ch_switch);
return;
}

/* channel switch handled in software */
if (sw_elem->count <= 1) {
if (sw_elem->count <= 1)
ieee80211_queue_work(&sdata->local->hw, &ifmgd->chswitch_work);
} else {
if (sw_elem->mode)
ieee80211_stop_queues_by_reason(&sdata->local->hw,
IEEE80211_QUEUE_STOP_REASON_CSA);
ifmgd->flags |= IEEE80211_STA_CSA_RECEIVED;
else
mod_timer(&ifmgd->chswitch_timer,
jiffies +
msecs_to_jiffies(sw_elem->count *
cbss->beacon_interval));
}
}

static void ieee80211_handle_pwr_constr(struct ieee80211_sub_if_data *sdata,
Expand Down

0 comments on commit 543d5a3

Please sign in to comment.