aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/rtl8192u/r8192U_wx.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/staging/rtl8192u/r8192U_wx.c')
-rw-r--r--drivers/staging/rtl8192u/r8192U_wx.c320
1 files changed, 160 insertions, 160 deletions
diff --git a/drivers/staging/rtl8192u/r8192U_wx.c b/drivers/staging/rtl8192u/r8192U_wx.c
index 490c994af30..1c953c73f73 100644
--- a/drivers/staging/rtl8192u/r8192U_wx.c
+++ b/drivers/staging/rtl8192u/r8192U_wx.c
@@ -193,15 +193,15 @@ static int r8192_wx_write_regs(struct net_device *dev,
193 struct iw_request_info *info, 193 struct iw_request_info *info,
194 union iwreq_data *wrqu, char *extra) 194 union iwreq_data *wrqu, char *extra)
195{ 195{
196 struct r8192_priv *priv = ieee80211_priv(dev); 196 struct r8192_priv *priv = ieee80211_priv(dev);
197 u8 addr; 197 u8 addr;
198 198
199 down(&priv->wx_sem); 199 down(&priv->wx_sem);
200 200
201 get_user(addr, (u8*)wrqu->data.pointer); 201 get_user(addr, (u8*)wrqu->data.pointer);
202 write_rtl8225(dev, addr, wrqu->data.length); 202 write_rtl8225(dev, addr, wrqu->data.length);
203 203
204 up(&priv->wx_sem); 204 up(&priv->wx_sem);
205 return 0; 205 return 0;
206 206
207} 207}
@@ -213,14 +213,14 @@ static int r8192_wx_read_bb(struct net_device *dev,
213 struct iw_request_info *info, 213 struct iw_request_info *info,
214 union iwreq_data *wrqu, char *extra) 214 union iwreq_data *wrqu, char *extra)
215{ 215{
216 struct r8192_priv *priv = ieee80211_priv(dev); 216 struct r8192_priv *priv = ieee80211_priv(dev);
217 u8 databb; 217 u8 databb;
218#if 0 218#if 0
219 int i; 219 int i;
220 for(i=0;i<12;i++) printk("%8x\n", read_cam(dev, i) ); 220 for(i=0;i<12;i++) printk("%8x\n", read_cam(dev, i) );
221#endif 221#endif
222 222
223 down(&priv->wx_sem); 223 down(&priv->wx_sem);
224 224
225 databb = rtl8187_read_phy(dev, (u8)wrqu->data.length, 0x00000000); 225 databb = rtl8187_read_phy(dev, (u8)wrqu->data.length, 0x00000000);
226 wrqu->data.length = databb; 226 wrqu->data.length = databb;
@@ -231,74 +231,74 @@ static int r8192_wx_read_bb(struct net_device *dev,
231 231
232void rtl8187_write_phy(struct net_device *dev, u8 adr, u32 data); 232void rtl8187_write_phy(struct net_device *dev, u8 adr, u32 data);
233static int r8192_wx_write_bb(struct net_device *dev, 233static int r8192_wx_write_bb(struct net_device *dev,
234 struct iw_request_info *info, 234 struct iw_request_info *info,
235 union iwreq_data *wrqu, char *extra) 235 union iwreq_data *wrqu, char *extra)
236{ 236{
237 struct r8192_priv *priv = ieee80211_priv(dev); 237 struct r8192_priv *priv = ieee80211_priv(dev);
238 u8 databb; 238 u8 databb;
239 239
240 down(&priv->wx_sem); 240 down(&priv->wx_sem);
241 241
242 get_user(databb, (u8*)wrqu->data.pointer); 242 get_user(databb, (u8*)wrqu->data.pointer);
243 rtl8187_write_phy(dev, wrqu->data.length, databb); 243 rtl8187_write_phy(dev, wrqu->data.length, databb);
244 244
245 up(&priv->wx_sem); 245 up(&priv->wx_sem);
246 return 0; 246 return 0;
247 247
248} 248}
249 249
250 250
251static int r8192_wx_write_nicb(struct net_device *dev, 251static int r8192_wx_write_nicb(struct net_device *dev,
252 struct iw_request_info *info, 252 struct iw_request_info *info,
253 union iwreq_data *wrqu, char *extra) 253 union iwreq_data *wrqu, char *extra)
254{ 254{
255 struct r8192_priv *priv = ieee80211_priv(dev); 255 struct r8192_priv *priv = ieee80211_priv(dev);
256 u32 addr; 256 u32 addr;
257 257
258 down(&priv->wx_sem); 258 down(&priv->wx_sem);
259 259
260 get_user(addr, (u32*)wrqu->data.pointer); 260 get_user(addr, (u32*)wrqu->data.pointer);
261 write_nic_byte(dev, addr, wrqu->data.length); 261 write_nic_byte(dev, addr, wrqu->data.length);
262 262
263 up(&priv->wx_sem); 263 up(&priv->wx_sem);
264 return 0; 264 return 0;
265 265
266} 266}
267static int r8192_wx_read_nicb(struct net_device *dev, 267static int r8192_wx_read_nicb(struct net_device *dev,
268 struct iw_request_info *info, 268 struct iw_request_info *info,
269 union iwreq_data *wrqu, char *extra) 269 union iwreq_data *wrqu, char *extra)
270{ 270{
271 struct r8192_priv *priv = ieee80211_priv(dev); 271 struct r8192_priv *priv = ieee80211_priv(dev);
272 u32 addr; 272 u32 addr;
273 u16 data1; 273 u16 data1;
274 274
275 down(&priv->wx_sem); 275 down(&priv->wx_sem);
276 276
277 get_user(addr,(u32*)wrqu->data.pointer); 277 get_user(addr,(u32*)wrqu->data.pointer);
278 data1 = read_nic_byte(dev, addr); 278 data1 = read_nic_byte(dev, addr);
279 wrqu->data.length = data1; 279 wrqu->data.length = data1;
280 280
281 up(&priv->wx_sem); 281 up(&priv->wx_sem);
282 return 0; 282 return 0;
283} 283}
284 284
285static int r8192_wx_get_ap_status(struct net_device *dev, 285static int r8192_wx_get_ap_status(struct net_device *dev,
286 struct iw_request_info *info, 286 struct iw_request_info *info,
287 union iwreq_data *wrqu, char *extra) 287 union iwreq_data *wrqu, char *extra)
288{ 288{
289 struct r8192_priv *priv = ieee80211_priv(dev); 289 struct r8192_priv *priv = ieee80211_priv(dev);
290 struct ieee80211_device *ieee = priv->ieee80211; 290 struct ieee80211_device *ieee = priv->ieee80211;
291 struct ieee80211_network *target; 291 struct ieee80211_network *target;
292 int name_len; 292 int name_len;
293 293
294 down(&priv->wx_sem); 294 down(&priv->wx_sem);
295 295
296 //count the length of input ssid 296 //count the length of input ssid
297 for(name_len=0 ; ((char*)wrqu->data.pointer)[name_len]!='\0' ; name_len++); 297 for(name_len=0 ; ((char*)wrqu->data.pointer)[name_len]!='\0' ; name_len++);
298 298
299 //search for the correspoding info which is received 299 //search for the correspoding info which is received
300 list_for_each_entry(target, &ieee->network_list, list) { 300 list_for_each_entry(target, &ieee->network_list, list) {
301 if ( (target->ssid_len == name_len) && 301 if ( (target->ssid_len == name_len) &&
302 (strncmp(target->ssid, (char*)wrqu->data.pointer, name_len)==0)){ 302 (strncmp(target->ssid, (char*)wrqu->data.pointer, name_len)==0)){
303 if(target->wpa_ie_len>0 || target->rsn_ie_len>0 ) 303 if(target->wpa_ie_len>0 || target->rsn_ie_len>0 )
304 //set flags=1 to indicate this ap is WPA 304 //set flags=1 to indicate this ap is WPA
@@ -307,11 +307,11 @@ static int r8192_wx_get_ap_status(struct net_device *dev,
307 307
308 308
309 break; 309 break;
310 } 310 }
311 } 311 }
312 312
313 up(&priv->wx_sem); 313 up(&priv->wx_sem);
314 return 0; 314 return 0;
315} 315}
316 316
317 317
@@ -404,25 +404,25 @@ static int r8192_wx_set_mode(struct net_device *dev, struct iw_request_info *a,
404 404
405struct iw_range_with_scan_capa 405struct iw_range_with_scan_capa
406{ 406{
407 /* Informative stuff (to choose between different interface) */ 407 /* Informative stuff (to choose between different interface) */
408 __u32 throughput; /* To give an idea... */ 408 __u32 throughput; /* To give an idea... */
409 /* In theory this value should be the maximum benchmarked 409 /* In theory this value should be the maximum benchmarked
410 * TCP/IP throughput, because with most of these devices the 410 * TCP/IP throughput, because with most of these devices the
411 * bit rate is meaningless (overhead an co) to estimate how 411 * bit rate is meaningless (overhead an co) to estimate how
412 * fast the connection will go and pick the fastest one. 412 * fast the connection will go and pick the fastest one.
413 * I suggest people to play with Netperf or any benchmark... 413 * I suggest people to play with Netperf or any benchmark...
414 */ 414 */
415 415
416 /* NWID (or domain id) */ 416 /* NWID (or domain id) */
417 __u32 min_nwid; /* Minimal NWID we are able to set */ 417 __u32 min_nwid; /* Minimal NWID we are able to set */
418 __u32 max_nwid; /* Maximal NWID we are able to set */ 418 __u32 max_nwid; /* Maximal NWID we are able to set */
419 419
420 /* Old Frequency (backward compat - moved lower ) */ 420 /* Old Frequency (backward compat - moved lower ) */
421 __u16 old_num_channels; 421 __u16 old_num_channels;
422 __u8 old_num_frequency; 422 __u8 old_num_frequency;
423 423
424 /* Scan capabilities */ 424 /* Scan capabilities */
425 __u8 scan_capa; 425 __u8 scan_capa;
426}; 426};
427static int rtl8180_wx_get_range(struct net_device *dev, 427static int rtl8180_wx_get_range(struct net_device *dev,
428 struct iw_request_info *info, 428 struct iw_request_info *info,
@@ -453,7 +453,7 @@ static int rtl8180_wx_get_range(struct net_device *dev,
453 // TODO: Not used in 802.11b? 453 // TODO: Not used in 802.11b?
454// range->max_nwid; /* Maximal NWID we are able to set */ 454// range->max_nwid; /* Maximal NWID we are able to set */
455 455
456 /* Old Frequency (backward compat - moved lower ) */ 456 /* Old Frequency (backward compat - moved lower ) */
457// range->old_num_channels; 457// range->old_num_channels;
458// range->old_num_frequency; 458// range->old_num_frequency;
459// range->old_freq[6]; /* Filler to keep "version" at the same offset */ 459// range->old_freq[6]; /* Filler to keep "version" at the same offset */
@@ -509,7 +509,7 @@ static int rtl8180_wx_get_range(struct net_device *dev,
509#else 509#else
510 if ((priv->ieee80211->channel_map)[i+1]) { 510 if ((priv->ieee80211->channel_map)[i+1]) {
511#endif 511#endif
512 range->freq[val].i = i + 1; 512 range->freq[val].i = i + 1;
513 range->freq[val].m = ieee80211_wlan_frequencies[i] * 100000; 513 range->freq[val].m = ieee80211_wlan_frequencies[i] * 100000;
514 range->freq[val].e = 1; 514 range->freq[val].e = 1;
515 val++; 515 val++;
@@ -522,7 +522,7 @@ static int rtl8180_wx_get_range(struct net_device *dev,
522 break; 522 break;
523 } 523 }
524 range->num_frequency = val; 524 range->num_frequency = val;
525 range->num_channels = val; 525 range->num_channels = val;
526#if WIRELESS_EXT > 17 526#if WIRELESS_EXT > 17
527 range->enc_capa = IW_ENC_CAPA_WPA|IW_ENC_CAPA_WPA2| 527 range->enc_capa = IW_ENC_CAPA_WPA|IW_ENC_CAPA_WPA2|
528 IW_ENC_CAPA_CIPHER_TKIP|IW_ENC_CAPA_CIPHER_CCMP; 528 IW_ENC_CAPA_CIPHER_TKIP|IW_ENC_CAPA_CIPHER_CCMP;
@@ -557,10 +557,10 @@ static int r8192_wx_set_scan(struct net_device *dev, struct iw_request_info *a,
557 557
558 down(&priv->wx_sem); 558 down(&priv->wx_sem);
559 if(priv->ieee80211->state != IEEE80211_LINKED){ 559 if(priv->ieee80211->state != IEEE80211_LINKED){
560 priv->ieee80211->scanning = 0; 560 priv->ieee80211->scanning = 0;
561 ieee80211_softmac_scan_syncro(priv->ieee80211); 561 ieee80211_softmac_scan_syncro(priv->ieee80211);
562 ret = 0; 562 ret = 0;
563 } 563 }
564 else 564 else
565 ret = ieee80211_wx_set_scan(priv->ieee80211,a,wrqu,b); 565 ret = ieee80211_wx_set_scan(priv->ieee80211,a,wrqu,b);
566 up(&priv->wx_sem); 566 up(&priv->wx_sem);
@@ -809,7 +809,7 @@ static int r8192_wx_set_enc(struct net_device *dev,
809static int r8192_wx_set_scan_type(struct net_device *dev, struct iw_request_info *aa, union 809static int r8192_wx_set_scan_type(struct net_device *dev, struct iw_request_info *aa, union
810 iwreq_data *wrqu, char *p){ 810 iwreq_data *wrqu, char *p){
811 811
812 struct r8192_priv *priv = ieee80211_priv(dev); 812 struct r8192_priv *priv = ieee80211_priv(dev);
813 int *parms=(int*)p; 813 int *parms=(int*)p;
814 int mode=parms[0]; 814 int mode=parms[0];
815 815
@@ -858,7 +858,7 @@ static int r8192_wx_set_retry(struct net_device *dev,
858 * I'm unsure if whole reset is really needed 858 * I'm unsure if whole reset is really needed
859 */ 859 */
860 860
861 rtl8192_commit(dev); 861 rtl8192_commit(dev);
862 /* 862 /*
863 if(priv->up){ 863 if(priv->up){
864 rtl8180_rtx_disable(dev); 864 rtl8180_rtx_disable(dev);
@@ -939,8 +939,8 @@ exit:
939#if (WIRELESS_EXT >= 18) 939#if (WIRELESS_EXT >= 18)
940#if 0 940#if 0
941static int r8192_wx_get_enc_ext(struct net_device *dev, 941static int r8192_wx_get_enc_ext(struct net_device *dev,
942 struct iw_request_info *info, 942 struct iw_request_info *info,
943 union iwreq_data *wrqu, char *extra) 943 union iwreq_data *wrqu, char *extra)
944{ 944{
945 struct r8192_priv *priv = ieee80211_priv(dev); 945 struct r8192_priv *priv = ieee80211_priv(dev);
946 int ret = 0; 946 int ret = 0;
@@ -950,8 +950,8 @@ static int r8192_wx_get_enc_ext(struct net_device *dev,
950#endif 950#endif
951//hw security need to reorganized. 951//hw security need to reorganized.
952static int r8192_wx_set_enc_ext(struct net_device *dev, 952static int r8192_wx_set_enc_ext(struct net_device *dev,
953 struct iw_request_info *info, 953 struct iw_request_info *info,
954 union iwreq_data *wrqu, char *extra) 954 union iwreq_data *wrqu, char *extra)
955{ 955{
956 int ret=0; 956 int ret=0;
957 #if LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0) 957 #if LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0)
@@ -1040,8 +1040,8 @@ end_hw_sec:
1040 1040
1041} 1041}
1042static int r8192_wx_set_auth(struct net_device *dev, 1042static int r8192_wx_set_auth(struct net_device *dev,
1043 struct iw_request_info *info, 1043 struct iw_request_info *info,
1044 union iwreq_data *data, char *extra) 1044 union iwreq_data *data, char *extra)
1045{ 1045{
1046 int ret=0; 1046 int ret=0;
1047#if LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0) 1047#if LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0)
@@ -1055,8 +1055,8 @@ static int r8192_wx_set_auth(struct net_device *dev,
1055} 1055}
1056 1056
1057static int r8192_wx_set_mlme(struct net_device *dev, 1057static int r8192_wx_set_mlme(struct net_device *dev,
1058 struct iw_request_info *info, 1058 struct iw_request_info *info,
1059 union iwreq_data *wrqu, char *extra) 1059 union iwreq_data *wrqu, char *extra)
1060{ 1060{
1061 //printk("====>%s()\n", __FUNCTION__); 1061 //printk("====>%s()\n", __FUNCTION__);
1062 1062
@@ -1072,21 +1072,21 @@ static int r8192_wx_set_mlme(struct net_device *dev,
1072} 1072}
1073#endif 1073#endif
1074static int r8192_wx_set_gen_ie(struct net_device *dev, 1074static int r8192_wx_set_gen_ie(struct net_device *dev,
1075 struct iw_request_info *info, 1075 struct iw_request_info *info,
1076 union iwreq_data *data, char *extra) 1076 union iwreq_data *data, char *extra)
1077{ 1077{
1078 //printk("====>%s(), len:%d\n", __FUNCTION__, data->length); 1078 //printk("====>%s(), len:%d\n", __FUNCTION__, data->length);
1079 int ret=0; 1079 int ret=0;
1080#if LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0) 1080#if LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0)
1081 struct r8192_priv *priv = ieee80211_priv(dev); 1081 struct r8192_priv *priv = ieee80211_priv(dev);
1082 down(&priv->wx_sem); 1082 down(&priv->wx_sem);
1083#if 1 1083#if 1
1084 ret = ieee80211_wx_set_gen_ie(priv->ieee80211, extra, data->data.length); 1084 ret = ieee80211_wx_set_gen_ie(priv->ieee80211, extra, data->data.length);
1085#endif 1085#endif
1086 up(&priv->wx_sem); 1086 up(&priv->wx_sem);
1087 //printk("<======%s(), ret:%d\n", __FUNCTION__, ret); 1087 //printk("<======%s(), ret:%d\n", __FUNCTION__, ret);
1088#endif 1088#endif
1089 return ret; 1089 return ret;
1090 1090
1091 1091
1092} 1092}
@@ -1100,56 +1100,56 @@ static int dummy(struct net_device *dev, struct iw_request_info *a,
1100 1100
1101static iw_handler r8192_wx_handlers[] = 1101static iw_handler r8192_wx_handlers[] =
1102{ 1102{
1103 NULL, /* SIOCSIWCOMMIT */ 1103 NULL, /* SIOCSIWCOMMIT */
1104 r8192_wx_get_name, /* SIOCGIWNAME */ 1104 r8192_wx_get_name, /* SIOCGIWNAME */
1105 dummy, /* SIOCSIWNWID */ 1105 dummy, /* SIOCSIWNWID */
1106 dummy, /* SIOCGIWNWID */ 1106 dummy, /* SIOCGIWNWID */
1107 r8192_wx_set_freq, /* SIOCSIWFREQ */ 1107 r8192_wx_set_freq, /* SIOCSIWFREQ */
1108 r8192_wx_get_freq, /* SIOCGIWFREQ */ 1108 r8192_wx_get_freq, /* SIOCGIWFREQ */
1109 r8192_wx_set_mode, /* SIOCSIWMODE */ 1109 r8192_wx_set_mode, /* SIOCSIWMODE */
1110 r8192_wx_get_mode, /* SIOCGIWMODE */ 1110 r8192_wx_get_mode, /* SIOCGIWMODE */
1111 r8192_wx_set_sens, /* SIOCSIWSENS */ 1111 r8192_wx_set_sens, /* SIOCSIWSENS */
1112 r8192_wx_get_sens, /* SIOCGIWSENS */ 1112 r8192_wx_get_sens, /* SIOCGIWSENS */
1113 NULL, /* SIOCSIWRANGE */ 1113 NULL, /* SIOCSIWRANGE */
1114 rtl8180_wx_get_range, /* SIOCGIWRANGE */ 1114 rtl8180_wx_get_range, /* SIOCGIWRANGE */
1115 NULL, /* SIOCSIWPRIV */ 1115 NULL, /* SIOCSIWPRIV */
1116 NULL, /* SIOCGIWPRIV */ 1116 NULL, /* SIOCGIWPRIV */
1117 NULL, /* SIOCSIWSTATS */ 1117 NULL, /* SIOCSIWSTATS */
1118 NULL, /* SIOCGIWSTATS */ 1118 NULL, /* SIOCGIWSTATS */
1119 dummy, /* SIOCSIWSPY */ 1119 dummy, /* SIOCSIWSPY */
1120 dummy, /* SIOCGIWSPY */ 1120 dummy, /* SIOCGIWSPY */
1121 NULL, /* SIOCGIWTHRSPY */ 1121 NULL, /* SIOCGIWTHRSPY */
1122 NULL, /* SIOCWIWTHRSPY */ 1122 NULL, /* SIOCWIWTHRSPY */
1123 r8192_wx_set_wap, /* SIOCSIWAP */ 1123 r8192_wx_set_wap, /* SIOCSIWAP */
1124 r8192_wx_get_wap, /* SIOCGIWAP */ 1124 r8192_wx_get_wap, /* SIOCGIWAP */
1125#if (WIRELESS_EXT >= 18) 1125#if (WIRELESS_EXT >= 18)
1126 r8192_wx_set_mlme, /* MLME-- */ 1126 r8192_wx_set_mlme, /* MLME-- */
1127#else 1127#else
1128 NULL, 1128 NULL,
1129#endif 1129#endif
1130 dummy, /* SIOCGIWAPLIST -- depricated */ 1130 dummy, /* SIOCGIWAPLIST -- depricated */
1131 r8192_wx_set_scan, /* SIOCSIWSCAN */ 1131 r8192_wx_set_scan, /* SIOCSIWSCAN */
1132 r8192_wx_get_scan, /* SIOCGIWSCAN */ 1132 r8192_wx_get_scan, /* SIOCGIWSCAN */
1133 r8192_wx_set_essid, /* SIOCSIWESSID */ 1133 r8192_wx_set_essid, /* SIOCSIWESSID */
1134 r8192_wx_get_essid, /* SIOCGIWESSID */ 1134 r8192_wx_get_essid, /* SIOCGIWESSID */
1135 dummy, /* SIOCSIWNICKN */ 1135 dummy, /* SIOCSIWNICKN */
1136 dummy, /* SIOCGIWNICKN */ 1136 dummy, /* SIOCGIWNICKN */
1137 NULL, /* -- hole -- */ 1137 NULL, /* -- hole -- */
1138 NULL, /* -- hole -- */ 1138 NULL, /* -- hole -- */
1139 r8192_wx_set_rate, /* SIOCSIWRATE */ 1139 r8192_wx_set_rate, /* SIOCSIWRATE */
1140 r8192_wx_get_rate, /* SIOCGIWRATE */ 1140 r8192_wx_get_rate, /* SIOCGIWRATE */
1141 r8192_wx_set_rts, /* SIOCSIWRTS */ 1141 r8192_wx_set_rts, /* SIOCSIWRTS */
1142 r8192_wx_get_rts, /* SIOCGIWRTS */ 1142 r8192_wx_get_rts, /* SIOCGIWRTS */
1143 r8192_wx_set_frag, /* SIOCSIWFRAG */ 1143 r8192_wx_set_frag, /* SIOCSIWFRAG */
1144 r8192_wx_get_frag, /* SIOCGIWFRAG */ 1144 r8192_wx_get_frag, /* SIOCGIWFRAG */
1145 dummy, /* SIOCSIWTXPOW */ 1145 dummy, /* SIOCSIWTXPOW */
1146 dummy, /* SIOCGIWTXPOW */ 1146 dummy, /* SIOCGIWTXPOW */
1147 r8192_wx_set_retry, /* SIOCSIWRETRY */ 1147 r8192_wx_set_retry, /* SIOCSIWRETRY */
1148 r8192_wx_get_retry, /* SIOCGIWRETRY */ 1148 r8192_wx_get_retry, /* SIOCGIWRETRY */
1149 r8192_wx_set_enc, /* SIOCSIWENCODE */ 1149 r8192_wx_set_enc, /* SIOCSIWENCODE */
1150 r8192_wx_get_enc, /* SIOCGIWENCODE */ 1150 r8192_wx_get_enc, /* SIOCGIWENCODE */
1151 r8192_wx_set_power, /* SIOCSIWPOWER */ 1151 r8192_wx_set_power, /* SIOCSIWPOWER */
1152 r8192_wx_get_power, /* SIOCGIWPOWER */ 1152 r8192_wx_get_power, /* SIOCGIWPOWER */
1153 NULL, /*---hole---*/ 1153 NULL, /*---hole---*/
1154 NULL, /*---hole---*/ 1154 NULL, /*---hole---*/
1155 r8192_wx_set_gen_ie,//NULL, /* SIOCSIWGENIE */ 1155 r8192_wx_set_gen_ie,//NULL, /* SIOCSIWGENIE */
@@ -1192,38 +1192,38 @@ static const struct iw_priv_args r8192_private_args[] = {
1192 , 1192 ,
1193 { 1193 {
1194 SIOCIWFIRSTPRIV + 0x3, 1194 SIOCIWFIRSTPRIV + 0x3,
1195 IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "readRF" 1195 IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "readRF"
1196 } 1196 }
1197 , 1197 ,
1198 { 1198 {
1199 SIOCIWFIRSTPRIV + 0x4, 1199 SIOCIWFIRSTPRIV + 0x4,
1200 IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "writeRF" 1200 IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "writeRF"
1201 } 1201 }
1202 , 1202 ,
1203 { 1203 {
1204 SIOCIWFIRSTPRIV + 0x5, 1204 SIOCIWFIRSTPRIV + 0x5,
1205 IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "readBB" 1205 IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "readBB"
1206 } 1206 }
1207 , 1207 ,
1208 { 1208 {
1209 SIOCIWFIRSTPRIV + 0x6, 1209 SIOCIWFIRSTPRIV + 0x6,
1210 IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "writeBB" 1210 IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "writeBB"
1211 }
1212 ,
1213 {
1214 SIOCIWFIRSTPRIV + 0x7,
1215 IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "readnicb"
1216 }
1217 ,
1218 {
1219 SIOCIWFIRSTPRIV + 0x8,
1220 IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "writenicb"
1221 }
1222 ,
1223 {
1224 SIOCIWFIRSTPRIV + 0x9,
1225 IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "apinfo"
1211 } 1226 }
1212 ,
1213 {
1214 SIOCIWFIRSTPRIV + 0x7,
1215 IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "readnicb"
1216 }
1217 ,
1218 {
1219 SIOCIWFIRSTPRIV + 0x8,
1220 IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "writenicb"
1221 }
1222 ,
1223 {
1224 SIOCIWFIRSTPRIV + 0x9,
1225 IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "apinfo"
1226 }
1227 1227
1228#endif 1228#endif
1229 , 1229 ,
@@ -1249,8 +1249,8 @@ static iw_handler r8192_private_handler[] = {
1249 r8192_wx_write_regs, 1249 r8192_wx_write_regs,
1250 r8192_wx_read_bb, 1250 r8192_wx_read_bb,
1251 r8192_wx_write_bb, 1251 r8192_wx_write_bb,
1252 r8192_wx_read_nicb, 1252 r8192_wx_read_nicb,
1253 r8192_wx_write_nicb, 1253 r8192_wx_write_nicb,
1254 r8192_wx_get_ap_status, 1254 r8192_wx_get_ap_status,
1255#endif 1255#endif
1256 //r8192_wx_null, 1256 //r8192_wx_null,
@@ -1290,7 +1290,7 @@ struct iw_statistics *r8192_get_wireless_stats(struct net_device *dev)
1290#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,14)) 1290#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,14))
1291 wstats->qual.updated = IW_QUAL_ALL_UPDATED| IW_QUAL_DBM; 1291 wstats->qual.updated = IW_QUAL_ALL_UPDATED| IW_QUAL_DBM;
1292#else 1292#else
1293 wstats->qual.updated = 0x0f; 1293 wstats->qual.updated = 0x0f;
1294#endif 1294#endif
1295 return wstats; 1295 return wstats;
1296} 1296}
@@ -1302,7 +1302,7 @@ struct iw_handler_def r8192_wx_handlers_def={
1302 .num_standard = sizeof(r8192_wx_handlers) / sizeof(iw_handler), 1302 .num_standard = sizeof(r8192_wx_handlers) / sizeof(iw_handler),
1303 .private = r8192_private_handler, 1303 .private = r8192_private_handler,
1304 .num_private = sizeof(r8192_private_handler) / sizeof(iw_handler), 1304 .num_private = sizeof(r8192_private_handler) / sizeof(iw_handler),
1305 .num_private_args = sizeof(r8192_private_args) / sizeof(struct iw_priv_args), 1305 .num_private_args = sizeof(r8192_private_args) / sizeof(struct iw_priv_args),
1306#if WIRELESS_EXT >= 17 1306#if WIRELESS_EXT >= 17
1307 .get_wireless_stats = r8192_get_wireless_stats, 1307 .get_wireless_stats = r8192_get_wireless_stats,
1308#endif 1308#endif