6b28099aae1a37a887cab6800ae9d290fb847189
[openwrt.git] / package / wireless-tools / patches / 003-we_essential_def.patch
1 --- a/iwlist.c
2 +++ b/iwlist.c
3 @@ -1302,7 +1302,6 @@ print_pm_info(int skfd,
4 return(0);
5 }
6
7 -#ifndef WE_ESSENTIAL
8 /************************** TRANSMIT POWER **************************/
9
10 /*------------------------------------------------------------------*/
11 @@ -1405,6 +1404,7 @@ print_txpower_info(int skfd,
12 return(0);
13 }
14
15 +#ifndef WE_ESSENTIAL
16 /*********************** RETRY LIMIT/LIFETIME ***********************/
17
18 /*------------------------------------------------------------------*/
19 @@ -2060,8 +2060,8 @@ static const struct iwlist_entry iwlist_
20 { "encryption", print_keys_info, 0, NULL },
21 { "keys", print_keys_info, 0, NULL },
22 { "power", print_pm_info, 0, NULL },
23 -#ifndef WE_ESSENTIAL
24 { "txpower", print_txpower_info, 0, NULL },
25 +#ifndef WE_ESSENTIAL
26 { "retry", print_retry_info, 0, NULL },
27 { "ap", print_ap_info, 0, NULL },
28 { "accesspoints", print_ap_info, 0, NULL },
29 --- a/iwconfig.c
30 +++ b/iwconfig.c
31 @@ -106,16 +106,6 @@ get_info(int skfd,
32 if(wrq.u.data.length > 1)
33 info->has_nickname = 1;
34
35 - if((info->has_range) && (info->range.we_version_compiled > 9))
36 - {
37 - /* Get Transmit Power */
38 - if(iw_get_ext(skfd, ifname, SIOCGIWTXPOW, &wrq) >= 0)
39 - {
40 - info->has_txpower = 1;
41 - memcpy(&(info->txpower), &(wrq.u.txpower), sizeof(iwparam));
42 - }
43 - }
44 -
45 /* Get sensitivity */
46 if(iw_get_ext(skfd, ifname, SIOCGIWSENS, &wrq) >= 0)
47 {
48 @@ -132,6 +122,17 @@ get_info(int skfd,
49 memcpy(&(info->retry), &(wrq.u.retry), sizeof(iwparam));
50 }
51 }
52 +#endif /* WE_ESSENTIAL */
53 +
54 + if((info->has_range) && (info->range.we_version_compiled > 9))
55 + {
56 + /* Get Transmit Power */
57 + if(iw_get_ext(skfd, ifname, SIOCGIWTXPOW, &wrq) >= 0)
58 + {
59 + info->has_txpower = 1;
60 + memcpy(&(info->txpower), &(wrq.u.txpower), sizeof(iwparam));
61 + }
62 + }
63
64 /* Get RTS threshold */
65 if(iw_get_ext(skfd, ifname, SIOCGIWRTS, &wrq) >= 0)
66 @@ -146,7 +147,6 @@ get_info(int skfd,
67 info->has_frag = 1;
68 memcpy(&(info->frag), &(wrq.u.frag), sizeof(iwparam));
69 }
70 -#endif /* WE_ESSENTIAL */
71
72 return(0);
73 }
74 @@ -269,7 +269,6 @@ display_info(struct wireless_info * info
75 printf("Bit Rate%c%s ", (info->bitrate.fixed ? '=' : ':'), buffer);
76 }
77
78 -#ifndef WE_ESSENTIAL
79 /* Display the Transmit Power */
80 if(info->has_txpower)
81 {
82 @@ -286,6 +285,7 @@ display_info(struct wireless_info * info
83 printf("Tx-Power%c%s ", (info->txpower.fixed ? '=' : ':'), buffer);
84 }
85
86 +#ifndef WE_ESSENTIAL
87 /* Display sensitivity */
88 if(info->has_sens)
89 {
90 @@ -340,6 +340,7 @@ display_info(struct wireless_info * info
91 printf(" ");
92 tokens += 5; /* Between 3 and 5, depend on flags */
93 }
94 +#endif /* WE_ESSENTIAL */
95
96 /* Display the RTS threshold */
97 if(info->has_rts)
98 @@ -383,7 +384,6 @@ display_info(struct wireless_info * info
99 /* Formating */
100 if(tokens > 0)
101 printf("\n ");
102 -#endif /* WE_ESSENTIAL */
103
104 /* Display encryption information */
105 /* Note : we display only the "current" key, use iwlist to list all keys */
106 @@ -995,6 +995,7 @@ set_enc_info(int skfd,
107 return(i);
108 }
109
110 +#ifndef WE_ESSENTIAL
111 /*------------------------------------------------------------------*/
112 /*
113 * Set Power Management
114 @@ -1111,7 +1112,6 @@ set_power_info(int skfd,
115 return(i);
116 }
117
118 -#ifndef WE_ESSENTIAL
119 /*------------------------------------------------------------------*/
120 /*
121 * Set Nickname
122 @@ -1196,6 +1196,7 @@ set_nwid_info(int skfd,
123 /* 1 arg */
124 return(1);
125 }
126 +#endif /* WE_ESSENTIAL */
127
128 /*------------------------------------------------------------------*/
129 /*
130 @@ -1362,6 +1363,7 @@ set_txpower_info(int skfd,
131 return(i);
132 }
133
134 +#ifndef WE_ESSENTIAL
135 /*------------------------------------------------------------------*/
136 /*
137 * Set Sensitivity
138 @@ -1459,6 +1461,7 @@ set_retry_info(int skfd,
139 /* Var args */
140 return(i);
141 }
142 +#endif /* WE_ESSENTIAL */
143
144 /*------------------------------------------------------------------*/
145 /*
146 @@ -1565,6 +1568,7 @@ set_frag_info(int skfd,
147 return(1);
148 }
149
150 +#ifndef WE_ESSENTIAL
151 /*------------------------------------------------------------------*/
152 /*
153 * Set Modulation
154 @@ -1712,28 +1716,28 @@ static const struct iwconfig_entry iwcon
155 "Set Encode", "{NNNN-NNNN|off}" },
156 { "key", set_enc_info, 1, SIOCSIWENCODE,
157 "Set Encode", "{NNNN-NNNN|off}" },
158 +#ifndef WE_ESSENTIAL
159 { "power", set_power_info, 1, SIOCSIWPOWER,
160 "Set Power Management", "{period N|timeout N|saving N|off}" },
161 -#ifndef WE_ESSENTIAL
162 { "nickname", set_nick_info, 1, SIOCSIWNICKN,
163 "Set Nickname", "NNN" },
164 { "nwid", set_nwid_info, 1, SIOCSIWNWID,
165 "Set NWID", "{NN|on|off}" },
166 - { "ap", set_apaddr_info, 1, SIOCSIWAP,
167 - "Set AP Address", "{N|off|auto}" },
168 - { "txpower", set_txpower_info, 1, SIOCSIWTXPOW,
169 - "Set Tx Power", "{NmW|NdBm|off|auto}" },
170 { "sens", set_sens_info, 1, SIOCSIWSENS,
171 "Set Sensitivity", "N" },
172 + { "modulation", set_modulation_info, 1, SIOCGIWMODUL,
173 + "Set Modulation", "{11g|11a|CCK|OFDMg|...}" },
174 { "retry", set_retry_info, 1, SIOCSIWRETRY,
175 "Set Retry Limit", "{limit N|lifetime N}" },
176 +#endif /* WE_ESSENTIAL */
177 + { "ap", set_apaddr_info, 1, SIOCSIWAP,
178 + "Set AP Address", "{N|off|auto}" },
179 + { "txpower", set_txpower_info, 1, SIOCSIWTXPOW,
180 + "Set Tx Power", "{NmW|NdBm|off|auto}" },
181 { "rts", set_rts_info, 1, SIOCSIWRTS,
182 "Set RTS Threshold", "{N|auto|fixed|off}" },
183 { "frag", set_frag_info, 1, SIOCSIWFRAG,
184 "Set Fragmentation Threshold", "{N|auto|fixed|off}" },
185 - { "modulation", set_modulation_info, 1, SIOCGIWMODUL,
186 - "Set Modulation", "{11g|11a|CCK|OFDMg|...}" },
187 -#endif /* WE_ESSENTIAL */
188 { "commit", set_commit_info, 0, SIOCSIWCOMMIT,
189 "Commit changes", "" },
190 { NULL, NULL, 0, 0, NULL, NULL },
191 --- a/iwmulticall.c
192 +++ b/iwmulticall.c
193 @@ -76,12 +76,10 @@ extern int
194 #undef iw_usage
195 #undef main
196
197 -#ifndef WE_ESSENTIAL
198 /* Get iwspy in there, it's not that big. */
199 #define main(args...) main_iwspy(args)
200 #include "iwspy.c"
201 #undef main
202 -#endif /* WE_ESSENTIAL */
203
204 /* Get iwpriv in there. Mandatory for HostAP and some other drivers. */
205 #define main(args...) main_iwpriv(args)
206 @@ -128,10 +126,8 @@ main(int argc,
207 return(main_iwconfig(argc, argv));
208 if(!strcmp(call_name, "iwlist"))
209 return(main_iwlist(argc, argv));
210 -#ifndef WE_ESSENTIAL
211 if(!strcmp(call_name, "iwspy"))
212 return(main_iwspy(argc, argv));
213 -#endif /* WE_ESSENTIAL */
214 if(!strcmp(call_name, "iwpriv"))
215 return(main_iwpriv(argc, argv));
216 if(!strcmp(call_name, "iwgetid"))
This page took 0.059007 seconds and 3 git commands to generate.