diff options
Diffstat (limited to 'net/mac80211/mlme.c')
-rw-r--r-- | net/mac80211/mlme.c | 34 |
1 files changed, 33 insertions, 1 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 4a3bddd206d8..37ea04f5bab9 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c | |||
@@ -366,8 +366,10 @@ static u32 ieee80211_handle_protect_preamb(struct ieee80211_sub_if_data *sdata, | |||
366 | bool use_short_preamble) | 366 | bool use_short_preamble) |
367 | { | 367 | { |
368 | struct ieee80211_bss_conf *bss_conf = &sdata->bss_conf; | 368 | struct ieee80211_bss_conf *bss_conf = &sdata->bss_conf; |
369 | #ifdef CONFIG_MAC80211_VERBOSE_DEBUG | ||
369 | struct ieee80211_if_sta *ifsta = &sdata->u.sta; | 370 | struct ieee80211_if_sta *ifsta = &sdata->u.sta; |
370 | DECLARE_MAC_BUF(mac); | 371 | DECLARE_MAC_BUF(mac); |
372 | #endif | ||
371 | u32 changed = 0; | 373 | u32 changed = 0; |
372 | 374 | ||
373 | if (use_protection != bss_conf->use_cts_prot) { | 375 | if (use_protection != bss_conf->use_cts_prot) { |
@@ -571,7 +573,7 @@ static void ieee80211_set_associated(struct net_device *dev, | |||
571 | ieee80211_sta_tear_down_BA_sessions(dev, ifsta->bssid); | 573 | ieee80211_sta_tear_down_BA_sessions(dev, ifsta->bssid); |
572 | ifsta->flags &= ~IEEE80211_STA_ASSOCIATED; | 574 | ifsta->flags &= ~IEEE80211_STA_ASSOCIATED; |
573 | netif_carrier_off(dev); | 575 | netif_carrier_off(dev); |
574 | ieee80211_reset_erp_info(dev); | 576 | changed |= ieee80211_reset_erp_info(dev); |
575 | 577 | ||
576 | sdata->bss_conf.assoc_ht = 0; | 578 | sdata->bss_conf.assoc_ht = 0; |
577 | sdata->bss_conf.ht_conf = NULL; | 579 | sdata->bss_conf.ht_conf = NULL; |
@@ -1536,6 +1538,35 @@ void ieee80211_send_delba(struct net_device *dev, const u8 *da, u16 tid, | |||
1536 | ieee80211_sta_tx(dev, skb, 0); | 1538 | ieee80211_sta_tx(dev, skb, 0); |
1537 | } | 1539 | } |
1538 | 1540 | ||
1541 | void ieee80211_send_bar(struct net_device *dev, u8 *ra, u16 tid, u16 ssn) | ||
1542 | { | ||
1543 | struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr); | ||
1544 | struct sk_buff *skb; | ||
1545 | struct ieee80211_bar *bar; | ||
1546 | u16 bar_control = 0; | ||
1547 | |||
1548 | skb = dev_alloc_skb(sizeof(*bar) + local->hw.extra_tx_headroom); | ||
1549 | if (!skb) { | ||
1550 | printk(KERN_ERR "%s: failed to allocate buffer for " | ||
1551 | "bar frame\n", dev->name); | ||
1552 | return; | ||
1553 | } | ||
1554 | skb_reserve(skb, local->hw.extra_tx_headroom); | ||
1555 | bar = (struct ieee80211_bar *)skb_put(skb, sizeof(*bar)); | ||
1556 | memset(bar, 0, sizeof(*bar)); | ||
1557 | bar->frame_control = IEEE80211_FC(IEEE80211_FTYPE_CTL, | ||
1558 | IEEE80211_STYPE_BACK_REQ); | ||
1559 | memcpy(bar->ra, ra, ETH_ALEN); | ||
1560 | memcpy(bar->ta, dev->dev_addr, ETH_ALEN); | ||
1561 | bar_control |= (u16)IEEE80211_BAR_CTRL_ACK_POLICY_NORMAL; | ||
1562 | bar_control |= (u16)IEEE80211_BAR_CTRL_CBMTID_COMPRESSED_BA; | ||
1563 | bar_control |= (u16)(tid << 12); | ||
1564 | bar->control = cpu_to_le16(bar_control); | ||
1565 | bar->start_seq_num = cpu_to_le16(ssn); | ||
1566 | |||
1567 | ieee80211_sta_tx(dev, skb, 0); | ||
1568 | } | ||
1569 | |||
1539 | void ieee80211_sta_stop_rx_ba_session(struct net_device *dev, u8 *ra, u16 tid, | 1570 | void ieee80211_sta_stop_rx_ba_session(struct net_device *dev, u8 *ra, u16 tid, |
1540 | u16 initiator, u16 reason) | 1571 | u16 initiator, u16 reason) |
1541 | { | 1572 | { |
@@ -2481,6 +2512,7 @@ static int ieee80211_sta_join_ibss(struct net_device *dev, | |||
2481 | control->flags |= IEEE80211_TX_CTL_SHORT_PREAMBLE; | 2512 | control->flags |= IEEE80211_TX_CTL_SHORT_PREAMBLE; |
2482 | control->antenna_sel_tx = local->hw.conf.antenna_sel_tx; | 2513 | control->antenna_sel_tx = local->hw.conf.antenna_sel_tx; |
2483 | control->flags |= IEEE80211_TX_CTL_NO_ACK; | 2514 | control->flags |= IEEE80211_TX_CTL_NO_ACK; |
2515 | control->flags |= IEEE80211_TX_CTL_DO_NOT_ENCRYPT; | ||
2484 | control->control.retry_limit = 1; | 2516 | control->control.retry_limit = 1; |
2485 | 2517 | ||
2486 | ifsta->probe_resp = skb_copy(skb, GFP_ATOMIC); | 2518 | ifsta->probe_resp = skb_copy(skb, GFP_ATOMIC); |