Documentation/Libmac: madwifi-0.9.2-libmac.diff
| File madwifi-0.9.2-libmac.diff, 25.1 kB (added by kishore, 2 years ago) |
|---|
-
ath/if_ath.c
diff -Naurp madwifi-0.9.2/ath/if_ath.c madwifi-0.9.2-libmac/ath/if_ath.c
old new  91 91 #include "ath_tx99.h" 92 92 #endif 93 93   94 #include <net80211/libmac.h>  95  94 96 /* unaligned little endian access */ 95 97 #define LE_READ_2(p) \ 96 98 ((u_int16_t) \ … …  902 904 dev->name, error); 903 905 } 904 906   907 #ifdef CONFIG_MADWIFI_LIBMAC /* Should this go here of before ieee80211_create_vap() ? */  908 ic->mac_append_in_mode = APPEND_OFF;  909 ic->mac_append_out_mode = APPEND_OFF;  910 ic->mac_supported_params[0] = mac_rssi;  911 ic->mac_supported_params_flags[0] = WLGETONLY;   912 /* we should eventually print supported params list .. */  913 printk("%s: libmac-%s supported\n", dev->name, LIBMAC_VERSION);  914 #endif  915  905 916 return 0; 906 917 bad3: 907 918 ieee80211_ifdetach(ic); … …  5102 5113 struct sk_buff *skb; 5103 5114 struct ath_desc *ds; 5104 5115   5116 #ifdef CONFIG_MADWIFI_LIBMAC  5117 struct ieee80211com *ic = &sc->sc_ic;  5118 int tail_need = 0;  5119 #endif  5120  5105 5121 skb = bf->bf_skb; 5106 5122 if (skb == NULL) { 5107 5123 if (sc->sc_nmonvaps > 0) { … …  5133 5149 if (off != 0) 5134 5150 skb_reserve(skb, sc->sc_cachelsz - off); 5135 5151 } else {  5152 #ifdef CONFIG_MADWIFI_LIBMAC  5153 /* Make sure this has not been done before. */  5154 if (ic->mac_rxbufsize_flag) {  5155 if ( (ic->mac_append_in_mode==APPEND_ON) )  5156 /* For each parameter, space needed is 3 bytes. In addition,   5157 * 1 byte is needed for the no_of_params indicator and 2 bytes  5158 * more are needed for the length. Total number of bytes appended   5159 * is 1 (for no. of params) + 3 (1(for key) + 2(for value)) * num_params +   5160 * 2 (for length field).  5161 * */  5162 tail_need = (3 * (ic->mac_in_params.len)) + 1 + 2;  5163 /* For each parameter, space needed is 2 bytes   5164 * for the length.  5165 */  5166 else if ( (ic->mac_append_in_mode==APPEND_OFF) )  5167 tail_need = 2;  5168 sc->sc_rxbufsize += tail_need;  5169 ic->mac_rxbufsize_flag = 1;  5170 }  5171 #endif /* CONFIG_MADWIFI_LIBMAC */  5172  5136 5173 /* 5137 5174 * Cache-line-align. This is important (for the 5138 5175 * 5210 at least) as not doing so causes bogus data … …  5583 5620 keyix = ni->ni_ucastkey.wk_keyix; 5584 5621 if (keyix != IEEE80211_KEYIX_NONE && 5585 5622 sc->sc_keyixmap[keyix] == NULL) 5586  sc->sc_keyixmap[keyix] = ieee80211_ref_node(ni); 5623 sc->sc_keyixmap[keyix] = ieee80211_ref_node(ni); 5587 5624 ieee80211_free_node(ni);  5588 5625 } else 5589 5626 type = ieee80211_input_all(ic, skb, … …  8998 9035 { 8999 9036 struct ath_softc *sc = dev->priv; 9000 9037 struct ieee80211com *ic = &sc->sc_ic; 9001  int error ; 9038 int error = 0; 9002 9039  9003 9040 ATH_LOCK(sc); 9004 9041 switch (cmd) { -
madwifi-0.9.
diff -Naurp madwifi-0.9.2/Makefile madwifi-0.9.2-libmac/Makefile
old new  50 50  51 51 DIRS_MODULES = $(ATH) $(ATH_RATE) $(WLAN) 52 52  53  obj-y := ath/ $(ATH_RATE)/ net80211/  53 obj-y := ath/ $(ATH_RATE)/ net80211/  54 54  55  all: modules tools  55 #all: modules tools  56 all: modules 56 57  57 58 modules: configcheck svnversion.h 58 59 ifdef LINUX24 … …  80 81 tools: 81 82 $(MAKE) -C $(TOOLS) all || exit 1 82 83  83  install: install-modules install-toolsÂ84    84 #install: install-modules install-tools  85 install: install-modules 85 86 install-modules: 86 87 @# check if there are modules left from an old installation 87 88 @# might cause make to abort the build -
net80211/ieee80211_input.c
diff -Naurp madwifi-0.9.2/net80211/ieee80211_input.c madwifi-0.9.2-libmac/net80211/ieee80211_input.c
old new  57 57  58 58 #include <net80211/ieee80211_var.h> 59 59   60 /* Begin WINLAB */  61 #include <net80211/libmac.h>  62 /* End WINLAB */  63  60 64 #ifdef IEEE80211_DEBUG 61 65 /* 62 66 * Decide if a received management frame should be … …  1092 1096 struct net_device *dev = vap->iv_dev; 1093 1097 struct ether_header *eh = (struct ether_header *) skb->data; 1094 1098   1099 /* Begin WINLAB */  1100 #ifdef CONFIG_MADWIFI_LIBMAC  1101 struct ieee80211com *ic = vap->iv_ic;  1102 u8 *mac_skb_rx_8; // 8-bit pointer to append values to end of packet  1103 u32 *mac_skb_rx_32; // 32-bit pointer to append values to end of packet  1104 u8 *mac_skb_num_params;// 8-bit pointer to append number of parameters to end of packet  1105 u16 *mac_skb_len_16; // 16-bit pointer to append length of data to end of packet  1106 int mac_i; // counter  1107 u_int16_t payload_len;  1108 #endif  1109 /* End WINLAB */  1110  1095 1111 #ifdef ATH_SUPERG_XR  1096 1112 /* 1097 1113 * if it is a XR vap, send the data to associated normal net … …  1152 1168 if (ni->ni_vlan != 0 && vap->iv_vlgrp != NULL) { 1153 1169 /* attach vlan tag */ 1154 1170 vlan_hwaccel_receive_skb(skb, vap->iv_vlgrp, ni->ni_vlan); 1155  } else 1156  netif_rx(skb);  1171 } else {  1172 /* Begin WINLAB */  1173 #ifdef CONFIG_MADWIFI_LIBMAC  1174 payload_len = skb->len;  1175 if (ic->mac_append_in_mode==APPEND_ON)  1176 {  1177 printk("APPEND_ON detected, number params:\t%d\n", ic->mac_in_params.len);  1178 // First create space at the end of the buffer for number of params  1179 mac_skb_num_params = (u8*)skb_put(skb, 1);  1180 // Next fill in the number of parameters being appended  1181 mac_skb_num_params[0] = ic->mac_in_params.len;  1182   1183 for(mac_i=0;mac_i<ic->mac_in_params.len; mac_i++)  1184 {  1185 switch(ic->mac_in_params.key_array[mac_i])  1186 {  1187 case mac_rssi :  1188 mac_skb_rx_8 = (u8*)skb_put(skb,1);  1189 mac_skb_rx_32 = (u32*)skb_put(skb, 4);  1190 mac_skb_rx_8[0] = ic->mac_in_params.key_array[mac_i];  1191 //mac_skb_rx_32[0] = ni->ni_rssi;  1192 /* XXX: check to see differing values between  1193 * ni->ni_rssi and what ieee80211_getrssi(ic) gets */  1194 mac_skb_rx_32[0] = ieee80211_getrssi(ic);  1195 printk("RSSI reported:\t%d\n", mac_skb_rx_32[0]);  1196 break;  1197 default:  1198 printk("Unsupported param:\t%d\n", ic->mac_in_params.key_array[mac_i]);  1199 break;  1200 }  1201 }  1202 }  1203   1204 /* Do not append length to frame type 0x0900. */  1205 if (eh->ether_type != __constant_htons(0x0900))  1206 {  1207 // Create space at the end of the packet for length of data  1208 mac_skb_len_16 = (u16*)skb_put(skb,2);  1209 mac_skb_len_16[0] = payload_len;  1210 }  1211 #endif  1212 /* End WINLAB */  1213   1214 netif_rx(skb);  1215 } 1157 1216 dev->last_rx = jiffies; 1158 1217 } 1159 1218 } -
net80211/ieee80211_ioctl.h
diff -Naurp madwifi-0.9.2/net80211/ieee80211_ioctl.h madwifi-0.9.2-libmac/net80211/ieee80211_ioctl.h
old new  41 41 #include <net80211/ieee80211.h> 42 42 #include <net80211/ieee80211_crypto.h> 43 43   44 /* Begin WINLAB */  45 #include <net80211/libmac.h>  46 /* End Winlab */  47  44 48 /* 45 49 * Per/node (station) statistics available when operating as an AP. 46 50 */ … …  532 536 IEEE80211_WMMPARAMS_TXOPLIMIT = 4, 533 537 IEEE80211_WMMPARAMS_ACM = 5, 534 538 IEEE80211_WMMPARAMS_NOACKPOLICY = 6,   539 #ifdef CONFIG_MADWIFI_LIBMAC  540 /* We're out of ioctls, and private ioctls, lets abuse this  541 * for now. Later on we can use configfs */  542 LIBMAC_INAPP = 7, /* */  543 LIBMAC_OUTAPP = 8, /* */  544 LIBMAC_ALLAPPOFF = 9, /* */  545 LIBMAC_PARAMS = 10, /* Get supported params with flags / Set flags for supported params */  546 LIBMAC_RSSI = 11, /* */  547 LIBMAC_TXPOWER = 12, /* */  548 LIBMAC_TXRATE = 13, /* */  549 LIBMAC_NOISE = 14, /* */  550 #endif /* CONFIG_MADWIFI_LIBMAC */ 535 551 }; 536 552 enum { 537 553 IEEE80211_PARAM_TURBO = 1, /* turbo mode */ -
net80211/ieee80211_var.h
diff -Naurp madwifi-0.9.2/net80211/ieee80211_var.h madwifi-0.9.2-libmac/net80211/ieee80211_var.h
old new  52 52 #include <net80211/ieee80211_power.h> 53 53 #include <net80211/ieee80211_proto.h> 54 54 #include <net80211/ieee80211_scan.h>  55 /* Begin WINLAB */  56 #include <net80211/libmac.h>  57 /* End WINLAB */ 55 58  56 59 #define IEEE80211_TXPOWER_MAX 100 /* .5 dBm units */ 57 60 #define IEEE80211_TXPOWER_MIN 0 /* kill radio */ … …  209 212 u_int8_t ic_chanchange_tbtt; 210 213 u_int8_t ic_chanchange_chan; 211 214   215 #ifdef CONFIG_MADWIFI_LIBMAC  216 mac_params_list mac_in_params;  217 mac_params_list mac_out_params;  218 u_int8_t mac_append_in_mode;  219 u_int8_t mac_append_out_mode;  220 u_int8_t mac_rxbufsize_flag;  221 /* list of suppported mac params */  222 unsigned char mac_supported_params[1];  223 /* parameter attributes */   224 unsigned char mac_supported_params_flags[1];  225 #endif /* CONFIG_MADWIFI_LIBMAC */  226  212 227 /* virtual ap create/delete */ 213 228 struct ieee80211vap *(*ic_vap_create)(struct ieee80211com *, 214 229 const char *, int, int, int, struct net_device *); -
net80211/ieee80211_wireless.c
diff -Naurp madwifi-0.9.2/net80211/ieee80211_wireless.c madwifi-0.9.2-libmac/net80211/ieee80211_wireless.c
old new  61 61 #include <net80211/ieee80211_var.h> 62 62 #include <net80211/ieee80211_linux.h> 63 63   64 /* Begin WINLAB */  65 #include <net80211/libmac.h>  66 #include <ath/if_athvar.h> /* for struct ath_softc */  67 /* End WINLAB */  68  64 69 #define IS_UP(_dev) \ 65 70 (((_dev)->flags & (IFF_RUNNING|IFF_UP)) == (IFF_RUNNING|IFF_UP)) 66 71 #define IS_UP_AUTO(_vap) \ … …  3296 3301 int ac = (param[1] < WME_NUM_AC) ? param[1] : WME_AC_BE; 3297 3302 int bss = param[2];  3298 3303 struct ieee80211_wme_state *wme = &vap->iv_ic->ic_wme;  3304 #ifdef CONFIG_MADWIFI_LIBMAC  3305 struct ath_softc *sc = dev->priv;  3306 struct ieee80211com *ic = vap->iv_ic;   3307 int *compat = (int *) w;  3308 struct iw_point *iwp = (struct iw_point *) w;  3309 struct mac_params_list *p_in = (struct mac_params_list *) iwp->pointer;  3310 struct mac_params_list *p = (struct mac_params_list *) extra;  3311 //struct iw_param *iwparam = (struct iw_param *) extra;  3312 union iwreq_data *wrqu = (union iwreq_data *) w;  3313   3314 /* Note: iwp->length is 0 when iwpriv is used */  3315   3316 /* If we have a Libmac sub-ioctl */  3317 if((iwp->length == sizeof(struct mac_params_list)) &&   3318 (p_in->si_num >= LIBMAC_INAPP) && (p_in->si_num <= LIBMAC_NOISE)) {  3319 /* Libmac note: we only allow libmac sub-ioclts if magic flag was set to LIBMAC_MAGIC_FLAG */  3320 if (p_in->si_flag != LIBMAC_MAGIC_FLAG) {  3321 printk("%s: special get sub-ioctl (%d) for libmac called without magic flag (%d), do "  3322 "not call directly using iwpriv or if you are unsure how to use this\n",   3323 dev->name, p_in->si_num, p_in->si_flag);  3324 return -EINVAL;  3325 }  3326 switch (p_in->si_num) {  3327 /* ioctl to turn on the append mode on all incoming packets */  3328 case LIBMAC_INAPP:  3329 memcpy(ic->mac_in_params.key_array, p->key_array, p->len);  3330 memcpy(ic->mac_in_params.flags, p->flags, p->len);  3331 ic->mac_in_params.len = p->len;  3332 ic->mac_append_in_mode = APPEND_ON;  3333 /* update ath_soft sc->sc_rxbufsize over here....other   3334 * one only takes care of HW reset */  3335 sc->sc_rxbufsize += (3 * (ic->mac_in_params.len)) + 1 + 2;  3336 break;  3337 /* Turn append off for both incomming and outgoing packets */  3338 case LIBMAC_ALLAPPOFF:  3339 ic->mac_append_in_mode = APPEND_OFF;  3340 ic->mac_append_out_mode = APPEND_OFF;  3341 break;  3342 #if 0  3343 case LIBMAC_TXRATE:  3344 if (ath_ioctl_siwrate(dev, (struct iw_request_info *)NULL, iwparam, (char *)NULL ))  3345 printk("%s: libmac - Could not set txrate\n", dev->name);  3346 break;  3347 case LIBMAC_TXPOWER:  3348 if (ath_ioctl_siwtxpow(dev,(struct iw_request_info *)NULL, iwparam, (char *)NULL))  3349 printk("%s: libmac - Could not set txpower\n");  3350 break;  3351 #endif  3352 /* ioctl to turn on the append mode on all outgoing packets */  3353 case LIBMAC_OUTAPP: /* Not supported yet */  3354 case LIBMAC_PARAMS:  3355 case LIBMAC_RSSI:  3356 case LIBMAC_NOISE:  3357 default:  3358 printk("%s: Libmac set sub-ioctl (%d) detected but not supported\n", dev->name, p_in->si_num);  3359 return -EFAULT;  3360 }  3361 return 0;  3362 } 3299 3363  3300  switch (param[0]) {  3364 printk("Sorry, but set WMM private (%X) ioctls are not supported\n", compat[0]);  3365 return 0;  3366   3367 /* To support Libmac through sub-iotls we needed to bastardize this handler,   3368 * here is some backward compatiblity work */  3369   3370 /* Note: sizeof(extra) == 4 */  3371   3372 param[0] = compat[0];  3373 param[1] = compat[1];  3374 param[2] = compat[2];  3375   3376 wrqu->data.length = 525;  3377   3378 printk("%s: Libmac Compatibility at work - (param[0]: %d) (param[1]: %d) "  3379 "(param[2]: %d) (data.length: %d)\n",  3380 dev->name, param[0], param[1], param[2], wrqu->data.length);  3381   3382 ac = (param[1] < WME_NUM_AC) ? param[1] : WME_AC_BE;   3383 bss = param[2];  3384   3385 #endif /* CONFIG_MADWIFI_LIBMAC */  3386 switch (param[0]) {  3301 3387 case IEEE80211_WMMPARAMS_CWMIN: 3302 3388 if (param[3] < 0 || param[3] > 15)  3303 3389 return -EINVAL; … …  3375 3461 return 0; 3376 3462 } 3377 3463   3464  3378 3465 static int 3379 3466 ieee80211_ioctl_getwmmparams(struct net_device *dev, 3380 3467 struct iw_request_info *info, void *w, char *extra) 3381 3468 { 3382 3469 struct ieee80211vap *vap = dev->priv; 3383 3470 int *param = (int *) extra; 3384  int ac = (param[1] < WME_NUM_AC) ? param[1] : WME_AC_BE;  3471 int ac = (param[1] < WME_NUM_AC) ? param[1] : WME_AC_BE;  3385 3472 struct ieee80211_wme_state *wme = &vap->iv_ic->ic_wme; 3386 3473 struct chanAccParams *chanParams = (param[2] == 0) ?  3387 3474 &(wme->wme_chanParams) : &(wme->wme_bssChanParams);  3475 #ifdef CONFIG_MADWIFI_LIBMAC  3476 struct ieee80211com *ic = vap->iv_ic;   3477 int *compat = (int *) w;  3478 struct iw_point *iwp = (struct iw_point *) w;  3479 struct mac_params_list *p_in = (struct mac_params_list *) iwp->pointer;  3480 struct mac_params_list *p = (struct mac_params_list *) extra;  3481 struct iw_param *iwparam = (struct iw_param *) extra;  3482 union iwreq_data *wrqu = (union iwreq_data *) w;  3483   3484 /* Note: iwp->length is 0 when iwpriv is used */  3485   3486 /* If we have a Libmac sub-ioctl */  3487 if((iwp->length == sizeof(struct mac_params_list)) &&   3488 (p_in->si_num >= LIBMAC_INAPP) && (p_in->si_num <= LIBMAC_NOISE)) {  3489 /* Libmac note: we only allow libmac sub-ioclts if magic flag was set to LIBMAC_MAGIC_FLAG */  3490 if (p_in->si_flag != LIBMAC_MAGIC_FLAG) {  3491 printk("%s: special get sub-ioctl (%d) for libmac called without magic flag (%d), "  3492 "do not call directly using iwpriv or if you are unsure how to use this\n",   3493 dev->name, p_in->si_num, p_in->si_flag);  3494 return -EINVAL;  3495 }  3496 switch (p_in->si_num) {  3497 /* Retrieves all supported Libmac MAC parameters */  3498 case LIBMAC_PARAMS:   3499 //memset(p, 0, sizeof(struct mac_params_list));  3500 p->len = sizeof(ic->mac_supported_params);  3501 memcpy(p->key_array, ic->mac_supported_params,   3502 sizeof(ic->mac_supported_params));  3503 memcpy(p->flags, ic->mac_supported_params_flags,   3504 sizeof(ic->mac_supported_params_flags));  3505 break;  3506 case LIBMAC_RSSI:  3507 /* XXX: Missing setting of length of sent data to user, required? */  3508 iwparam->value = ieee80211_getrssi(ic);  3509 printk("%s: RSSI returned is %d\n", dev->name, iwparam->value);  3510 iwparam->fixed = 0; /* This has no meaning in this context */  3511 iwparam->disabled = 0; /* This has no meaning in this context */  3512 iwparam->flags = 0; /* This is not used currently */  3513 break;  3514 case LIBMAC_NOISE:  3515 /* 161 (-95dB hard coded) */  3516 iwparam->value = 161;  3517 iwparam->fixed = 0;  3518 iwparam->disabled = 0;  3519 iwparam->flags = 0;  3520 break;  3521 #if 0  3522 case LIBMAC_TXRATE:  3523 if (ath_ioctl_giwrate(dev, (struct iw_request_info *)NULL, iwparam, (char *)NULL ))  3524 printk("%s: libmac - Could not retrieve txrate\n", dev->name)  3525 break;  3526 case LIBMAC_TXPOWER:  3527 if (ath_ioctl_giwtxpow(dev,(struct iw_request_info *)NULL, iwparam, (char *)NULL))  3528 printk("%s: libmac - Could not retrive txpower\n", dev->name);  3529 break;  3530 #endif  3531 case LIBMAC_INAPP:  3532 case LIBMAC_OUTAPP:  3533 case LIBMAC_ALLAPPOFF:  3534 default:  3535 printk("%s: Libmac get sub-ioctl (%d) detected but not supported\n", dev->name, p_in->si_num);  3536 break;  3537 }  3538 return 0;  3539 }  3540   3541 printk("Sorry, but get WMM private (%X) ioctls are not supported\n", compat[0]);  3542 return 0;  3543   3544 /* To support Libmac through sub-iotls we needed to bastardize this handler,   3545 * here is some backward compatiblity work */  3546   3547 /* Note: sizeof(extra) == 4 */  3548   3549 param[0] = compat[0];  3550 param[1] = compat[1];  3551 param[2] = compat[2];  3552   3553 wrqu->data.length = 525;  3554   3555 printk("%s: Libmac Compatibility at work - (param[0]: %d) (param[1]: %d) (param[2]: %d) (data.length: %d)\n",  3556 dev->name, param[0], param[1], param[2], wrqu->data.length);  3557   3558 ac = (param[1] < WME_NUM_AC) ? param[1] : WME_AC_BE;   3559 chanParams = (param[2] == 0) ? &(wme->wme_chanParams) : &(wme->wme_bssChanParams);  3560   3561 /* Note: we are failing for iwpriv with BAD ADDRESS because wireless core tries this:  3562 *  3563 * err = copy_to_user(iwr->u.data.pointer, extra,  3564 * extra_size);  3565 *  3566 * At the end if (!ret && IW_IS_GET(cmd)) { }   3567 *  3568 * The buffer it allocates from iwpriv is buffer[4096] so its not the size,   3569 * as seen bellow eve if we try to copy 1 byte it doesn't work. The data which we  3570 * are trying to copy IS USERSPACE -- this has been verified with access_ok(), see bellow.  3571 */  3572   3573 /* From iwpriv:   3574 *  3575 * iwpriv will not print data unless a value >= 0 is detected from ioctl. As mentioned above  3576 * we are going to get -EFAULT returnd (bad address) as the core cannot copy_to_user even 1 byte  3577 *  3578 * if(ioctl(skfd, priv[k].cmd, &wrq) < 0)  3579 * {  3580 * fprintf(stderr, "Interface doesn't accept private ioctl...\n");  3581 * fprintf(stderr, "%s (%X): %s\n", cmdname, priv[k].cmd, strerror(errno));  3582 * return(-1);  3583 * }  3584 *  3585 */  3586   3587 #endif /* CONFIG_MADWIFI_LIBMAC */ 3388 3588  3389 3589 switch (param[0]) { 3390 3590 case IEEE80211_WMMPARAMS_CWMIN:  3391 3591 param[0] = chanParams->cap_wmeParams[ac].wmep_logcwmin;  3592 param[0] = 123; 3392 3593 break; 3393 3594 case IEEE80211_WMMPARAMS_CWMAX:  3394 3595 param[0] = chanParams->cap_wmeParams[ac].wmep_logcwmax; … …  3408 3609 default: 3409 3610 break; 3410 3611 }  3612  3411 3613 return 0; 3412 3614 } 3413 3615  … …  4507 4709 #define IW_PRIV_TYPE_CHANINFO \ 4508 4710 IW_PRIV_TYPE_BYTE | sizeof(struct ieee80211req_chaninfo) 4509 4711   4712 #ifdef CONFIG_MADWIFI_LIBMAC  4713 #define IW_PRIV_TYPE_LIBMAC_PARAMS\  4714 IW_PRIV_TYPE_BYTE | sizeof(struct mac_params_list)   4715 #endif /* CONFIG_MADWIFI_LIBMAC */  4716   4717 #define WWM_GET_SIOCTL(ioctl, name) { ioctl, IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 2, IW_PRIV_TYPE_LIBMAC_PARAMS | IW_PRIV_SIZE_FIXED, name }  4718 #define WMM_SET_SIOCTL(ioctl, name) { ioctl, IW_PRIV_TYPE_LIBMAC_PARAMS | IW_PRIV_SIZE_FIXED, 0, name }  4719 #define WMM_GSET_SIOCTL(ioctl, name) WWM_GET_SIOCTL(ioctl, "g_"name), WMM_SET_SIOCTL(ioctl, "s_"name)  4720  4510 4721 static const struct iw_priv_args ieee80211_priv_args[] = { 4511 4722 /* NB: setoptie & getoptie are !IW_PRIV_SIZE_FIXED */ 4512 4723 { IEEE80211_IOCTL_SETOPTIE, … …  4540 4751 { IEEE80211_IOCTL_GETMODE, 4541 4752 0, IW_PRIV_TYPE_CHAR | 6, "get_mode" }, 4542 4753 #if WIRELESS_EXT >= 12  4543  { IEEE80211_IOCTL_SETWMMPARAMS,Â4544  IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 4, 0,"setwmmparams" },Â4545  { IEEE80211_IOCTL_GETWMMPARAMS,Â4546  IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 3,Â4547  IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, "getwmmparams" },Â4548  /*Â4549  * These depends on sub-ioctl support which added in version 12.Â4550  */Â4551  { IEEE80211_IOCTL_SETWMMPARAMS,Â4552  IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 3, 0,"" },Â4553  { IEEE80211_IOCTL_GETWMMPARAMS,Â4554  IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 2,Â4555  IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, "" },Â4556 4754 /* sub-ioctl handlers */ 4557  { IEEE80211_WMMPARAMS_CWMIN, 4558  IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 3, 0,"cwmin" }, 4559  { IEEE80211_WMMPARAMS_CWMIN, 4560  IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 2,  4561  IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, "get_cwmin" }, 4562  { IEEE80211_WMMPARAMS_CWMAX, 4563  IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 3, 0,"cwmax" }, 4564  { IEEE80211_WMMPARAMS_CWMAX, 4565  IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 2,  4566  IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, "get_cwmax" }, 4567  { IEEE80211_WMMPARAMS_AIFS, 4568  IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 3, 0,"aifs" }, 4569  { IEEE80211_WMMPARAMS_AIFS, 4570  IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 2,  4571  IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, "get_aifs" }, 4572  { IEEE80211_WMMPARAMS_TXOPLIMIT, 4573  IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 3, 0,"txoplimit" }, 4574  { IEEE80211_WMMPARAMS_TXOPLIMIT, 4575  IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 2,  4576  IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, "get_txoplimit" }, 4577  { IEEE80211_WMMPARAMS_ACM, 4578  IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 3, 0,"acm" }, 4579  { IEEE80211_WMMPARAMS_ACM, 4580  IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 2,  4581  IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, "get_acm" }, 4582  { IEEE80211_WMMPARAMS_NOACKPOLICY, 4583  IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 3, 0,"noackpolicy" }, 4584  { IEEE80211_WMMPARAMS_NOACKPOLICY, 4585  IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 2,  4586  IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, "get_noackpolicy" },  4755 WMM_SET_SIOCTL(IEEE80211_IOCTL_SETWMMPARAMS, ""),  4756 WWM_GET_SIOCTL(IEEE80211_IOCTL_GETWMMPARAMS, ""),  4757 /* sub-ioctl definitions */  4758 WMM_GSET_SIOCTL(IEEE80211_WMMPARAMS_CWMIN, "cwmin"),   4759 WMM_GSET_SIOCTL(IEEE80211_WMMPARAMS_CWMAX, "cwmax"),   4760 WMM_GSET_SIOCTL(IEEE80211_WMMPARAMS_AIFS, "aifs"),   4761 WMM_GSET_SIOCTL(IEEE80211_WMMPARAMS_TXOPLIMIT, "txoplimit"),   4762 WMM_GSET_SIOCTL(IEEE80211_WMMPARAMS_ACM, "acm"),   4763 WMM_GSET_SIOCTL(IEEE80211_WMMPARAMS_NOACKPOLICY,"noackpolicy"),   4764 #ifdef CONFIG_MADWIFI_LIBMAC  4765 WMM_GSET_SIOCTL(LIBMAC_PARAMS, "lbparams"),   4766 #endif /* CONFIG_MADWIFI_LIBMAC */  4767 /* raw access to sub-ioctl hanlders */  4768 {IEEE80211_IOCTL_SETWMMPARAMS, IW_PRIV_TYPE_LIBMAC_PARAMS | IW_PRIV_SIZE_FIXED, 0, "setwmmparams"},  4769 {IEEE80211_IOCTL_GETWMMPARAMS, IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 3,  4770 IW_PRIV_TYPE_LIBMAC_PARAMS | IW_PRIV_SIZE_FIXED, "getwmmparams"}, 4587 4771  4588  { IEEE80211_IOCTL_SETPARAM,Â4589  IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 2, 0, "setparam" },Â4590 4772 /* 4591 4773 * These depends on sub-ioctl support which added in version 12. 4592 4774 */  4775 { IEEE80211_IOCTL_SETPARAM,  4776 IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 2, 0, "setparam" }, 4593 4777 { IEEE80211_IOCTL_GETPARAM, 4594 4778 IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 4595 4779 IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, "getparam" }, … …  4599 4783 IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "" }, 4600 4784 { IEEE80211_IOCTL_GETPARAM, 4601 4785 0, IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, "" }, 4602    4786  4603 4787 /* sub-ioctl definitions */ 4604 4788 { IEEE80211_PARAM_AUTHMODE, 4605 4789 IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "authmode" }, … …  4611 4795 0, IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, "get_protmode" }, 4612 4796 { IEEE80211_PARAM_MCASTCIPHER, 4613 4797 IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "mcastcipher" }, 4614 Â
