aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/b43
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/b43')
-rw-r--r--drivers/net/wireless/b43/main.c33
1 files changed, 22 insertions, 11 deletions
diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c
index cbb317bb3484..f9c14c66434e 100644
--- a/drivers/net/wireless/b43/main.c
+++ b/drivers/net/wireless/b43/main.c
@@ -1430,11 +1430,17 @@ static void b43_write_beacon_template(struct b43_wldev *dev,
1430 i += ie_len + 2; 1430 i += ie_len + 2;
1431 } 1431 }
1432 if (!tim_found) { 1432 if (!tim_found) {
1433 b43warn(dev->wl, "Did not find a valid TIM IE in " 1433 /*
1434 "the beacon template packet. AP or IBSS operation " 1434 * If ucode wants to modify TIM do it behind the beacon, this
1435 "may be broken.\n"); 1435 * will happen, for example, when doing mesh networking.
1436 } else 1436 */
1437 b43dbg(dev->wl, "Updated beacon template\n"); 1437 b43_shm_write16(dev, B43_SHM_SHARED,
1438 B43_SHM_SH_TIMBPOS,
1439 len + sizeof(struct b43_plcp_hdr6));
1440 b43_shm_write16(dev, B43_SHM_SHARED,
1441 B43_SHM_SH_DTIMPER, 0);
1442 }
1443 b43dbg(dev->wl, "Updated beacon template at 0x%x\n", ram_offset);
1438} 1444}
1439 1445
1440static void b43_write_probe_resp_plcp(struct b43_wldev *dev, 1446static void b43_write_probe_resp_plcp(struct b43_wldev *dev,
@@ -1549,7 +1555,8 @@ static void handle_irq_beacon(struct b43_wldev *dev)
1549 struct b43_wl *wl = dev->wl; 1555 struct b43_wl *wl = dev->wl;
1550 u32 cmd, beacon0_valid, beacon1_valid; 1556 u32 cmd, beacon0_valid, beacon1_valid;
1551 1557
1552 if (!b43_is_mode(wl, IEEE80211_IF_TYPE_AP)) 1558 if (!b43_is_mode(wl, IEEE80211_IF_TYPE_AP) &&
1559 !b43_is_mode(wl, IEEE80211_IF_TYPE_MESH_POINT))
1553 return; 1560 return;
1554 1561
1555 /* This is the bottom half of the asynchronous beacon update. */ 1562 /* This is the bottom half of the asynchronous beacon update. */
@@ -2491,7 +2498,8 @@ static void b43_adjust_opmode(struct b43_wldev *dev)
2491 ctl &= ~B43_MACCTL_BEACPROMISC; 2498 ctl &= ~B43_MACCTL_BEACPROMISC;
2492 ctl |= B43_MACCTL_INFRA; 2499 ctl |= B43_MACCTL_INFRA;
2493 2500
2494 if (b43_is_mode(wl, IEEE80211_IF_TYPE_AP)) 2501 if (b43_is_mode(wl, IEEE80211_IF_TYPE_AP) ||
2502 b43_is_mode(wl, IEEE80211_IF_TYPE_MESH_POINT))
2495 ctl |= B43_MACCTL_AP; 2503 ctl |= B43_MACCTL_AP;
2496 else if (b43_is_mode(wl, IEEE80211_IF_TYPE_IBSS)) 2504 else if (b43_is_mode(wl, IEEE80211_IF_TYPE_IBSS))
2497 ctl &= ~B43_MACCTL_INFRA; 2505 ctl &= ~B43_MACCTL_INFRA;
@@ -3358,8 +3366,9 @@ static int b43_op_config(struct ieee80211_hw *hw, struct ieee80211_conf *conf)
3358 antenna = b43_antenna_from_ieee80211(dev, conf->antenna_sel_rx); 3366 antenna = b43_antenna_from_ieee80211(dev, conf->antenna_sel_rx);
3359 b43_set_rx_antenna(dev, antenna); 3367 b43_set_rx_antenna(dev, antenna);
3360 3368
3361 /* Update templates for AP mode. */ 3369 /* Update templates for AP/mesh mode. */
3362 if (b43_is_mode(wl, IEEE80211_IF_TYPE_AP)) 3370 if (b43_is_mode(wl, IEEE80211_IF_TYPE_AP) ||
3371 b43_is_mode(wl, IEEE80211_IF_TYPE_MESH_POINT))
3363 b43_set_beacon_int(dev, conf->beacon_int); 3372 b43_set_beacon_int(dev, conf->beacon_int);
3364 3373
3365 if (!!conf->radio_enabled != phy->radio_on) { 3374 if (!!conf->radio_enabled != phy->radio_on) {
@@ -3547,8 +3556,9 @@ static int b43_op_config_interface(struct ieee80211_hw *hw,
3547 else 3556 else
3548 memset(wl->bssid, 0, ETH_ALEN); 3557 memset(wl->bssid, 0, ETH_ALEN);
3549 if (b43_status(dev) >= B43_STAT_INITIALIZED) { 3558 if (b43_status(dev) >= B43_STAT_INITIALIZED) {
3550 if (b43_is_mode(wl, IEEE80211_IF_TYPE_AP)) { 3559 if (b43_is_mode(wl, IEEE80211_IF_TYPE_AP) ||
3551 B43_WARN_ON(conf->type != IEEE80211_IF_TYPE_AP); 3560 b43_is_mode(wl, IEEE80211_IF_TYPE_MESH_POINT)) {
3561 B43_WARN_ON(conf->type != wl->if_type);
3552 b43_set_ssid(dev, conf->ssid, conf->ssid_len); 3562 b43_set_ssid(dev, conf->ssid, conf->ssid_len);
3553 if (conf->beacon) 3563 if (conf->beacon)
3554 b43_update_templates(wl, conf->beacon); 3564 b43_update_templates(wl, conf->beacon);
@@ -4088,6 +4098,7 @@ static int b43_op_add_interface(struct ieee80211_hw *hw,
4088 /* TODO: allow WDS/AP devices to coexist */ 4098 /* TODO: allow WDS/AP devices to coexist */
4089 4099
4090 if (conf->type != IEEE80211_IF_TYPE_AP && 4100 if (conf->type != IEEE80211_IF_TYPE_AP &&
4101 conf->type != IEEE80211_IF_TYPE_MESH_POINT &&
4091 conf->type != IEEE80211_IF_TYPE_STA && 4102 conf->type != IEEE80211_IF_TYPE_STA &&
4092 conf->type != IEEE80211_IF_TYPE_WDS && 4103 conf->type != IEEE80211_IF_TYPE_WDS &&
4093 conf->type != IEEE80211_IF_TYPE_IBSS) 4104 conf->type != IEEE80211_IF_TYPE_IBSS)