aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/mlme.c
diff options
context:
space:
mode:
authorRon Rindjunsky <ron.rindjunsky@intel.com>2008-07-01 07:16:03 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-07-08 10:21:34 -0400
commit429a380571a6e6b8525b93161544eafc9b227e44 (patch)
treea90ad1cba6ea557ace90a74ea02af9d5bcad36c1 /net/mac80211/mlme.c
parentb2898a27809f54a33050a70d0eaa4a78194163a0 (diff)
mac80211: add block ack request capability
This patch adds block ack request capability Signed-off-by: Ester Kummer <ester.kummer@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com> Acked-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/mlme.c')
-rw-r--r--net/mac80211/mlme.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 86abdf96390c..e080482b63cd 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -1536,6 +1536,35 @@ void ieee80211_send_delba(struct net_device *dev, const u8 *da, u16 tid,
1536 ieee80211_sta_tx(dev, skb, 0); 1536 ieee80211_sta_tx(dev, skb, 0);
1537} 1537}
1538 1538
1539void ieee80211_send_bar(struct net_device *dev, u8 *ra, u16 tid, u16 ssn)
1540{
1541 struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
1542 struct sk_buff *skb;
1543 struct ieee80211_bar *bar;
1544 u16 bar_control = 0;
1545
1546 skb = dev_alloc_skb(sizeof(*bar) + local->hw.extra_tx_headroom);
1547 if (!skb) {
1548 printk(KERN_ERR "%s: failed to allocate buffer for "
1549 "bar frame\n", dev->name);
1550 return;
1551 }
1552 skb_reserve(skb, local->hw.extra_tx_headroom);
1553 bar = (struct ieee80211_bar *)skb_put(skb, sizeof(*bar));
1554 memset(bar, 0, sizeof(*bar));
1555 bar->frame_control = IEEE80211_FC(IEEE80211_FTYPE_CTL,
1556 IEEE80211_STYPE_BACK_REQ);
1557 memcpy(bar->ra, ra, ETH_ALEN);
1558 memcpy(bar->ta, dev->dev_addr, ETH_ALEN);
1559 bar_control |= (u16)IEEE80211_BAR_CTRL_ACK_POLICY_NORMAL;
1560 bar_control |= (u16)IEEE80211_BAR_CTRL_CBMTID_COMPRESSED_BA;
1561 bar_control |= (u16)(tid << 12);
1562 bar->control = cpu_to_le16(bar_control);
1563 bar->start_seq_num = cpu_to_le16(ssn);
1564
1565 ieee80211_sta_tx(dev, skb, 0);
1566}
1567
1539void ieee80211_sta_stop_rx_ba_session(struct net_device *dev, u8 *ra, u16 tid, 1568void ieee80211_sta_stop_rx_ba_session(struct net_device *dev, u8 *ra, u16 tid,
1540 u16 initiator, u16 reason) 1569 u16 initiator, u16 reason)
1541{ 1570{