ifieee80211.c (181198) | ifieee80211.c (181199) |
---|---|
1/* 2 * Copyright 2001 The Aerospace Corporation. All rights reserved. 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions 6 * are met: 7 * 1. Redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer. --- 10 unchanged lines hidden (view full) --- 19 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25 * SUCH DAMAGE. 26 * | 1/* 2 * Copyright 2001 The Aerospace Corporation. All rights reserved. 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions 6 * are met: 7 * 1. Redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer. --- 10 unchanged lines hidden (view full) --- 19 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25 * SUCH DAMAGE. 26 * |
27 * $FreeBSD: head/sbin/ifconfig/ifieee80211.c 181198 2008-08-02 18:06:27Z sam $ | 27 * $FreeBSD: head/sbin/ifconfig/ifieee80211.c 181199 2008-08-02 18:10:14Z sam $ |
28 */ 29 30/*- 31 * Copyright (c) 1997, 1998, 2000 The NetBSD Foundation, Inc. 32 * All rights reserved. 33 * 34 * This code is derived from software contributed to The NetBSD Foundation 35 * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility, --- 3073 unchanged lines hidden (view full) --- 3109 ac & IEEE80211_WMEPARAM_BSS ? " (BSS)" : ""); 3110 return -1; 3111 } 3112 *val = ireq.i_val; 3113 return 0; 3114} 3115 3116static void | 28 */ 29 30/*- 31 * Copyright (c) 1997, 1998, 2000 The NetBSD Foundation, Inc. 32 * All rights reserved. 33 * 34 * This code is derived from software contributed to The NetBSD Foundation 35 * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility, --- 3073 unchanged lines hidden (view full) --- 3109 ac & IEEE80211_WMEPARAM_BSS ? " (BSS)" : ""); 3110 return -1; 3111 } 3112 *val = ireq.i_val; 3113 return 0; 3114} 3115 3116static void |
3117list_wme(int s) | 3117list_wme_aci(int s, const char *tag, int ac) |
3118{ | 3118{ |
3119 static const char *acnames[] = { "AC_BE", "AC_BK", "AC_VI", "AC_VO" }; 3120 int ac, val; | 3119 int val; |
3121 | 3120 |
3122 for (ac = WME_AC_BE; ac <= WME_AC_VO; ac++) { 3123again: 3124 if (ac & IEEE80211_WMEPARAM_BSS) 3125 printf("\t%s", " "); 3126 else 3127 printf("\t%s", acnames[ac]); | 3121 printf("\t%s", tag); |
3128 | 3122 |
3129 /* show WME BSS parameters */ 3130 if (get80211wme(s, IEEE80211_IOC_WME_CWMIN, ac, &val) != -1) 3131 printf(" cwmin %2u", val); 3132 if (get80211wme(s, IEEE80211_IOC_WME_CWMAX, ac, &val) != -1) 3133 printf(" cwmax %2u", val); 3134 if (get80211wme(s, IEEE80211_IOC_WME_AIFS, ac, &val) != -1) 3135 printf(" aifs %2u", val); 3136 if (get80211wme(s, IEEE80211_IOC_WME_TXOPLIMIT, ac, &val) != -1) 3137 printf(" txopLimit %3u", val); 3138 if (get80211wme(s, IEEE80211_IOC_WME_ACM, ac, &val) != -1) { 3139 if (val) 3140 printf(" acm"); | 3123 /* show WME BSS parameters */ 3124 if (get80211wme(s, IEEE80211_IOC_WME_CWMIN, ac, &val) != -1) 3125 printf(" cwmin %2u", val); 3126 if (get80211wme(s, IEEE80211_IOC_WME_CWMAX, ac, &val) != -1) 3127 printf(" cwmax %2u", val); 3128 if (get80211wme(s, IEEE80211_IOC_WME_AIFS, ac, &val) != -1) 3129 printf(" aifs %2u", val); 3130 if (get80211wme(s, IEEE80211_IOC_WME_TXOPLIMIT, ac, &val) != -1) 3131 printf(" txopLimit %3u", val); 3132 if (get80211wme(s, IEEE80211_IOC_WME_ACM, ac, &val) != -1) { 3133 if (val) 3134 printf(" acm"); 3135 else if (verbose) 3136 printf(" -acm"); 3137 } 3138 /* !BSS only */ 3139 if ((ac & IEEE80211_WMEPARAM_BSS) == 0) { 3140 if (get80211wme(s, IEEE80211_IOC_WME_ACKPOLICY, ac, &val) != -1) { 3141 if (!val) 3142 printf(" -ack"); |
3141 else if (verbose) | 3143 else if (verbose) |
3142 printf(" -acm"); | 3144 printf(" ack"); |
3143 } | 3145 } |
3144 /* !BSS only */ 3145 if ((ac & IEEE80211_WMEPARAM_BSS) == 0) { 3146 if (get80211wme(s, IEEE80211_IOC_WME_ACKPOLICY, ac, &val) != -1) { 3147 if (!val) 3148 printf(" -ack"); 3149 else if (verbose) 3150 printf(" ack"); 3151 } | 3146 } 3147 printf("\n"); 3148} 3149 3150static void 3151list_wme(int s) 3152{ 3153 static const char *acnames[] = { "AC_BE", "AC_BK", "AC_VI", "AC_VO" }; 3154 int ac; 3155 3156 if (verbose) { 3157 /* display both BSS and local settings */ 3158 for (ac = WME_AC_BE; ac <= WME_AC_VO; ac++) { 3159 again: 3160 if (ac & IEEE80211_WMEPARAM_BSS) 3161 list_wme_aci(s, " ", ac); 3162 else 3163 list_wme_aci(s, acnames[ac], ac); 3164 if ((ac & IEEE80211_WMEPARAM_BSS) == 0) { 3165 ac |= IEEE80211_WMEPARAM_BSS; 3166 goto again; 3167 } else 3168 ac &= ~IEEE80211_WMEPARAM_BSS; |
3152 } | 3169 } |
3153 printf("\n"); 3154 if ((ac & IEEE80211_WMEPARAM_BSS) == 0) { 3155 ac |= IEEE80211_WMEPARAM_BSS; 3156 goto again; 3157 } else 3158 ac &= ~IEEE80211_WMEPARAM_BSS; | 3170 } else { 3171 /* display only channel settings */ 3172 for (ac = WME_AC_BE; ac <= WME_AC_VO; ac++) 3173 list_wme_aci(s, acnames[ac], ac); |
3159 } 3160} 3161 3162static void 3163list_roam(int s) 3164{ 3165 const struct ieee80211_roamparam *rp; 3166 int mode; --- 1363 unchanged lines hidden --- | 3174 } 3175} 3176 3177static void 3178list_roam(int s) 3179{ 3180 const struct ieee80211_roamparam *rp; 3181 int mode; --- 1363 unchanged lines hidden --- |