ieee80211_sta.c (214894) | ieee80211_sta.c (218927) |
---|---|
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__ | 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_sta.c 214894 2010-11-06 18:17:20Z bschmidt $"); | 28__FBSDID("$FreeBSD: head/sys/net80211/ieee80211_sta.c 218927 2011-02-21 19:59:43Z bschmidt $"); |
29#endif 30 31/* 32 * IEEE 802.11 Station mode support. 33 */ 34#include "opt_inet.h" 35#include "opt_wlan.h" 36 --- 1676 unchanged lines hidden (view full) --- 1713 1714 IEEE80211_NOTE(vap, IEEE80211_MSG_ASSOC, ni, 1715 "recv disassociate (reason %d)", reason); 1716 ieee80211_new_state(vap, IEEE80211_S_ASSOC, 0); 1717 break; 1718 } 1719 1720 case IEEE80211_FC0_SUBTYPE_ACTION: | 29#endif 30 31/* 32 * IEEE 802.11 Station mode support. 33 */ 34#include "opt_inet.h" 35#include "opt_wlan.h" 36 --- 1676 unchanged lines hidden (view full) --- 1713 1714 IEEE80211_NOTE(vap, IEEE80211_MSG_ASSOC, ni, 1715 "recv disassociate (reason %d)", reason); 1716 ieee80211_new_state(vap, IEEE80211_S_ASSOC, 0); 1717 break; 1718 } 1719 1720 case IEEE80211_FC0_SUBTYPE_ACTION: |
1721 case IEEE80211_FC0_SUBTYPE_ACTION_NOACK: |
|
1721 if (vap->iv_state == IEEE80211_S_RUN) { 1722 if (ieee80211_parse_action(ni, m0) == 0) | 1722 if (vap->iv_state == IEEE80211_S_RUN) { 1723 if (ieee80211_parse_action(ni, m0) == 0) |
1723 ic->ic_recv_action(ni, wh, frm, efrm); 1724 } else | 1724 (void)ic->ic_recv_action(ni, wh, frm, efrm); 1725 } else { 1726 IEEE80211_DISCARD(vap, IEEE80211_MSG_INPUT, 1727 wh, NULL, "wrong state %s", 1728 ieee80211_state_name[vap->iv_state]); |
1725 vap->iv_stats.is_rx_mgtdiscard++; | 1729 vap->iv_stats.is_rx_mgtdiscard++; |
1730 } |
|
1726 break; 1727 | 1731 break; 1732 |
1728 case IEEE80211_FC0_SUBTYPE_PROBE_REQ: | |
1729 case IEEE80211_FC0_SUBTYPE_ASSOC_REQ: 1730 case IEEE80211_FC0_SUBTYPE_REASSOC_REQ: | 1733 case IEEE80211_FC0_SUBTYPE_ASSOC_REQ: 1734 case IEEE80211_FC0_SUBTYPE_REASSOC_REQ: |
1735 case IEEE80211_FC0_SUBTYPE_PROBE_REQ: 1736 case IEEE80211_FC0_SUBTYPE_ATIM: 1737 IEEE80211_DISCARD(vap, IEEE80211_MSG_INPUT, 1738 wh, NULL, "%s", "not handled"); |
|
1731 vap->iv_stats.is_rx_mgtdiscard++; | 1739 vap->iv_stats.is_rx_mgtdiscard++; |
1732 return; | 1740 break; 1741 |
1733 default: 1734 IEEE80211_DISCARD(vap, IEEE80211_MSG_ANY, | 1742 default: 1743 IEEE80211_DISCARD(vap, IEEE80211_MSG_ANY, |
1735 wh, "mgt", "subtype 0x%x not handled", subtype); | 1744 wh, "mgt", "subtype 0x%x not handled", subtype); |
1736 vap->iv_stats.is_rx_badsubtype++; 1737 break; 1738 } 1739#undef ISREASSOC 1740#undef ISPROBE 1741} 1742 1743static void 1744sta_recv_ctl(struct ieee80211_node *ni, struct mbuf *m, int subtype) 1745{ 1746 switch (subtype) { 1747 case IEEE80211_FC0_SUBTYPE_BAR: 1748 ieee80211_recv_bar(ni, m); 1749 break; 1750 } 1751} | 1745 vap->iv_stats.is_rx_badsubtype++; 1746 break; 1747 } 1748#undef ISREASSOC 1749#undef ISPROBE 1750} 1751 1752static void 1753sta_recv_ctl(struct ieee80211_node *ni, struct mbuf *m, int subtype) 1754{ 1755 switch (subtype) { 1756 case IEEE80211_FC0_SUBTYPE_BAR: 1757 ieee80211_recv_bar(ni, m); 1758 break; 1759 } 1760} |