kernel: add CONFIG_IPV6_SIT_6RD
[openwrt.git] / package / wireless-tools / patches / 003-we_essential_def.patch
1 --- a/iwlist.c
2 +++ b/iwlist.c
3 @@ -58,7 +58,6 @@ typedef struct iw_auth_descr
4   * Maybe this should go in iwlib.c ?
5   */
6  
7 -#ifndef WE_ESSENTIAL
8  #define IW_ARRAY_LEN(x) (sizeof(x)/sizeof((x)[0]))
9  
10  //static const struct iwmask_name iw_enc_mode_name[] = {
11 @@ -161,11 +160,8 @@ static const char *        iw_ie_key_mgmt_name[
12  };
13  #define        IW_IE_KEY_MGMT_NUM      IW_ARRAY_LEN(iw_ie_key_mgmt_name)
14  
15 -#endif /* WE_ESSENTIAL */
16 -
17  /************************* WPA SUBROUTINES *************************/
18  
19 -#ifndef WE_ESSENTIAL
20  /*------------------------------------------------------------------*/
21  /*
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;
25      }
26  }
27 -#endif /* WE_ESSENTIAL */
28  
29  /***************************** SCANNING *****************************/
30  /*
31 @@ -585,12 +580,10 @@ print_scanning_token(struct stream_descr
32                      &event->u.qual, iw_range, has_range);
33        printf("                    %s\n", buffer);
34        break;
35 -#ifndef WE_ESSENTIAL
36      case IWEVGENIE:
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);
39        break;
40 -#endif /* WE_ESSENTIAL */
41      case IWEVCUSTOM:
42        {
43         char custom[IW_CUSTOM_MAX+1];
44 @@ -1302,7 +1295,6 @@ print_pm_info(int         skfd,
45    return(0);
46  }
47  
48 -#ifndef WE_ESSENTIAL
49  /************************** TRANSMIT POWER **************************/
50  
51  /*------------------------------------------------------------------*/
52 @@ -1405,6 +1397,7 @@ print_txpower_info(int            skfd,
53    return(0);
54  }
55  
56 +#ifndef WE_ESSENTIAL
57  /*********************** RETRY LIMIT/LIFETIME ***********************/
58  
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 },
64 -#ifndef WE_ESSENTIAL
65    { "txpower",         print_txpower_info,     0, NULL },
66 +#ifndef WE_ESSENTIAL
67    { "retry",           print_retry_info,       0, NULL },
68    { "ap",              print_ap_info,          0, NULL },
69    { "accesspoints",    print_ap_info,          0, NULL },
70 --- a/iwconfig.c
71 +++ b/iwconfig.c
72 @@ -106,16 +106,6 @@ get_info(int                       skfd,
73      if(wrq.u.data.length > 1)
74        info->has_nickname = 1;
75  
76 -  if((info->has_range) && (info->range.we_version_compiled > 9))
77 -    {
78 -      /* Get Transmit Power */
79 -      if(iw_get_ext(skfd, ifname, SIOCGIWTXPOW, &wrq) >= 0)
80 -       {
81 -         info->has_txpower = 1;
82 -         memcpy(&(info->txpower), &(wrq.u.txpower), sizeof(iwparam));
83 -       }
84 -    }
85 -
86    /* Get sensitivity */
87    if(iw_get_ext(skfd, ifname, SIOCGIWSENS, &wrq) >= 0)
88      {
89 @@ -132,6 +122,17 @@ get_info(int                       skfd,
90           memcpy(&(info->retry), &(wrq.u.retry), sizeof(iwparam));
91         }
92      }
93 +#endif /* WE_ESSENTIAL */
94 +
95 +  if((info->has_range) && (info->range.we_version_compiled > 9))
96 +    {
97 +      /* Get Transmit Power */
98 +      if(iw_get_ext(skfd, ifname, SIOCGIWTXPOW, &wrq) >= 0)
99 +       {
100 +         info->has_txpower = 1;
101 +         memcpy(&(info->txpower), &(wrq.u.txpower), sizeof(iwparam));
102 +       }
103 +    }
104  
105    /* Get RTS threshold */
106    if(iw_get_ext(skfd, ifname, SIOCGIWRTS, &wrq) >= 0)
107 @@ -146,7 +147,6 @@ get_info(int                        skfd,
108        info->has_frag = 1;
109        memcpy(&(info->frag), &(wrq.u.frag), sizeof(iwparam));
110      }
111 -#endif /* WE_ESSENTIAL */
112  
113    return(0);
114  }
115 @@ -269,7 +269,6 @@ display_info(struct wireless_info * info
116        printf("Bit Rate%c%s   ", (info->bitrate.fixed ? '=' : ':'), buffer);
117      }
118  
119 -#ifndef WE_ESSENTIAL
120    /* Display the Transmit Power */
121    if(info->has_txpower)
122      {
123 @@ -286,6 +285,7 @@ display_info(struct wireless_info * info
124        printf("Tx-Power%c%s   ", (info->txpower.fixed ? '=' : ':'), buffer);
125      }
126  
127 +#ifndef WE_ESSENTIAL
128    /* Display sensitivity */
129    if(info->has_sens)
130      {
131 @@ -340,6 +340,7 @@ display_info(struct wireless_info * info
132        printf("   ");
133        tokens += 5;     /* Between 3 and 5, depend on flags */
134      }
135 +#endif /* WE_ESSENTIAL */
136  
137    /* Display the RTS threshold */
138    if(info->has_rts)
139 @@ -383,7 +384,6 @@ display_info(struct wireless_info * info
140    /* Formating */
141    if(tokens > 0)
142      printf("\n          ");
143 -#endif /* WE_ESSENTIAL */
144  
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,
148    /* 1 arg */
149    return(1);
150  }
151 +#endif /* WE_ESSENTIAL */
152  
153  /*------------------------------------------------------------------*/
154  /*
155 @@ -1362,6 +1363,7 @@ set_txpower_info(int              skfd,
156    return(i);
157  }
158  
159 +#ifndef WE_ESSENTIAL
160  /*------------------------------------------------------------------*/
161  /*
162   * Set Sensitivity
163 @@ -1459,6 +1461,7 @@ set_retry_info(int                skfd,
164    /* Var args */
165    return(i);
166  }
167 +#endif /* WE_ESSENTIAL */
168  
169  /*------------------------------------------------------------------*/
170  /*
171 @@ -1565,6 +1568,7 @@ set_frag_info(int         skfd,
172    return(1);
173  }
174  
175 +#ifndef WE_ESSENTIAL
176  /*------------------------------------------------------------------*/
177  /*
178   * Set Modulation
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 },
208 --- a/iwmulticall.c
209 +++ b/iwmulticall.c
210 @@ -76,12 +76,10 @@ extern int
211  #undef iw_usage
212  #undef main
213  
214 -#ifndef WE_ESSENTIAL
215  /* Get iwspy in there, it's not that big. */
216  #define main(args...) main_iwspy(args)
217  #include "iwspy.c"
218  #undef main
219 -#endif /* WE_ESSENTIAL */
220  
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"))