aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ar9170
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2009-04-23 10:13:26 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-05-06 15:14:36 -0400
commit2d0ddec5b2b859f06116f631fc0ffe94fbceb556 (patch)
tree9bf3cdfcbbefcb34f5984e6d797f488ebe358196 /drivers/net/wireless/ath/ar9170
parent57c4d7b4c4986037be51476b8e3025d5ba18d8b8 (diff)
mac80211: unify config_interface and bss_info_changed
The config_interface method is a little strange, it contains the BSSID and beacon updates, while bss_info_changed contains most other BSS information for each interface. This patch removes config_interface and rolls all the information it previously passed to drivers into bss_info_changed. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ar9170')
-rw-r--r--drivers/net/wireless/ath/ar9170/main.c39
1 files changed, 11 insertions, 28 deletions
diff --git a/drivers/net/wireless/ath/ar9170/main.c b/drivers/net/wireless/ath/ar9170/main.c
index 49c729bc7147..3bd3a61225ce 100644
--- a/drivers/net/wireless/ath/ar9170/main.c
+++ b/drivers/net/wireless/ath/ar9170/main.c
@@ -1360,33 +1360,6 @@ out:
1360 return err; 1360 return err;
1361} 1361}
1362 1362
1363static int ar9170_op_config_interface(struct ieee80211_hw *hw,
1364 struct ieee80211_vif *vif,
1365 struct ieee80211_if_conf *conf)
1366{
1367 struct ar9170 *ar = hw->priv;
1368 int err = 0;
1369
1370 mutex_lock(&ar->mutex);
1371
1372 if (conf->changed & IEEE80211_IFCC_BSSID) {
1373 memcpy(ar->bssid, conf->bssid, ETH_ALEN);
1374 err = ar9170_set_operating_mode(ar);
1375 }
1376
1377 if (conf->changed & IEEE80211_IFCC_BEACON) {
1378 err = ar9170_update_beacon(ar);
1379
1380 if (err)
1381 goto out;
1382 err = ar9170_set_beacon_timers(ar);
1383 }
1384
1385out:
1386 mutex_unlock(&ar->mutex);
1387 return err;
1388}
1389
1390static void ar9170_set_filters(struct work_struct *work) 1363static void ar9170_set_filters(struct work_struct *work)
1391{ 1364{
1392 struct ar9170 *ar = container_of(work, struct ar9170, 1365 struct ar9170 *ar = container_of(work, struct ar9170,
@@ -1488,6 +1461,17 @@ static void ar9170_op_bss_info_changed(struct ieee80211_hw *hw,
1488 1461
1489 mutex_lock(&ar->mutex); 1462 mutex_lock(&ar->mutex);
1490 1463
1464 if (changed & BSS_CHANGED_BSSID) {
1465 memcpy(ar->bssid, bss_conf->bssid, ETH_ALEN);
1466 err = ar9170_set_operating_mode(ar);
1467 }
1468
1469 if (changed & (BSS_CHANGED_BEACON | BSS_CHANGED_BEACON_ENABLED)) {
1470 err = ar9170_update_beacon(ar);
1471 if (!err)
1472 ar9170_set_beacon_timers(ar);
1473 }
1474
1491 ar9170_regwrite_begin(ar); 1475 ar9170_regwrite_begin(ar);
1492 1476
1493 if (changed & BSS_CHANGED_ASSOC) { 1477 if (changed & BSS_CHANGED_ASSOC) {
@@ -1796,7 +1780,6 @@ static const struct ieee80211_ops ar9170_ops = {
1796 .add_interface = ar9170_op_add_interface, 1780 .add_interface = ar9170_op_add_interface,
1797 .remove_interface = ar9170_op_remove_interface, 1781 .remove_interface = ar9170_op_remove_interface,
1798 .config = ar9170_op_config, 1782 .config = ar9170_op_config,
1799 .config_interface = ar9170_op_config_interface,
1800 .configure_filter = ar9170_op_configure_filter, 1783 .configure_filter = ar9170_op_configure_filter,
1801 .conf_tx = ar9170_conf_tx, 1784 .conf_tx = ar9170_conf_tx,
1802 .bss_info_changed = ar9170_op_bss_info_changed, 1785 .bss_info_changed = ar9170_op_bss_info_changed,