Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 135108
b: refs/heads/master
c: 18eb62f
h: refs/heads/master
v: v3
  • Loading branch information
Jouni Malinen authored and John W. Linville committed Mar 5, 2009
1 parent cfc145d commit 1d783e7
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 2 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: 465ca84d95deeab37b7c3b10b2cb96b3fa07a891
refs/heads/master: 18eb62f87a8d1dc6ed8a01a52e6b2b1600802608
2 changes: 2 additions & 0 deletions trunk/drivers/net/wireless/ath9k/ath9k.h
Original file line number Diff line number Diff line change
Expand Up @@ -710,5 +710,7 @@ int ath9k_wiphy_unpause(struct ath_wiphy *aphy);
int ath9k_wiphy_select(struct ath_wiphy *aphy);
void ath9k_wiphy_chan_work(struct work_struct *work);
bool ath9k_wiphy_started(struct ath_softc *sc);
void ath9k_wiphy_pause_all_forced(struct ath_softc *sc,
struct ath_wiphy *selected);

#endif /* ATH9K_H */
8 changes: 7 additions & 1 deletion trunk/drivers/net/wireless/ath9k/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2343,7 +2343,13 @@ static int ath9k_config(struct ieee80211_hw *hw, u32 changed)
aphy->chan_is_ht = conf_is_ht(conf);

/* TODO: do not change operation channel immediately if there
* are other virtual wiphys that use another channel */
* are other virtual wiphys that use another channel. For now,
* we do the change immediately to allow mac80211-operated scan
* to work. Once the scan operation is moved into ath9k, we can
* just move the current aphy in PAUSED state if the channel is
* changed into something different from the current operation
* channel. */
ath9k_wiphy_pause_all_forced(sc, aphy);

DPRINTF(sc, ATH_DBG_CONFIG, "Set channel: %d MHz\n",
curchan->center_freq);
Expand Down
24 changes: 24 additions & 0 deletions trunk/drivers/net/wireless/ath9k/virtual.c
Original file line number Diff line number Diff line change
Expand Up @@ -496,3 +496,27 @@ bool ath9k_wiphy_started(struct ath_softc *sc)
spin_unlock_bh(&sc->wiphy_lock);
return false;
}

static void ath9k_wiphy_pause_chan(struct ath_wiphy *aphy,
struct ath_wiphy *selected)
{
if (aphy->chan_idx == selected->chan_idx)
return;
aphy->state = ATH_WIPHY_PAUSED;
ieee80211_stop_queues(aphy->hw);
}

void ath9k_wiphy_pause_all_forced(struct ath_softc *sc,
struct ath_wiphy *selected)
{
int i;
spin_lock_bh(&sc->wiphy_lock);
if (sc->pri_wiphy->state == ATH_WIPHY_ACTIVE)
ath9k_wiphy_pause_chan(sc->pri_wiphy, selected);
for (i = 0; i < sc->num_sec_wiphy; i++) {
if (sc->sec_wiphy[i] &&
sc->sec_wiphy[i]->state == ATH_WIPHY_ACTIVE)
ath9k_wiphy_pause_chan(sc->sec_wiphy[i], selected);
}
spin_unlock_bh(&sc->wiphy_lock);
}

0 comments on commit 1d783e7

Please sign in to comment.