3 @@ -58,7 +58,6 @@ typedef struct iw_auth_descr
4 * Maybe this should go in iwlib.c ?
8 #define IW_ARRAY_LEN(x) (sizeof(x)/sizeof((x)[0]))
10 //static const struct iwmask_name iw_enc_mode_name[] = {
11 @@ -161,11 +160,8 @@ static const char * iw_ie_key_mgmt_name[
13 #define IW_IE_KEY_MGMT_NUM IW_ARRAY_LEN(iw_ie_key_mgmt_name)
15 -#endif /* WE_ESSENTIAL */
17 /************************* WPA SUBROUTINES *************************/
20 /*------------------------------------------------------------------*/
22 * Print all names corresponding to a mask.
23 @@ -431,7 +427,6 @@ iw_print_gen_ie(unsigned char * buffer,
24 offset += buffer[offset+1] + 2;
27 -#endif /* WE_ESSENTIAL */
29 /***************************** SCANNING *****************************/
31 @@ -585,12 +580,10 @@ print_scanning_token(struct stream_descr
32 &event->u.qual, iw_range, has_range);
33 printf(" %s\n", buffer);
37 /* Informations Elements are complex, let's do only some of them */
38 iw_print_gen_ie(event->u.data.pointer, event->u.data.length);
40 -#endif /* WE_ESSENTIAL */
43 char custom[IW_CUSTOM_MAX+1];
44 @@ -1302,7 +1295,6 @@ print_pm_info(int skfd,
49 /************************** TRANSMIT POWER **************************/
51 /*------------------------------------------------------------------*/
52 @@ -1405,6 +1397,7 @@ print_txpower_info(int skfd,
57 /*********************** RETRY LIMIT/LIFETIME ***********************/
59 /*------------------------------------------------------------------*/
60 @@ -2060,8 +2053,8 @@ static const struct iwlist_entry iwlist_
61 { "encryption", print_keys_info, 0, NULL },
62 { "keys", print_keys_info, 0, NULL },
63 { "power", print_pm_info, 0, NULL },
65 { "txpower", print_txpower_info, 0, NULL },
67 { "retry", print_retry_info, 0, NULL },
68 { "ap", print_ap_info, 0, NULL },
69 { "accesspoints", print_ap_info, 0, NULL },
72 @@ -106,16 +106,6 @@ get_info(int skfd,
73 if(wrq.u.data.length > 1)
74 info->has_nickname = 1;
76 - if((info->has_range) && (info->range.we_version_compiled > 9))
78 - /* Get Transmit Power */
79 - if(iw_get_ext(skfd, ifname, SIOCGIWTXPOW, &wrq) >= 0)
81 - info->has_txpower = 1;
82 - memcpy(&(info->txpower), &(wrq.u.txpower), sizeof(iwparam));
87 if(iw_get_ext(skfd, ifname, SIOCGIWSENS, &wrq) >= 0)
89 @@ -132,6 +122,17 @@ get_info(int skfd,
90 memcpy(&(info->retry), &(wrq.u.retry), sizeof(iwparam));
93 +#endif /* WE_ESSENTIAL */
95 + if((info->has_range) && (info->range.we_version_compiled > 9))
97 + /* Get Transmit Power */
98 + if(iw_get_ext(skfd, ifname, SIOCGIWTXPOW, &wrq) >= 0)
100 + info->has_txpower = 1;
101 + memcpy(&(info->txpower), &(wrq.u.txpower), sizeof(iwparam));
105 /* Get RTS threshold */
106 if(iw_get_ext(skfd, ifname, SIOCGIWRTS, &wrq) >= 0)
107 @@ -146,7 +147,6 @@ get_info(int skfd,
109 memcpy(&(info->frag), &(wrq.u.frag), sizeof(iwparam));
111 -#endif /* WE_ESSENTIAL */
115 @@ -269,7 +269,6 @@ display_info(struct wireless_info * info
116 printf("Bit Rate%c%s ", (info->bitrate.fixed ? '=' : ':'), buffer);
119 -#ifndef WE_ESSENTIAL
120 /* Display the Transmit Power */
121 if(info->has_txpower)
123 @@ -286,6 +285,7 @@ display_info(struct wireless_info * info
124 printf("Tx-Power%c%s ", (info->txpower.fixed ? '=' : ':'), buffer);
127 +#ifndef WE_ESSENTIAL
128 /* Display sensitivity */
131 @@ -340,6 +340,7 @@ display_info(struct wireless_info * info
133 tokens += 5; /* Between 3 and 5, depend on flags */
135 +#endif /* WE_ESSENTIAL */
137 /* Display the RTS threshold */
139 @@ -383,7 +384,6 @@ display_info(struct wireless_info * info
143 -#endif /* WE_ESSENTIAL */
145 /* Display encryption information */
146 /* Note : we display only the "current" key, use iwlist to list all keys */
147 @@ -1196,6 +1196,7 @@ set_nwid_info(int skfd,
151 +#endif /* WE_ESSENTIAL */
153 /*------------------------------------------------------------------*/
155 @@ -1362,6 +1363,7 @@ set_txpower_info(int skfd,
159 +#ifndef WE_ESSENTIAL
160 /*------------------------------------------------------------------*/
163 @@ -1459,6 +1461,7 @@ set_retry_info(int skfd,
167 +#endif /* WE_ESSENTIAL */
169 /*------------------------------------------------------------------*/
171 @@ -1565,6 +1568,7 @@ set_frag_info(int skfd,
175 +#ifndef WE_ESSENTIAL
176 /*------------------------------------------------------------------*/
179 @@ -1719,21 +1723,21 @@ static const struct iwconfig_entry iwcon
180 "Set Nickname", "NNN" },
181 { "nwid", set_nwid_info, 1, SIOCSIWNWID,
182 "Set NWID", "{NN|on|off}" },
183 - { "ap", set_apaddr_info, 1, SIOCSIWAP,
184 - "Set AP Address", "{N|off|auto}" },
185 - { "txpower", set_txpower_info, 1, SIOCSIWTXPOW,
186 - "Set Tx Power", "{NmW|NdBm|off|auto}" },
187 { "sens", set_sens_info, 1, SIOCSIWSENS,
188 "Set Sensitivity", "N" },
189 + { "modulation", set_modulation_info, 1, SIOCGIWMODUL,
190 + "Set Modulation", "{11g|11a|CCK|OFDMg|...}" },
191 { "retry", set_retry_info, 1, SIOCSIWRETRY,
192 "Set Retry Limit", "{limit N|lifetime N}" },
193 +#endif /* WE_ESSENTIAL */
194 + { "ap", set_apaddr_info, 1, SIOCSIWAP,
195 + "Set AP Address", "{N|off|auto}" },
196 + { "txpower", set_txpower_info, 1, SIOCSIWTXPOW,
197 + "Set Tx Power", "{NmW|NdBm|off|auto}" },
198 { "rts", set_rts_info, 1, SIOCSIWRTS,
199 "Set RTS Threshold", "{N|auto|fixed|off}" },
200 { "frag", set_frag_info, 1, SIOCSIWFRAG,
201 "Set Fragmentation Threshold", "{N|auto|fixed|off}" },
202 - { "modulation", set_modulation_info, 1, SIOCGIWMODUL,
203 - "Set Modulation", "{11g|11a|CCK|OFDMg|...}" },
204 -#endif /* WE_ESSENTIAL */
205 { "commit", set_commit_info, 0, SIOCSIWCOMMIT,
206 "Commit changes", "" },
207 { NULL, NULL, 0, 0, NULL, NULL },
210 @@ -76,12 +76,10 @@ extern int
214 -#ifndef WE_ESSENTIAL
215 /* Get iwspy in there, it's not that big. */
216 #define main(args...) main_iwspy(args)
219 -#endif /* WE_ESSENTIAL */
221 /* Get iwpriv in there. Mandatory for HostAP and some other drivers. */
222 #define main(args...) main_iwpriv(args)
223 @@ -128,10 +126,8 @@ main(int argc,
224 return(main_iwconfig(argc, argv));
225 if(!strcmp(call_name, "iwlist"))
226 return(main_iwlist(argc, argv));
227 -#ifndef WE_ESSENTIAL
228 if(!strcmp(call_name, "iwspy"))
229 return(main_iwspy(argc, argv));
230 -#endif /* WE_ESSENTIAL */
231 if(!strcmp(call_name, "iwpriv"))
232 return(main_iwpriv(argc, argv));
233 if(!strcmp(call_name, "iwgetid"))