summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ar9170/mac.c
diff options
context:
space:
mode:
authorJoerg Albert <jal2@gmx.de>2009-08-21 23:25:07 +0200
committerJohn W. Linville <linville@tuxdriver.com>2009-08-28 14:40:41 -0400
commitea39d1a4027cca99cc75126f574633c3b72da04a (patch)
treea6b831d1a6568aca80c4b91ba8b7a8802f11bace /drivers/net/wireless/ath/ar9170/mac.c
parenta0bf797ff10cdbc15e8abe1309e7ab397f61691f (diff)
ar9170: cleanup of bss_info_changed and beacon config
Add beacon control by BSS_CHANGED_BEACON_ENABLED and bss_conf->enable_beacon from mac80211. Signed-off-by: Joerg Albert <jal2@gmx.de> Signed-off-by: Christian Lamparter <chunkeey@web.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ar9170/mac.c')
-rw-r--r--drivers/net/wireless/ath/ar9170/mac.c24
1 files changed, 13 insertions, 11 deletions
diff --git a/drivers/net/wireless/ath/ar9170/mac.c b/drivers/net/wireless/ath/ar9170/mac.c
index 60049366e86..614e3218a2b 100644
--- a/drivers/net/wireless/ath/ar9170/mac.c
+++ b/drivers/net/wireless/ath/ar9170/mac.c
@@ -383,24 +383,26 @@ int ar9170_set_beacon_timers(struct ar9170 *ar)
if (ar->vif) {
v |= ar->vif->bss_conf.beacon_int;
- switch (ar->vif->type) {
- case NL80211_IFTYPE_MESH_POINT:
- case NL80211_IFTYPE_ADHOC:
- v |= BIT(25);
- break;
- case NL80211_IFTYPE_AP:
- v |= BIT(24);
- pretbtt = (ar->vif->bss_conf.beacon_int - 6) << 16;
- break;
- default:
+ if (ar->enable_beacon) {
+ switch (ar->vif->type) {
+ case NL80211_IFTYPE_MESH_POINT:
+ case NL80211_IFTYPE_ADHOC:
+ v |= BIT(25);
+ break;
+ case NL80211_IFTYPE_AP:
+ v |= BIT(24);
+ pretbtt = (ar->vif->bss_conf.beacon_int - 6) <<
+ 16;
+ break;
+ default:
break;
+ }
}
v |= ar->vif->bss_conf.dtim_period << 16;
}
ar9170_regwrite_begin(ar);
-
ar9170_regwrite(AR9170_MAC_REG_PRETBTT, pretbtt);
ar9170_regwrite(AR9170_MAC_REG_BCN_PERIOD, v);
ar9170_regwrite_finish();