1/*- 2 * Copyright (c) 2007-2008 Sam Leffler, Errno Consulting 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 11 unchanged lines hidden (view full) --- 20 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 21 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 */ 25 26#include <sys/cdefs.h> 27#ifdef __FreeBSD__ |
28__FBSDID("$FreeBSD: head/sys/net80211/ieee80211_ht.c 183250 2008-09-21 23:20:04Z sam $"); |
29#endif 30 31/* 32 * IEEE 802.11n protocol support. 33 */ 34 35#include "opt_inet.h" 36#include "opt_wlan.h" --- 1680 unchanged lines hidden (view full) --- 1717 IEEE80211_ACTION_BA_ADDBA_REQUEST, args); 1718} 1719 1720/* 1721 * Terminate an AMPDU tx stream. State is reclaimed 1722 * and the peer notified with a DelBA Action frame. 1723 */ 1724void |
1725ieee80211_ampdu_stop(struct ieee80211_node *ni, struct ieee80211_tx_ampdu *tap, 1726 int reason) |
1727{ 1728 struct ieee80211com *ic = ni->ni_ic; 1729 struct ieee80211vap *vap = ni->ni_vap; 1730 uint16_t args[4]; 1731 1732 /* XXX locking */ 1733 if (IEEE80211_AMPDU_RUNNING(tap)) { 1734 IEEE80211_NOTE(vap, IEEE80211_MSG_ACTION | IEEE80211_MSG_11N, |
1735 ni, "%s: stop BA stream for AC %d (reason %d)", 1736 __func__, tap->txa_ac, reason); |
1737 vap->iv_stats.is_ampdu_stop++; 1738 1739 ic->ic_addba_stop(ni, tap); 1740 args[0] = WME_AC_TO_TID(tap->txa_ac); 1741 args[1] = IEEE80211_DELBAPS_INIT; |
1742 args[2] = reason; /* XXX reason code */ |
1743 ieee80211_send_action(ni, IEEE80211_ACTION_CAT_BA, 1744 IEEE80211_ACTION_BA_DELBA, args); 1745 } else { 1746 IEEE80211_NOTE(vap, IEEE80211_MSG_ACTION | IEEE80211_MSG_11N, |
1747 ni, "%s: BA stream for AC %d not running (reason %d)", 1748 __func__, tap->txa_ac, reason); |
1749 vap->iv_stats.is_ampdu_stop_failed++; 1750 } 1751} 1752 1753/* 1754 * Transmit a BAR frame to the specified node. The 1755 * BAR contents are drawn from the supplied aggregation 1756 * state associated with the node. --- 432 unchanged lines hidden --- |