ieee80211_proto.c (172058) | ieee80211_proto.c (172211) |
---|---|
1/*- 2 * Copyright (c) 2001 Atsushi Onoe 3 * Copyright (c) 2002-2007 Sam Leffler, Errno Consulting 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 11 unchanged lines hidden (view full) --- 20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 */ 26 27#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2001 Atsushi Onoe 3 * Copyright (c) 2002-2007 Sam Leffler, Errno Consulting 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 11 unchanged lines hidden (view full) --- 20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 */ 26 27#include <sys/cdefs.h> |
28__FBSDID("$FreeBSD: head/sys/net80211/ieee80211_proto.c 172058 2007-09-05 21:31:32Z sam $"); | 28__FBSDID("$FreeBSD: head/sys/net80211/ieee80211_proto.c 172211 2007-09-17 19:07:24Z sam $"); |
29 30/* 31 * IEEE 802.11 protocol support. 32 */ 33 34#include "opt_inet.h" 35 36#include <sys/param.h> --- 51 unchanged lines hidden (view full) --- 88 "WME_AC_BK", 89 "WME_AC_VI", 90 "WME_AC_VO", 91 "WME_UPSD", 92}; 93 94static int ieee80211_newstate(struct ieee80211com *, enum ieee80211_state, int); 95 | 29 30/* 31 * IEEE 802.11 protocol support. 32 */ 33 34#include "opt_inet.h" 35 36#include <sys/param.h> --- 51 unchanged lines hidden (view full) --- 88 "WME_AC_BK", 89 "WME_AC_VI", 90 "WME_AC_VO", 91 "WME_UPSD", 92}; 93 94static int ieee80211_newstate(struct ieee80211com *, enum ieee80211_state, int); 95 |
96static void 97null_update_beacon(struct ieee80211com *ic, int item) 98{ 99} 100 |
|
96void 97ieee80211_proto_attach(struct ieee80211com *ic) 98{ 99 struct ifnet *ifp = ic->ic_ifp; 100 101 /* XXX room for crypto */ 102 ifp->if_hdrlen = sizeof(struct ieee80211_qosframe_addr4); 103 --- 9 unchanged lines hidden (view full) --- 113 114 ic->ic_wme.wme_hipri_switch_hysteresis = 115 AGGRESSIVE_MODE_SWITCH_HYSTERESIS; 116 117 mtx_init(&ic->ic_mgtq.ifq_mtx, ifp->if_xname, "mgmt send q", MTX_DEF); 118 119 /* protocol state change handler */ 120 ic->ic_newstate = ieee80211_newstate; | 101void 102ieee80211_proto_attach(struct ieee80211com *ic) 103{ 104 struct ifnet *ifp = ic->ic_ifp; 105 106 /* XXX room for crypto */ 107 ifp->if_hdrlen = sizeof(struct ieee80211_qosframe_addr4); 108 --- 9 unchanged lines hidden (view full) --- 118 119 ic->ic_wme.wme_hipri_switch_hysteresis = 120 AGGRESSIVE_MODE_SWITCH_HYSTERESIS; 121 122 mtx_init(&ic->ic_mgtq.ifq_mtx, ifp->if_xname, "mgmt send q", MTX_DEF); 123 124 /* protocol state change handler */ 125 ic->ic_newstate = ieee80211_newstate; |
126 ic->ic_update_beacon = null_update_beacon; |
|
121 122 /* initialize management frame handlers */ 123 ic->ic_recv_mgmt = ieee80211_recv_mgmt; 124 ic->ic_send_mgmt = ieee80211_send_mgmt; 125 ic->ic_raw_xmit = ieee80211_raw_xmit; 126} 127 128void --- 725 unchanged lines hidden (view full) --- 854 } 855 if (ic->ic_opmode == IEEE80211_M_HOSTAP) { /* XXX ibss? */ 856 /* 857 * Arrange for a beacon update and bump the parameter 858 * set number so associated stations load the new values. 859 */ 860 wme->wme_bssChanParams.cap_info = 861 (wme->wme_bssChanParams.cap_info+1) & WME_QOSINFO_COUNT; | 127 128 /* initialize management frame handlers */ 129 ic->ic_recv_mgmt = ieee80211_recv_mgmt; 130 ic->ic_send_mgmt = ieee80211_send_mgmt; 131 ic->ic_raw_xmit = ieee80211_raw_xmit; 132} 133 134void --- 725 unchanged lines hidden (view full) --- 860 } 861 if (ic->ic_opmode == IEEE80211_M_HOSTAP) { /* XXX ibss? */ 862 /* 863 * Arrange for a beacon update and bump the parameter 864 * set number so associated stations load the new values. 865 */ 866 wme->wme_bssChanParams.cap_info = 867 (wme->wme_bssChanParams.cap_info+1) & WME_QOSINFO_COUNT; |
862 ic->ic_flags |= IEEE80211_F_WMEUPDATE; | 868 ieee80211_beacon_notify(ic, IEEE80211_BEACON_WME); |
863 } 864 865 wme->wme_update(ic); 866 867 IEEE80211_DPRINTF(ic, IEEE80211_MSG_WME, 868 "%s: WME params updated, cap_info 0x%x\n", __func__, 869 ic->ic_opmode == IEEE80211_M_STA ? 870 wme->wme_wmeChanParams.cap_info : --- 527 unchanged lines hidden --- | 869 } 870 871 wme->wme_update(ic); 872 873 IEEE80211_DPRINTF(ic, IEEE80211_MSG_WME, 874 "%s: WME params updated, cap_info 0x%x\n", __func__, 875 ic->ic_opmode == IEEE80211_M_STA ? 876 wme->wme_wmeChanParams.cap_info : --- 527 unchanged lines hidden --- |