old mode 100644new mode 100755| .. | .. |
|---|
| 216 | 216 | #endif /* !WL_ESCAN */ |
|---|
| 217 | 217 | |
|---|
| 218 | 218 | struct pmk_list { |
|---|
| 219 | | - pmkid_list_v1_t pmkids; |
|---|
| 220 | | - pmkid_v1_t foo[MAXPMKID - 1]; |
|---|
| 219 | + pmkid_list_t pmkids; |
|---|
| 220 | + pmkid_t foo[MAXPMKID - 1]; |
|---|
| 221 | 221 | }; |
|---|
| 222 | 222 | |
|---|
| 223 | 223 | typedef struct wl_wext_info { |
|---|
| .. | .. |
|---|
| 293 | 293 | |
|---|
| 294 | 294 | index = dhd_net2idx(dhd->info, dev); |
|---|
| 295 | 295 | if (index == DHD_BAD_IF) { |
|---|
| 296 | | - WL_ERROR(("Bad ifidx from %s\n", dev->name)); |
|---|
| 296 | + WL_ERROR(("Bad ifidx from dev:%p\n", dev)); |
|---|
| 297 | 297 | return -ENODEV; |
|---|
| 298 | 298 | } |
|---|
| 299 | 299 | ret = dhd_ioctl_process(dhd, index, &ioc, arg); |
|---|
| .. | .. |
|---|
| 456 | 456 | #endif /* WIRELESS_EXT < 13 */ |
|---|
| 457 | 457 | |
|---|
| 458 | 458 | #if WIRELESS_EXT > 12 |
|---|
| 459 | | -#ifdef CONFIG_WEXT_PRIV |
|---|
| 460 | 459 | static int |
|---|
| 461 | 460 | wl_iw_set_leddc( |
|---|
| 462 | 461 | struct net_device *dev, |
|---|
| .. | .. |
|---|
| 503 | 502 | error = dev_wlc_ioctl(dev, WLC_SET_PM, &pm, sizeof(pm)); |
|---|
| 504 | 503 | return error; |
|---|
| 505 | 504 | } |
|---|
| 506 | | -#endif /* CONFIG_WEXT_PRIV */ |
|---|
| 507 | 505 | #endif /* WIRELESS_EXT > 12 */ |
|---|
| 508 | 506 | |
|---|
| 509 | 507 | int |
|---|
| .. | .. |
|---|
| 534 | 532 | wl_iw_config_commit( |
|---|
| 535 | 533 | struct net_device *dev, |
|---|
| 536 | 534 | struct iw_request_info *info, |
|---|
| 537 | | - union iwreq_data *zwrq, |
|---|
| 535 | + void *zwrq, |
|---|
| 538 | 536 | char *extra |
|---|
| 539 | 537 | ) |
|---|
| 540 | 538 | { |
|---|
| .. | .. |
|---|
| 618 | 616 | wl_iw_set_freq( |
|---|
| 619 | 617 | struct net_device *dev, |
|---|
| 620 | 618 | struct iw_request_info *info, |
|---|
| 621 | | - union iwreq_data *wrqu, |
|---|
| 619 | + struct iw_freq *fwrq, |
|---|
| 622 | 620 | char *extra |
|---|
| 623 | 621 | ) |
|---|
| 624 | 622 | { |
|---|
| 625 | | - struct iw_freq *fwrq = &wrqu->freq; |
|---|
| 626 | 623 | int error, chan; |
|---|
| 627 | 624 | uint sf = 0; |
|---|
| 628 | 625 | struct dhd_pub *dhd = dhd_get_pub(dev); |
|---|
| .. | .. |
|---|
| 671 | 668 | wl_iw_get_freq( |
|---|
| 672 | 669 | struct net_device *dev, |
|---|
| 673 | 670 | struct iw_request_info *info, |
|---|
| 674 | | - union iwreq_data *wrqu, |
|---|
| 671 | + struct iw_freq *fwrq, |
|---|
| 675 | 672 | char *extra |
|---|
| 676 | 673 | ) |
|---|
| 677 | 674 | { |
|---|
| 678 | | - struct dhd_pub *dhd = dhd_get_pub(dev); |
|---|
| 679 | | - struct iw_freq *fwrq = &wrqu->freq; |
|---|
| 680 | 675 | int error; |
|---|
| 681 | | - u32 val; |
|---|
| 682 | | - chanspec_t chanspec = 0; |
|---|
| 676 | + u32 chanspec = 0; |
|---|
| 683 | 677 | int ctl_chan; |
|---|
| 684 | 678 | |
|---|
| 685 | 679 | WL_TRACE(("%s: SIOCGIWFREQ\n", dev->name)); |
|---|
| 686 | 680 | |
|---|
| 687 | | - DHD_CHECK(dhd, dev); |
|---|
| 688 | | - if ((error = dev_wlc_intvar_get(dev, "chanspec", &val))) |
|---|
| 681 | + if ((error = dev_wlc_intvar_get(dev, "chanspec", &chanspec))) |
|---|
| 689 | 682 | return error; |
|---|
| 690 | | - chanspec = val; |
|---|
| 691 | | - chanspec = wl_ext_chspec_driver_to_host(dhd, chanspec); |
|---|
| 692 | 683 | ctl_chan = wf_chspec_ctlchan(chanspec); |
|---|
| 693 | 684 | |
|---|
| 694 | 685 | /* Return radio channel in channel form */ |
|---|
| .. | .. |
|---|
| 701 | 692 | wl_iw_set_mode( |
|---|
| 702 | 693 | struct net_device *dev, |
|---|
| 703 | 694 | struct iw_request_info *info, |
|---|
| 704 | | - union iwreq_data *wrqu, |
|---|
| 695 | + __u32 *uwrq, |
|---|
| 705 | 696 | char *extra |
|---|
| 706 | 697 | ) |
|---|
| 707 | 698 | { |
|---|
| .. | .. |
|---|
| 718 | 709 | wext_info->conn_info.channel = 0; |
|---|
| 719 | 710 | } |
|---|
| 720 | 711 | |
|---|
| 721 | | - switch (wrqu->mode) { |
|---|
| 712 | + switch (*uwrq) { |
|---|
| 722 | 713 | case IW_MODE_MASTER: |
|---|
| 723 | 714 | infra = ap = 1; |
|---|
| 724 | 715 | break; |
|---|
| .. | .. |
|---|
| 746 | 737 | wl_iw_get_mode( |
|---|
| 747 | 738 | struct net_device *dev, |
|---|
| 748 | 739 | struct iw_request_info *info, |
|---|
| 749 | | - union iwreq_data *wrqu, |
|---|
| 740 | + __u32 *uwrq, |
|---|
| 750 | 741 | char *extra |
|---|
| 751 | 742 | ) |
|---|
| 752 | 743 | { |
|---|
| .. | .. |
|---|
| 760 | 751 | |
|---|
| 761 | 752 | infra = dtoh32(infra); |
|---|
| 762 | 753 | ap = dtoh32(ap); |
|---|
| 763 | | - wrqu->mode = infra ? ap ? IW_MODE_MASTER : IW_MODE_INFRA : IW_MODE_ADHOC; |
|---|
| 754 | + *uwrq = infra ? ap ? IW_MODE_MASTER : IW_MODE_INFRA : IW_MODE_ADHOC; |
|---|
| 764 | 755 | |
|---|
| 765 | 756 | return 0; |
|---|
| 766 | 757 | } |
|---|
| .. | .. |
|---|
| 769 | 760 | wl_iw_get_range( |
|---|
| 770 | 761 | struct net_device *dev, |
|---|
| 771 | 762 | struct iw_request_info *info, |
|---|
| 772 | | - union iwreq_data *wrqu, |
|---|
| 763 | + struct iw_point *dwrq, |
|---|
| 773 | 764 | char *extra |
|---|
| 774 | 765 | ) |
|---|
| 775 | 766 | { |
|---|
| 776 | | - struct iw_point *dwrq = (struct iw_point *)wrqu; |
|---|
| 777 | 767 | struct iw_range *range = (struct iw_range *) extra; |
|---|
| 778 | 768 | static int channels[MAXCHANNEL+1]; |
|---|
| 779 | 769 | wl_uint32_list_t *list = (wl_uint32_list_t *) channels; |
|---|
| .. | .. |
|---|
| 1002 | 992 | wl_iw_set_spy( |
|---|
| 1003 | 993 | struct net_device *dev, |
|---|
| 1004 | 994 | struct iw_request_info *info, |
|---|
| 1005 | | - union iwreq_data *wrqu, |
|---|
| 995 | + struct iw_point *dwrq, |
|---|
| 1006 | 996 | char *extra |
|---|
| 1007 | 997 | ) |
|---|
| 1008 | 998 | { |
|---|
| 1009 | | - struct iw_point *dwrq = (struct iw_point *)wrqu; |
|---|
| 1010 | 999 | wl_iw_t *iw = IW_DEV_IF(dev); |
|---|
| 1011 | 1000 | struct sockaddr *addr = (struct sockaddr *) extra; |
|---|
| 1012 | 1001 | int i; |
|---|
| .. | .. |
|---|
| 1028 | 1017 | wl_iw_get_spy( |
|---|
| 1029 | 1018 | struct net_device *dev, |
|---|
| 1030 | 1019 | struct iw_request_info *info, |
|---|
| 1031 | | - union iwreq_data *wrqu, |
|---|
| 1020 | + struct iw_point *dwrq, |
|---|
| 1032 | 1021 | char *extra |
|---|
| 1033 | 1022 | ) |
|---|
| 1034 | 1023 | { |
|---|
| 1035 | | - struct iw_point *dwrq = (struct iw_point *)wrqu; |
|---|
| 1036 | 1024 | wl_iw_t *iw = IW_DEV_IF(dev); |
|---|
| 1037 | 1025 | struct sockaddr *addr = (struct sockaddr *) extra; |
|---|
| 1038 | 1026 | struct iw_quality *qual = (struct iw_quality *) &addr[iw->spy_num]; |
|---|
| .. | .. |
|---|
| 1058 | 1046 | wl_iw_set_wap( |
|---|
| 1059 | 1047 | struct net_device *dev, |
|---|
| 1060 | 1048 | struct iw_request_info *info, |
|---|
| 1061 | | - union iwreq_data *wrqu, |
|---|
| 1049 | + struct sockaddr *awrq, |
|---|
| 1062 | 1050 | char *extra |
|---|
| 1063 | 1051 | ) |
|---|
| 1064 | 1052 | { |
|---|
| .. | .. |
|---|
| 1069 | 1057 | WL_TRACE(("%s: SIOCSIWAP\n", dev->name)); |
|---|
| 1070 | 1058 | DHD_CHECK(dhd, dev); |
|---|
| 1071 | 1059 | wext_info = dhd->wext_info; |
|---|
| 1072 | | - if (wrqu->ap_addr.sa_family != ARPHRD_ETHER) { |
|---|
| 1060 | + if (awrq->sa_family != ARPHRD_ETHER) { |
|---|
| 1073 | 1061 | WL_ERROR(("Invalid Header...sa_family\n")); |
|---|
| 1074 | 1062 | return -EINVAL; |
|---|
| 1075 | 1063 | } |
|---|
| 1076 | 1064 | |
|---|
| 1077 | 1065 | /* Ignore "auto" or "off" */ |
|---|
| 1078 | | - if (ETHER_ISBCAST(wrqu->ap_addr.sa_data) || ETHER_ISNULLADDR(wrqu->ap_addr.sa_data)) { |
|---|
| 1066 | + if (ETHER_ISBCAST(awrq->sa_data) || ETHER_ISNULLADDR(awrq->sa_data)) { |
|---|
| 1079 | 1067 | scb_val_t scbval; |
|---|
| 1080 | 1068 | bzero(&scbval, sizeof(scb_val_t)); |
|---|
| 1081 | 1069 | WL_MSG(dev->name, "WLC_DISASSOC\n"); |
|---|
| .. | .. |
|---|
| 1088 | 1076 | #endif |
|---|
| 1089 | 1077 | return 0; |
|---|
| 1090 | 1078 | } |
|---|
| 1091 | | - /* WL_ASSOC(("Assoc to %s\n", bcm_ether_ntoa((struct ether_addr *)&(wrqu->ap_addr.sa_data), |
|---|
| 1079 | + /* WL_ASSOC(("Assoc to %s\n", bcm_ether_ntoa((struct ether_addr *)&(awrq->sa_data), |
|---|
| 1092 | 1080 | * eabuf))); |
|---|
| 1093 | 1081 | */ |
|---|
| 1094 | 1082 | /* Reassociate to the specified AP */ |
|---|
| 1095 | 1083 | if (wext_info) |
|---|
| 1096 | | - memcpy(&wext_info->conn_info.bssid, wrqu->ap_addr.sa_data, ETHER_ADDR_LEN); |
|---|
| 1084 | + memcpy(&wext_info->conn_info.bssid, awrq->sa_data, ETHER_ADDR_LEN); |
|---|
| 1097 | 1085 | if (wext_info && wext_info->conn_info.ssid.SSID_len) { |
|---|
| 1098 | 1086 | if ((error = wl_ext_connect(dev, &wext_info->conn_info))) |
|---|
| 1099 | 1087 | return error; |
|---|
| 1100 | 1088 | } else { |
|---|
| 1101 | | - if ((error = dev_wlc_ioctl(dev, WLC_REASSOC, wrqu->ap_addr.sa_data, ETHER_ADDR_LEN))) { |
|---|
| 1089 | + if ((error = dev_wlc_ioctl(dev, WLC_REASSOC, awrq->sa_data, ETHER_ADDR_LEN))) { |
|---|
| 1102 | 1090 | WL_ERROR(("WLC_REASSOC failed (%d).\n", error)); |
|---|
| 1103 | 1091 | return error; |
|---|
| 1104 | 1092 | } |
|---|
| 1105 | | - WL_MSG(dev->name, "join BSSID="MACSTR"\n", MAC2STR((u8 *)wrqu->ap_addr.sa_data)); |
|---|
| 1093 | + WL_MSG(dev->name, "join BSSID="MACSTR"\n", MAC2STR((u8 *)awrq->sa_data)); |
|---|
| 1106 | 1094 | } |
|---|
| 1107 | 1095 | #ifdef WL_EXT_IAPSTA |
|---|
| 1108 | 1096 | wl_ext_in4way_sync_wext(dev, STA_NO_BTC_IN4WAY, WL_EXT_STATUS_CONNECTING, NULL); |
|---|
| .. | .. |
|---|
| 1115 | 1103 | wl_iw_get_wap( |
|---|
| 1116 | 1104 | struct net_device *dev, |
|---|
| 1117 | 1105 | struct iw_request_info *info, |
|---|
| 1118 | | - union iwreq_data *wrqu, |
|---|
| 1106 | + struct sockaddr *awrq, |
|---|
| 1119 | 1107 | char *extra |
|---|
| 1120 | 1108 | ) |
|---|
| 1121 | 1109 | { |
|---|
| 1122 | 1110 | WL_TRACE(("%s: SIOCGIWAP\n", dev->name)); |
|---|
| 1123 | 1111 | |
|---|
| 1124 | | - wrqu->ap_addr.sa_family = ARPHRD_ETHER; |
|---|
| 1125 | | - memset(wrqu->ap_addr.sa_data, 0, ETHER_ADDR_LEN); |
|---|
| 1112 | + awrq->sa_family = ARPHRD_ETHER; |
|---|
| 1113 | + memset(awrq->sa_data, 0, ETHER_ADDR_LEN); |
|---|
| 1126 | 1114 | |
|---|
| 1127 | 1115 | /* Ignore error (may be down or disassociated) */ |
|---|
| 1128 | | - (void) dev_wlc_ioctl(dev, WLC_GET_BSSID, wrqu->ap_addr.sa_data, ETHER_ADDR_LEN); |
|---|
| 1116 | + (void) dev_wlc_ioctl(dev, WLC_GET_BSSID, awrq->sa_data, ETHER_ADDR_LEN); |
|---|
| 1129 | 1117 | |
|---|
| 1130 | 1118 | return 0; |
|---|
| 1131 | 1119 | } |
|---|
| .. | .. |
|---|
| 1135 | 1123 | wl_iw_mlme( |
|---|
| 1136 | 1124 | struct net_device *dev, |
|---|
| 1137 | 1125 | struct iw_request_info *info, |
|---|
| 1138 | | - union iwreq_data *wrqu, |
|---|
| 1126 | + struct sockaddr *awrq, |
|---|
| 1139 | 1127 | char *extra |
|---|
| 1140 | 1128 | ) |
|---|
| 1141 | 1129 | { |
|---|
| .. | .. |
|---|
| 1183 | 1171 | wl_iw_get_aplist( |
|---|
| 1184 | 1172 | struct net_device *dev, |
|---|
| 1185 | 1173 | struct iw_request_info *info, |
|---|
| 1186 | | - union iwreq_data *wrqu, |
|---|
| 1174 | + struct iw_point *dwrq, |
|---|
| 1187 | 1175 | char *extra |
|---|
| 1188 | 1176 | ) |
|---|
| 1189 | 1177 | { |
|---|
| 1190 | | - struct iw_point *dwrq = (struct iw_point *)wrqu; |
|---|
| 1191 | | - wl_scan_results_v109_t *list; |
|---|
| 1178 | + wl_scan_results_t *list; |
|---|
| 1192 | 1179 | struct sockaddr *addr = (struct sockaddr *) extra; |
|---|
| 1193 | 1180 | struct iw_quality qual[IW_MAX_AP]; |
|---|
| 1194 | | - wl_bss_info_v109_t *bi = NULL; |
|---|
| 1181 | + wl_bss_info_t *bi = NULL; |
|---|
| 1195 | 1182 | int error, i; |
|---|
| 1196 | 1183 | uint buflen = dwrq->length; |
|---|
| 1197 | 1184 | int16 rssi; |
|---|
| .. | .. |
|---|
| 1218 | 1205 | ASSERT(list->version == WL_BSS_INFO_VERSION); |
|---|
| 1219 | 1206 | |
|---|
| 1220 | 1207 | for (i = 0, dwrq->length = 0; i < list->count && dwrq->length < IW_MAX_AP; i++) { |
|---|
| 1221 | | - bi = bi ? (wl_bss_info_v109_t *)((uintptr)bi + dtoh32(bi->length)) : list->bss_info; |
|---|
| 1208 | + bi = bi ? (wl_bss_info_t *)((uintptr)bi + dtoh32(bi->length)) : list->bss_info; |
|---|
| 1222 | 1209 | ASSERT(((uintptr)bi + dtoh32(bi->length)) <= ((uintptr)list + |
|---|
| 1223 | 1210 | buflen)); |
|---|
| 1224 | 1211 | |
|---|
| .. | .. |
|---|
| 1260 | 1247 | wl_iw_iscan_get_aplist( |
|---|
| 1261 | 1248 | struct net_device *dev, |
|---|
| 1262 | 1249 | struct iw_request_info *info, |
|---|
| 1263 | | - union iwreq_data *wrqu, |
|---|
| 1250 | + struct iw_point *dwrq, |
|---|
| 1264 | 1251 | char *extra |
|---|
| 1265 | 1252 | ) |
|---|
| 1266 | 1253 | { |
|---|
| 1267 | | - struct iw_point *dwrq = (struct iw_point *)wrqu; |
|---|
| 1268 | | - wl_scan_results_v109_t *list; |
|---|
| 1254 | + wl_scan_results_t *list; |
|---|
| 1269 | 1255 | iscan_buf_t * buf; |
|---|
| 1270 | 1256 | iscan_info_t *iscan; |
|---|
| 1271 | 1257 | |
|---|
| 1272 | 1258 | struct sockaddr *addr = (struct sockaddr *) extra; |
|---|
| 1273 | 1259 | struct iw_quality qual[IW_MAX_AP]; |
|---|
| 1274 | | - wl_bss_info_v109_t *bi = NULL; |
|---|
| 1260 | + wl_bss_info_t *bi = NULL; |
|---|
| 1275 | 1261 | int i; |
|---|
| 1276 | 1262 | int16 rssi; |
|---|
| 1277 | 1263 | struct dhd_pub *dhd = dhd_get_pub(dev); |
|---|
| .. | .. |
|---|
| 1297 | 1283 | |
|---|
| 1298 | 1284 | bi = NULL; |
|---|
| 1299 | 1285 | for (i = 0, dwrq->length = 0; i < list->count && dwrq->length < IW_MAX_AP; i++) { |
|---|
| 1300 | | - bi = bi ? (wl_bss_info_v109_t *)((uintptr)bi + dtoh32(bi->length)) : list->bss_info; |
|---|
| 1286 | + bi = bi ? (wl_bss_info_t *)((uintptr)bi + dtoh32(bi->length)) : list->bss_info; |
|---|
| 1301 | 1287 | ASSERT(((uintptr)bi + dtoh32(bi->length)) <= ((uintptr)list + |
|---|
| 1302 | 1288 | WLC_IW_ISCAN_MAXLEN)); |
|---|
| 1303 | 1289 | |
|---|
| .. | .. |
|---|
| 1379 | 1365 | ) |
|---|
| 1380 | 1366 | { |
|---|
| 1381 | 1367 | struct dhd_pub *dhd = dhd_get_pub(dev); |
|---|
| 1368 | + wl_wext_info_t *wext_info = NULL; |
|---|
| 1382 | 1369 | wlc_ssid_t ssid; |
|---|
| 1383 | 1370 | #ifdef WL_ESCAN |
|---|
| 1384 | | - wl_scan_info_t *scan_info = NULL; |
|---|
| 1385 | | - int err; |
|---|
| 1371 | + wl_scan_info_t scan_info; |
|---|
| 1386 | 1372 | #else |
|---|
| 1387 | | - wl_wext_info_t *wext_info = NULL; |
|---|
| 1388 | 1373 | iscan_info_t *iscan; |
|---|
| 1389 | 1374 | #ifdef WL_EXT_IAPSTA |
|---|
| 1390 | 1375 | int err; |
|---|
| .. | .. |
|---|
| 1392 | 1377 | #endif |
|---|
| 1393 | 1378 | |
|---|
| 1394 | 1379 | DHD_CHECK(dhd, dev); |
|---|
| 1380 | + wext_info = dhd->wext_info; |
|---|
| 1395 | 1381 | #ifdef WL_ESCAN |
|---|
| 1396 | 1382 | /* default Broadcast scan */ |
|---|
| 1397 | 1383 | memset(&ssid, 0, sizeof(ssid)); |
|---|
| .. | .. |
|---|
| 1406 | 1392 | } |
|---|
| 1407 | 1393 | } |
|---|
| 1408 | 1394 | #endif |
|---|
| 1409 | | - scan_info = kmalloc(sizeof(wl_scan_info_t), GFP_KERNEL); |
|---|
| 1410 | | - if (scan_info == NULL) { |
|---|
| 1411 | | - WL_ERROR(("kzalloc failed\n")); |
|---|
| 1412 | | - return -ENOMEM; |
|---|
| 1413 | | - } |
|---|
| 1414 | | - memset(scan_info, 0, sizeof(wl_scan_info_t)); |
|---|
| 1415 | | - scan_info->bcast_ssid = TRUE; |
|---|
| 1416 | | - memcpy(scan_info->ssid.SSID, ssid.SSID, ssid.SSID_len); |
|---|
| 1417 | | - scan_info->ssid.SSID_len = ssid.SSID_len; |
|---|
| 1418 | | - err = wl_escan_set_scan(dev, scan_info); |
|---|
| 1419 | | - kfree(scan_info); |
|---|
| 1420 | | - return err; |
|---|
| 1395 | + memset(&scan_info, 0, sizeof(wl_scan_info_t)); |
|---|
| 1396 | + scan_info.bcast_ssid = TRUE; |
|---|
| 1397 | + memcpy(scan_info.ssid.SSID, ssid.SSID, ssid.SSID_len); |
|---|
| 1398 | + scan_info.ssid.SSID_len = ssid.SSID_len; |
|---|
| 1399 | + return wl_escan_set_scan(dev, &scan_info); |
|---|
| 1421 | 1400 | #else |
|---|
| 1422 | | - wext_info = dhd->wext_info; |
|---|
| 1423 | 1401 | iscan = &wext_info->iscan; |
|---|
| 1424 | 1402 | WL_TRACE(("%s: SIOCSIWSCAN iscan=%p\n", dev->name, iscan)); |
|---|
| 1425 | 1403 | #ifdef WL_EXT_IAPSTA |
|---|
| .. | .. |
|---|
| 1554 | 1532 | #endif |
|---|
| 1555 | 1533 | int |
|---|
| 1556 | 1534 | wl_iw_handle_scanresults_ies(char **event_p, char *end, |
|---|
| 1557 | | - struct iw_request_info *info, wl_bss_info_v109_t *bi) |
|---|
| 1535 | + struct iw_request_info *info, wl_bss_info_t *bi) |
|---|
| 1558 | 1536 | { |
|---|
| 1559 | 1537 | #if WIRELESS_EXT > 17 |
|---|
| 1560 | 1538 | struct iw_event iwe; |
|---|
| .. | .. |
|---|
| 1618 | 1596 | } |
|---|
| 1619 | 1597 | |
|---|
| 1620 | 1598 | #ifdef BCMWAPI_WPI |
|---|
| 1621 | | - ptr = ((uint8 *)bi) + sizeof(wl_bss_info_v109_t); |
|---|
| 1599 | + ptr = ((uint8 *)bi) + sizeof(wl_bss_info_t); |
|---|
| 1622 | 1600 | ptr_len = bi->ie_length; |
|---|
| 1623 | 1601 | |
|---|
| 1624 | 1602 | while ((ie = bcm_parse_tlvs(ptr, ptr_len, DOT11_MNG_WAPI_ID))) { |
|---|
| .. | .. |
|---|
| 1661 | 1639 | wl_iw_get_scan( |
|---|
| 1662 | 1640 | struct net_device *dev, |
|---|
| 1663 | 1641 | struct iw_request_info *info, |
|---|
| 1664 | | - union iwreq_data *wrqu, |
|---|
| 1642 | + struct iw_point *dwrq, |
|---|
| 1665 | 1643 | char *extra |
|---|
| 1666 | 1644 | ) |
|---|
| 1667 | 1645 | { |
|---|
| 1668 | | - struct iw_point *dwrq = (struct iw_point *)wrqu; |
|---|
| 1669 | 1646 | channel_info_t ci; |
|---|
| 1670 | | - wl_scan_results_v109_t *list; |
|---|
| 1647 | + wl_scan_results_t *list; |
|---|
| 1671 | 1648 | struct iw_event iwe; |
|---|
| 1672 | | - wl_bss_info_v109_t *bi = NULL; |
|---|
| 1649 | + wl_bss_info_t *bi = NULL; |
|---|
| 1673 | 1650 | int error, i, j; |
|---|
| 1674 | 1651 | char *event = extra, *end = extra + dwrq->length, *value; |
|---|
| 1675 | 1652 | uint buflen = dwrq->length; |
|---|
| .. | .. |
|---|
| 1705 | 1682 | ASSERT(list->version == WL_BSS_INFO_VERSION); |
|---|
| 1706 | 1683 | |
|---|
| 1707 | 1684 | for (i = 0; i < list->count && i < IW_MAX_AP; i++) { |
|---|
| 1708 | | - bi = bi ? (wl_bss_info_v109_t *)((uintptr)bi + dtoh32(bi->length)) : list->bss_info; |
|---|
| 1685 | + bi = bi ? (wl_bss_info_t *)((uintptr)bi + dtoh32(bi->length)) : list->bss_info; |
|---|
| 1709 | 1686 | ASSERT(((uintptr)bi + dtoh32(bi->length)) <= ((uintptr)list + |
|---|
| 1710 | 1687 | buflen)); |
|---|
| 1711 | 1688 | |
|---|
| .. | .. |
|---|
| 1792 | 1769 | wl_iw_iscan_get_scan( |
|---|
| 1793 | 1770 | struct net_device *dev, |
|---|
| 1794 | 1771 | struct iw_request_info *info, |
|---|
| 1795 | | - union iwreq_data *wrqu, |
|---|
| 1772 | + struct iw_point *dwrq, |
|---|
| 1796 | 1773 | char *extra |
|---|
| 1797 | 1774 | ) |
|---|
| 1798 | 1775 | { |
|---|
| 1799 | | - struct iw_point *dwrq = (struct iw_point *)wrqu; |
|---|
| 1800 | 1776 | struct dhd_pub *dhd = dhd_get_pub(dev); |
|---|
| 1801 | | -#ifndef WL_ESCAN |
|---|
| 1802 | 1777 | wl_wext_info_t *wext_info = NULL; |
|---|
| 1803 | | - wl_scan_results_v109_t *list; |
|---|
| 1778 | +#ifndef WL_ESCAN |
|---|
| 1779 | + wl_scan_results_t *list; |
|---|
| 1804 | 1780 | struct iw_event iwe; |
|---|
| 1805 | | - wl_bss_info_v109_t *bi = NULL; |
|---|
| 1781 | + wl_bss_info_t *bi = NULL; |
|---|
| 1806 | 1782 | int ii, j; |
|---|
| 1807 | 1783 | int apcnt; |
|---|
| 1808 | 1784 | char *event = extra, *end = extra + dwrq->length, *value; |
|---|
| .. | .. |
|---|
| 1813 | 1789 | #endif |
|---|
| 1814 | 1790 | |
|---|
| 1815 | 1791 | DHD_CHECK(dhd, dev); |
|---|
| 1792 | + wext_info = dhd->wext_info; |
|---|
| 1816 | 1793 | #ifdef WL_ESCAN |
|---|
| 1817 | 1794 | return wl_escan_get_scan(dev, info, dwrq, extra); |
|---|
| 1818 | 1795 | #else |
|---|
| .. | .. |
|---|
| 1821 | 1798 | if (!extra) |
|---|
| 1822 | 1799 | return -EINVAL; |
|---|
| 1823 | 1800 | |
|---|
| 1824 | | - wext_info = dhd->wext_info; |
|---|
| 1825 | 1801 | /* use backup if our thread is not successful */ |
|---|
| 1826 | 1802 | iscan = &wext_info->iscan; |
|---|
| 1827 | 1803 | if ((!iscan) || (iscan->sysioc_pid < 0)) { |
|---|
| .. | .. |
|---|
| 1846 | 1822 | |
|---|
| 1847 | 1823 | bi = NULL; |
|---|
| 1848 | 1824 | for (ii = 0; ii < list->count && apcnt < IW_MAX_AP; apcnt++, ii++) { |
|---|
| 1849 | | - bi = bi ? (wl_bss_info_v109_t *)((uintptr)bi + dtoh32(bi->length)) : list->bss_info; |
|---|
| 1825 | + bi = bi ? (wl_bss_info_t *)((uintptr)bi + dtoh32(bi->length)) : list->bss_info; |
|---|
| 1850 | 1826 | ASSERT(((uintptr)bi + dtoh32(bi->length)) <= ((uintptr)list + |
|---|
| 1851 | 1827 | WLC_IW_ISCAN_MAXLEN)); |
|---|
| 1852 | 1828 | |
|---|
| .. | .. |
|---|
| 1943 | 1919 | wl_iw_set_essid( |
|---|
| 1944 | 1920 | struct net_device *dev, |
|---|
| 1945 | 1921 | struct iw_request_info *info, |
|---|
| 1946 | | - union iwreq_data *wrqu, |
|---|
| 1922 | + struct iw_point *dwrq, |
|---|
| 1947 | 1923 | char *extra |
|---|
| 1948 | 1924 | ) |
|---|
| 1949 | 1925 | { |
|---|
| 1950 | | - struct iw_point *dwrq = (struct iw_point *)wrqu; |
|---|
| 1951 | 1926 | wlc_ssid_t ssid; |
|---|
| 1952 | 1927 | int error; |
|---|
| 1953 | 1928 | struct dhd_pub *dhd = dhd_get_pub(dev); |
|---|
| .. | .. |
|---|
| 2007 | 1982 | wl_iw_get_essid( |
|---|
| 2008 | 1983 | struct net_device *dev, |
|---|
| 2009 | 1984 | struct iw_request_info *info, |
|---|
| 2010 | | - union iwreq_data *wrqu, |
|---|
| 1985 | + struct iw_point *dwrq, |
|---|
| 2011 | 1986 | char *extra |
|---|
| 2012 | 1987 | ) |
|---|
| 2013 | 1988 | { |
|---|
| 2014 | | - struct iw_point *dwrq = (struct iw_point *)wrqu; |
|---|
| 2015 | 1989 | wlc_ssid_t ssid; |
|---|
| 2016 | 1990 | int error; |
|---|
| 2017 | 1991 | |
|---|
| .. | .. |
|---|
| 2030 | 2004 | /* Max SSID length check */ |
|---|
| 2031 | 2005 | if (ssid.SSID_len > IW_ESSID_MAX_SIZE) { |
|---|
| 2032 | 2006 | ssid.SSID_len = IW_ESSID_MAX_SIZE; |
|---|
| 2033 | | - /* Get the current SSID */ |
|---|
| 2034 | | - memcpy(extra, ssid.SSID, ssid.SSID_len); |
|---|
| 2035 | | - /* NULL terminating as length of extra buffer is IW_ESSID_MAX_SIZE ie 32 */ |
|---|
| 2036 | | - extra[IW_ESSID_MAX_SIZE-1] = '\0'; |
|---|
| 2037 | | - } else { |
|---|
| 2038 | | - /* Get the current SSID */ |
|---|
| 2039 | | - memcpy(extra, ssid.SSID, ssid.SSID_len); |
|---|
| 2040 | 2007 | } |
|---|
| 2008 | + |
|---|
| 2009 | + /* Get the current SSID */ |
|---|
| 2010 | + memcpy(extra, ssid.SSID, ssid.SSID_len); |
|---|
| 2011 | + |
|---|
| 2012 | + /* NULL terminating as length of extra buffer is IW_ESSID_MAX_SIZE ie 32 */ |
|---|
| 2013 | + extra[IW_ESSID_MAX_SIZE] = '\0'; |
|---|
| 2041 | 2014 | |
|---|
| 2042 | 2015 | dwrq->length = ssid.SSID_len; |
|---|
| 2043 | 2016 | |
|---|
| .. | .. |
|---|
| 2050 | 2023 | wl_iw_set_nick( |
|---|
| 2051 | 2024 | struct net_device *dev, |
|---|
| 2052 | 2025 | struct iw_request_info *info, |
|---|
| 2053 | | - union iwreq_data *wrqu, |
|---|
| 2026 | + struct iw_point *dwrq, |
|---|
| 2054 | 2027 | char *extra |
|---|
| 2055 | 2028 | ) |
|---|
| 2056 | 2029 | { |
|---|
| 2057 | | - struct iw_point *dwrq = (struct iw_point *)wrqu; |
|---|
| 2058 | 2030 | wl_iw_t *iw = IW_DEV_IF(dev); |
|---|
| 2059 | 2031 | WL_TRACE(("%s: SIOCSIWNICKN\n", dev->name)); |
|---|
| 2060 | 2032 | |
|---|
| .. | .. |
|---|
| 2075 | 2047 | wl_iw_get_nick( |
|---|
| 2076 | 2048 | struct net_device *dev, |
|---|
| 2077 | 2049 | struct iw_request_info *info, |
|---|
| 2078 | | - union iwreq_data *wrqu, |
|---|
| 2050 | + struct iw_point *dwrq, |
|---|
| 2079 | 2051 | char *extra |
|---|
| 2080 | 2052 | ) |
|---|
| 2081 | 2053 | { |
|---|
| 2082 | | - struct iw_point *dwrq = (struct iw_point *)wrqu; |
|---|
| 2083 | 2054 | wl_iw_t *iw = IW_DEV_IF(dev); |
|---|
| 2084 | 2055 | WL_TRACE(("%s: SIOCGIWNICKN\n", dev->name)); |
|---|
| 2085 | 2056 | |
|---|
| .. | .. |
|---|
| 2095 | 2066 | static int wl_iw_set_rate( |
|---|
| 2096 | 2067 | struct net_device *dev, |
|---|
| 2097 | 2068 | struct iw_request_info *info, |
|---|
| 2098 | | - union iwreq_data *wrqu, |
|---|
| 2069 | + struct iw_param *vwrq, |
|---|
| 2099 | 2070 | char *extra |
|---|
| 2100 | 2071 | ) |
|---|
| 2101 | 2072 | { |
|---|
| 2102 | | - struct iw_param *vwrq = &wrqu->bitrate; |
|---|
| 2103 | 2073 | wl_rateset_t rateset; |
|---|
| 2104 | 2074 | int error, rate, i, error_bg, error_a; |
|---|
| 2105 | 2075 | |
|---|
| .. | .. |
|---|
| 2162 | 2132 | static int wl_iw_get_rate( |
|---|
| 2163 | 2133 | struct net_device *dev, |
|---|
| 2164 | 2134 | struct iw_request_info *info, |
|---|
| 2165 | | - union iwreq_data *wrqu, |
|---|
| 2135 | + struct iw_param *vwrq, |
|---|
| 2166 | 2136 | char *extra |
|---|
| 2167 | 2137 | ) |
|---|
| 2168 | 2138 | { |
|---|
| 2169 | | - struct iw_param *vwrq = &wrqu->bitrate; |
|---|
| 2170 | 2139 | int error, rate; |
|---|
| 2171 | 2140 | |
|---|
| 2172 | 2141 | WL_TRACE(("%s: SIOCGIWRATE\n", dev->name)); |
|---|
| .. | .. |
|---|
| 2184 | 2153 | wl_iw_set_rts( |
|---|
| 2185 | 2154 | struct net_device *dev, |
|---|
| 2186 | 2155 | struct iw_request_info *info, |
|---|
| 2187 | | - union iwreq_data *wrqu, |
|---|
| 2156 | + struct iw_param *vwrq, |
|---|
| 2188 | 2157 | char *extra |
|---|
| 2189 | 2158 | ) |
|---|
| 2190 | 2159 | { |
|---|
| 2191 | | - struct iw_param *vwrq = &wrqu->rts; |
|---|
| 2192 | 2160 | int error, rts; |
|---|
| 2193 | 2161 | |
|---|
| 2194 | 2162 | WL_TRACE(("%s: SIOCSIWRTS\n", dev->name)); |
|---|
| .. | .. |
|---|
| 2210 | 2178 | wl_iw_get_rts( |
|---|
| 2211 | 2179 | struct net_device *dev, |
|---|
| 2212 | 2180 | struct iw_request_info *info, |
|---|
| 2213 | | - union iwreq_data *wrqu, |
|---|
| 2181 | + struct iw_param *vwrq, |
|---|
| 2214 | 2182 | char *extra |
|---|
| 2215 | 2183 | ) |
|---|
| 2216 | 2184 | { |
|---|
| 2217 | | - struct iw_param *vwrq = &wrqu->rts; |
|---|
| 2218 | 2185 | int error, rts; |
|---|
| 2219 | 2186 | |
|---|
| 2220 | 2187 | WL_TRACE(("%s: SIOCGIWRTS\n", dev->name)); |
|---|
| .. | .. |
|---|
| 2233 | 2200 | wl_iw_set_frag( |
|---|
| 2234 | 2201 | struct net_device *dev, |
|---|
| 2235 | 2202 | struct iw_request_info *info, |
|---|
| 2236 | | - union iwreq_data *wrqu, |
|---|
| 2203 | + struct iw_param *vwrq, |
|---|
| 2237 | 2204 | char *extra |
|---|
| 2238 | 2205 | ) |
|---|
| 2239 | 2206 | { |
|---|
| 2240 | | - struct iw_param *vwrq = &wrqu->frag; |
|---|
| 2241 | 2207 | int error, frag; |
|---|
| 2242 | 2208 | |
|---|
| 2243 | 2209 | WL_TRACE(("%s: SIOCSIWFRAG\n", dev->name)); |
|---|
| .. | .. |
|---|
| 2259 | 2225 | wl_iw_get_frag( |
|---|
| 2260 | 2226 | struct net_device *dev, |
|---|
| 2261 | 2227 | struct iw_request_info *info, |
|---|
| 2262 | | - union iwreq_data *wrqu, |
|---|
| 2228 | + struct iw_param *vwrq, |
|---|
| 2263 | 2229 | char *extra |
|---|
| 2264 | 2230 | ) |
|---|
| 2265 | 2231 | { |
|---|
| 2266 | | - struct iw_param *vwrq = &wrqu->frag; |
|---|
| 2267 | 2232 | int error, fragthreshold; |
|---|
| 2268 | 2233 | |
|---|
| 2269 | 2234 | WL_TRACE(("%s: SIOCGIWFRAG\n", dev->name)); |
|---|
| .. | .. |
|---|
| 2282 | 2247 | wl_iw_set_txpow( |
|---|
| 2283 | 2248 | struct net_device *dev, |
|---|
| 2284 | 2249 | struct iw_request_info *info, |
|---|
| 2285 | | - union iwreq_data *wrqu, |
|---|
| 2250 | + struct iw_param *vwrq, |
|---|
| 2286 | 2251 | char *extra |
|---|
| 2287 | 2252 | ) |
|---|
| 2288 | 2253 | { |
|---|
| 2289 | | - struct iw_param *vwrq = &wrqu->txpower; |
|---|
| 2290 | 2254 | int error, disable; |
|---|
| 2291 | 2255 | uint16 txpwrmw; |
|---|
| 2292 | 2256 | WL_TRACE(("%s: SIOCSIWTXPOW\n", dev->name)); |
|---|
| .. | .. |
|---|
| 2323 | 2287 | wl_iw_get_txpow( |
|---|
| 2324 | 2288 | struct net_device *dev, |
|---|
| 2325 | 2289 | struct iw_request_info *info, |
|---|
| 2326 | | - union iwreq_data *wrqu, |
|---|
| 2290 | + struct iw_param *vwrq, |
|---|
| 2327 | 2291 | char *extra |
|---|
| 2328 | 2292 | ) |
|---|
| 2329 | 2293 | { |
|---|
| 2330 | | - struct iw_param *vwrq = &wrqu->txpower; |
|---|
| 2331 | 2294 | int error, disable, txpwrdbm; |
|---|
| 2332 | 2295 | uint8 result; |
|---|
| 2333 | 2296 | |
|---|
| .. | .. |
|---|
| 2352 | 2315 | wl_iw_set_retry( |
|---|
| 2353 | 2316 | struct net_device *dev, |
|---|
| 2354 | 2317 | struct iw_request_info *info, |
|---|
| 2355 | | - union iwreq_data *wrqu, |
|---|
| 2318 | + struct iw_param *vwrq, |
|---|
| 2356 | 2319 | char *extra |
|---|
| 2357 | 2320 | ) |
|---|
| 2358 | 2321 | { |
|---|
| 2359 | | - struct iw_param *vwrq = &wrqu->retry; |
|---|
| 2360 | 2322 | int error, lrl, srl; |
|---|
| 2361 | 2323 | |
|---|
| 2362 | 2324 | WL_TRACE(("%s: SIOCSIWRETRY\n", dev->name)); |
|---|
| .. | .. |
|---|
| 2400 | 2362 | wl_iw_get_retry( |
|---|
| 2401 | 2363 | struct net_device *dev, |
|---|
| 2402 | 2364 | struct iw_request_info *info, |
|---|
| 2403 | | - union iwreq_data *wrqu, |
|---|
| 2365 | + struct iw_param *vwrq, |
|---|
| 2404 | 2366 | char *extra |
|---|
| 2405 | 2367 | ) |
|---|
| 2406 | 2368 | { |
|---|
| 2407 | | - struct iw_param *vwrq = &wrqu->retry; |
|---|
| 2408 | 2369 | int error, lrl, srl; |
|---|
| 2409 | 2370 | |
|---|
| 2410 | 2371 | WL_TRACE(("%s: SIOCGIWRETRY\n", dev->name)); |
|---|
| .. | .. |
|---|
| 2442 | 2403 | wl_iw_set_encode( |
|---|
| 2443 | 2404 | struct net_device *dev, |
|---|
| 2444 | 2405 | struct iw_request_info *info, |
|---|
| 2445 | | - union iwreq_data *wrqu, |
|---|
| 2406 | + struct iw_point *dwrq, |
|---|
| 2446 | 2407 | char *extra |
|---|
| 2447 | 2408 | ) |
|---|
| 2448 | 2409 | { |
|---|
| 2449 | | - struct iw_point *dwrq = (struct iw_point *)wrqu; |
|---|
| 2450 | 2410 | wl_wsec_key_t key; |
|---|
| 2451 | 2411 | int error, val, wsec; |
|---|
| 2452 | 2412 | |
|---|
| .. | .. |
|---|
| 2532 | 2492 | wl_iw_get_encode( |
|---|
| 2533 | 2493 | struct net_device *dev, |
|---|
| 2534 | 2494 | struct iw_request_info *info, |
|---|
| 2535 | | - union iwreq_data *wrqu, |
|---|
| 2495 | + struct iw_point *dwrq, |
|---|
| 2536 | 2496 | char *extra |
|---|
| 2537 | 2497 | ) |
|---|
| 2538 | 2498 | { |
|---|
| 2539 | | - struct iw_point *dwrq = (struct iw_point *)wrqu; |
|---|
| 2540 | 2499 | wl_wsec_key_t key; |
|---|
| 2541 | 2500 | int error, val, wsec, auth; |
|---|
| 2542 | 2501 | |
|---|
| .. | .. |
|---|
| 2596 | 2555 | wl_iw_set_power( |
|---|
| 2597 | 2556 | struct net_device *dev, |
|---|
| 2598 | 2557 | struct iw_request_info *info, |
|---|
| 2599 | | - union iwreq_data *wrqu, |
|---|
| 2558 | + struct iw_param *vwrq, |
|---|
| 2600 | 2559 | char *extra |
|---|
| 2601 | 2560 | ) |
|---|
| 2602 | 2561 | { |
|---|
| 2603 | | - struct iw_param *vwrq = &wrqu->power; |
|---|
| 2604 | 2562 | int error, pm; |
|---|
| 2605 | 2563 | |
|---|
| 2606 | 2564 | WL_TRACE(("%s: SIOCSIWPOWER\n", dev->name)); |
|---|
| .. | .. |
|---|
| 2618 | 2576 | wl_iw_get_power( |
|---|
| 2619 | 2577 | struct net_device *dev, |
|---|
| 2620 | 2578 | struct iw_request_info *info, |
|---|
| 2621 | | - union iwreq_data *wrqu, |
|---|
| 2579 | + struct iw_param *vwrq, |
|---|
| 2622 | 2580 | char *extra |
|---|
| 2623 | 2581 | ) |
|---|
| 2624 | 2582 | { |
|---|
| 2625 | | - struct iw_param *vwrq = &wrqu->power; |
|---|
| 2626 | 2583 | int error, pm; |
|---|
| 2627 | 2584 | |
|---|
| 2628 | 2585 | WL_TRACE(("%s: SIOCGIWPOWER\n", dev->name)); |
|---|
| .. | .. |
|---|
| 2642 | 2599 | wl_iw_set_wpaie( |
|---|
| 2643 | 2600 | struct net_device *dev, |
|---|
| 2644 | 2601 | struct iw_request_info *info, |
|---|
| 2645 | | - union iwreq_data *wrqu, |
|---|
| 2602 | + struct iw_point *iwp, |
|---|
| 2646 | 2603 | char *extra |
|---|
| 2647 | 2604 | ) |
|---|
| 2648 | 2605 | { |
|---|
| 2649 | | - struct iw_point *iwp = (struct iw_point *)wrqu; |
|---|
| 2650 | 2606 | #if defined(BCMWAPI_WPI) |
|---|
| 2651 | 2607 | uchar buf[WLC_IOCTL_SMLEN] = {0}; |
|---|
| 2652 | 2608 | uchar *p = buf; |
|---|
| .. | .. |
|---|
| 2671 | 2627 | wl_iw_get_wpaie( |
|---|
| 2672 | 2628 | struct net_device *dev, |
|---|
| 2673 | 2629 | struct iw_request_info *info, |
|---|
| 2674 | | - union iwreq_data *wrqu, |
|---|
| 2630 | + struct iw_point *iwp, |
|---|
| 2675 | 2631 | char *extra |
|---|
| 2676 | 2632 | ) |
|---|
| 2677 | 2633 | { |
|---|
| 2678 | | - struct iw_point *iwp = (struct iw_point *)wrqu; |
|---|
| 2679 | 2634 | WL_TRACE(("%s: SIOCGIWGENIE\n", dev->name)); |
|---|
| 2680 | 2635 | iwp->length = 64; |
|---|
| 2681 | 2636 | dev_wlc_bufvar_get(dev, "wpaie", extra, iwp->length); |
|---|
| .. | .. |
|---|
| 2686 | 2641 | wl_iw_set_encodeext( |
|---|
| 2687 | 2642 | struct net_device *dev, |
|---|
| 2688 | 2643 | struct iw_request_info *info, |
|---|
| 2689 | | - union iwreq_data *wrqu, |
|---|
| 2644 | + struct iw_point *dwrq, |
|---|
| 2690 | 2645 | char *extra |
|---|
| 2691 | 2646 | ) |
|---|
| 2692 | 2647 | { |
|---|
| 2693 | | - struct iw_point *dwrq = (struct iw_point *)wrqu; |
|---|
| 2694 | 2648 | wl_wsec_key_t key; |
|---|
| 2695 | 2649 | int error; |
|---|
| 2696 | 2650 | struct iw_encode_ext *iwe; |
|---|
| .. | .. |
|---|
| 2839 | 2793 | wl_iw_set_pmksa( |
|---|
| 2840 | 2794 | struct net_device *dev, |
|---|
| 2841 | 2795 | struct iw_request_info *info, |
|---|
| 2842 | | - union iwreq_data *wrqu, |
|---|
| 2796 | + struct iw_param *vwrq, |
|---|
| 2843 | 2797 | char *extra |
|---|
| 2844 | 2798 | ) |
|---|
| 2845 | 2799 | { |
|---|
| .. | .. |
|---|
| 2847 | 2801 | struct iw_pmksa *iwpmksa; |
|---|
| 2848 | 2802 | uint i; |
|---|
| 2849 | 2803 | char eabuf[ETHER_ADDR_STR_LEN]; |
|---|
| 2850 | | - pmkid_v1_t *pmkid_array = NULL; |
|---|
| 2804 | + pmkid_t *pmkid_array = NULL; |
|---|
| 2851 | 2805 | struct dhd_pub *dhd = dhd_get_pub(dev); |
|---|
| 2852 | 2806 | wl_wext_info_t *wext_info = NULL; |
|---|
| 2853 | 2807 | |
|---|
| .. | .. |
|---|
| 2864 | 2818 | bzero((char *)pmk_list, sizeof(struct pmk_list)); |
|---|
| 2865 | 2819 | } |
|---|
| 2866 | 2820 | if (iwpmksa->cmd == IW_PMKSA_REMOVE) { |
|---|
| 2867 | | - pmkid_list_v1_t pmkid, *pmkidptr; |
|---|
| 2821 | + pmkid_list_t pmkid, *pmkidptr; |
|---|
| 2868 | 2822 | pmkidptr = &pmkid; |
|---|
| 2869 | 2823 | bcopy(&iwpmksa->bssid.sa_data[0], &pmkidptr->pmkid[0].BSSID, ETHER_ADDR_LEN); |
|---|
| 2870 | 2824 | bcopy(&iwpmksa->pmkid[0], &pmkidptr->pmkid[0].PMKID, WPA2_PMKID_LEN); |
|---|
| .. | .. |
|---|
| 2929 | 2883 | wl_iw_get_encodeext( |
|---|
| 2930 | 2884 | struct net_device *dev, |
|---|
| 2931 | 2885 | struct iw_request_info *info, |
|---|
| 2932 | | - union iwreq_data *wrqu, |
|---|
| 2886 | + struct iw_param *vwrq, |
|---|
| 2933 | 2887 | char *extra |
|---|
| 2934 | 2888 | ) |
|---|
| 2935 | 2889 | { |
|---|
| .. | .. |
|---|
| 2941 | 2895 | wl_iw_set_wpaauth( |
|---|
| 2942 | 2896 | struct net_device *dev, |
|---|
| 2943 | 2897 | struct iw_request_info *info, |
|---|
| 2944 | | - union iwreq_data *wrqu, |
|---|
| 2898 | + struct iw_param *vwrq, |
|---|
| 2945 | 2899 | char *extra |
|---|
| 2946 | 2900 | ) |
|---|
| 2947 | 2901 | { |
|---|
| 2948 | | - struct iw_param *vwrq = &wrqu->param; |
|---|
| 2949 | 2902 | int error = 0; |
|---|
| 2950 | 2903 | int paramid; |
|---|
| 2951 | 2904 | int paramval; |
|---|
| .. | .. |
|---|
| 3200 | 3153 | wl_iw_get_wpaauth( |
|---|
| 3201 | 3154 | struct net_device *dev, |
|---|
| 3202 | 3155 | struct iw_request_info *info, |
|---|
| 3203 | | - union iwreq_data *wrqu, |
|---|
| 3156 | + struct iw_param *vwrq, |
|---|
| 3204 | 3157 | char *extra |
|---|
| 3205 | 3158 | ) |
|---|
| 3206 | 3159 | { |
|---|
| 3207 | | - struct iw_param *vwrq = &wrqu->param; |
|---|
| 3208 | 3160 | int error; |
|---|
| 3209 | 3161 | int paramid; |
|---|
| 3210 | 3162 | int paramval = 0; |
|---|
| .. | .. |
|---|
| 3371 | 3323 | }; |
|---|
| 3372 | 3324 | |
|---|
| 3373 | 3325 | #if WIRELESS_EXT > 12 |
|---|
| 3374 | | -#ifdef CONFIG_WEXT_PRIV |
|---|
| 3375 | 3326 | enum { |
|---|
| 3376 | 3327 | WL_IW_SET_LEDDC = SIOCIWFIRSTPRIV, |
|---|
| 3377 | 3328 | WL_IW_SET_VLANMODE, |
|---|
| .. | .. |
|---|
| 3407 | 3358 | }, |
|---|
| 3408 | 3359 | { 0, 0, 0, { 0 } } |
|---|
| 3409 | 3360 | }; |
|---|
| 3410 | | -#endif /* CONFIG_WEXT_PRIV */ |
|---|
| 3411 | 3361 | |
|---|
| 3412 | 3362 | const struct iw_handler_def wl_iw_handler_def = |
|---|
| 3413 | 3363 | { |
|---|
| 3414 | 3364 | .num_standard = ARRAYSIZE(wl_iw_handler), |
|---|
| 3415 | | - .standard = (const iw_handler *) wl_iw_handler, |
|---|
| 3416 | | -#ifdef CONFIG_WEXT_PRIV |
|---|
| 3417 | 3365 | .num_private = ARRAY_SIZE(wl_iw_priv_handler), |
|---|
| 3418 | 3366 | .num_private_args = ARRAY_SIZE(wl_iw_priv_args), |
|---|
| 3367 | + .standard = (const iw_handler *) wl_iw_handler, |
|---|
| 3419 | 3368 | .private = wl_iw_priv_handler, |
|---|
| 3420 | 3369 | .private_args = wl_iw_priv_args, |
|---|
| 3421 | | -#endif /* CONFIG_WEXT_PRIV */ |
|---|
| 3422 | 3370 | #if WIRELESS_EXT >= 19 |
|---|
| 3423 | 3371 | get_wireless_stats: dhd_get_wireless_stats, |
|---|
| 3424 | 3372 | #endif /* WIRELESS_EXT >= 19 */ |
|---|
| .. | .. |
|---|
| 3903 | 3851 | int rssi; |
|---|
| 3904 | 3852 | scb_val_t scb_val; |
|---|
| 3905 | 3853 | #if WIRELESS_EXT > 11 |
|---|
| 3906 | | -#ifdef WL_NAN |
|---|
| 3907 | 3854 | char *cntbuf = NULL; |
|---|
| 3908 | 3855 | wl_cnt_info_t *cntinfo; |
|---|
| 3909 | 3856 | uint16 ver; |
|---|
| 3910 | 3857 | uint32 corerev = 0; |
|---|
| 3911 | | -#endif |
|---|
| 3912 | 3858 | #endif /* WIRELESS_EXT > 11 */ |
|---|
| 3913 | 3859 | |
|---|
| 3914 | 3860 | phy_noise = 0; |
|---|
| .. | .. |
|---|
| 3952 | 3898 | #endif /* WIRELESS_EXT > 18 */ |
|---|
| 3953 | 3899 | |
|---|
| 3954 | 3900 | #if WIRELESS_EXT > 11 |
|---|
| 3955 | | -#ifdef WL_NAN |
|---|
| 3956 | 3901 | WL_TRACE(("wl_iw_get_wireless_stats counters\n *****")); |
|---|
| 3957 | 3902 | |
|---|
| 3958 | 3903 | cntbuf = kmalloc(MAX_WLIW_IOCTL_LEN, GFP_KERNEL); |
|---|
| .. | .. |
|---|
| 3973 | 3918 | cntinfo->version = dtoh16(cntinfo->version); |
|---|
| 3974 | 3919 | cntinfo->datalen = dtoh16(cntinfo->datalen); |
|---|
| 3975 | 3920 | ver = cntinfo->version; |
|---|
| 3921 | +#ifdef WL_NAN |
|---|
| 3976 | 3922 | CHK_CNTBUF_DATALEN(cntbuf, MAX_WLIW_IOCTL_LEN); |
|---|
| 3977 | | - if (ver > WL_CNT_VERSION_XTLV) { |
|---|
| 3923 | +#endif |
|---|
| 3924 | + if (ver > WL_CNT_T_VERSION) { |
|---|
| 3978 | 3925 | WL_TRACE(("\tIncorrect version of counters struct: expected %d; got %d\n", |
|---|
| 3979 | | - WL_CNT_VERSION_XTLV, ver)); |
|---|
| 3926 | + WL_CNT_T_VERSION, ver)); |
|---|
| 3980 | 3927 | res = BCME_VERSION; |
|---|
| 3981 | 3928 | goto done; |
|---|
| 3982 | 3929 | } |
|---|
| .. | .. |
|---|
| 3992 | 3939 | corerev = dtoh32(revinfo.corerev); |
|---|
| 3993 | 3940 | } |
|---|
| 3994 | 3941 | |
|---|
| 3942 | +#ifdef WL_NAN |
|---|
| 3995 | 3943 | res = wl_cntbuf_to_xtlv_format(NULL, cntinfo, MAX_WLIW_IOCTL_LEN, corerev); |
|---|
| 3996 | 3944 | if (res) { |
|---|
| 3997 | 3945 | WL_ERROR(("wl_cntbuf_to_xtlv_format failed %d\n", res)); |
|---|
| .. | .. |
|---|
| 4007 | 3955 | |
|---|
| 4008 | 3956 | done: |
|---|
| 4009 | 3957 | #if WIRELESS_EXT > 11 |
|---|
| 4010 | | -#ifdef WL_NAN |
|---|
| 4011 | 3958 | if (cntbuf) { |
|---|
| 4012 | 3959 | kfree(cntbuf); |
|---|
| 4013 | 3960 | } |
|---|
| 4014 | | -#endif |
|---|
| 4015 | 3961 | #endif /* WIRELESS_EXT > 11 */ |
|---|
| 4016 | 3962 | return res; |
|---|
| 4017 | 3963 | } |
|---|
| .. | .. |
|---|
| 4043 | 3989 | } |
|---|
| 4044 | 3990 | |
|---|
| 4045 | 3991 | static int |
|---|
| 4046 | | -wl_iw_iscan_prep(wl_scan_params_v1_t *params, wlc_ssid_t *ssid) |
|---|
| 3992 | +wl_iw_iscan_prep(wl_scan_params_t *params, wlc_ssid_t *ssid) |
|---|
| 4047 | 3993 | { |
|---|
| 4048 | 3994 | int err = 0; |
|---|
| 4049 | 3995 | |
|---|
| .. | .. |
|---|
| 4069 | 4015 | static int |
|---|
| 4070 | 4016 | wl_iw_iscan(iscan_info_t *iscan, wlc_ssid_t *ssid, uint16 action) |
|---|
| 4071 | 4017 | { |
|---|
| 4072 | | - int params_size = (WL_SCAN_PARAMS_V1_FIXED_SIZE + OFFSETOF(wl_iscan_params_v1_t, params)); |
|---|
| 4073 | | - wl_iscan_params_v1_t *params; |
|---|
| 4018 | + int params_size = (WL_SCAN_PARAMS_FIXED_SIZE + OFFSETOF(wl_iscan_params_t, params)); |
|---|
| 4019 | + wl_iscan_params_t *params; |
|---|
| 4074 | 4020 | int err = 0; |
|---|
| 4075 | 4021 | |
|---|
| 4076 | 4022 | if (ssid && ssid->SSID_len) { |
|---|
| 4077 | 4023 | params_size += sizeof(wlc_ssid_t); |
|---|
| 4078 | 4024 | } |
|---|
| 4079 | | - params = (wl_iscan_params_v1_t*)kmalloc(params_size, GFP_KERNEL); |
|---|
| 4025 | + params = (wl_iscan_params_t*)kmalloc(params_size, GFP_KERNEL); |
|---|
| 4080 | 4026 | if (params == NULL) { |
|---|
| 4081 | 4027 | return -ENOMEM; |
|---|
| 4082 | 4028 | } |
|---|
| .. | .. |
|---|
| 4090 | 4036 | params->action = htod16(action); |
|---|
| 4091 | 4037 | params->scan_duration = htod16(0); |
|---|
| 4092 | 4038 | |
|---|
| 4093 | | - /* params_size += OFFSETOF(wl_iscan_params_v1_t, params); */ |
|---|
| 4039 | + /* params_size += OFFSETOF(wl_iscan_params_t, params); */ |
|---|
| 4094 | 4040 | (void) dev_iw_iovar_setbuf(iscan->dev, "iscan", params, params_size, |
|---|
| 4095 | 4041 | iscan->ioctlbuf, WLC_IOCTL_SMLEN); |
|---|
| 4096 | 4042 | } |
|---|
| .. | .. |
|---|
| 4106 | 4052 | iscan_buf_t * ptr; |
|---|
| 4107 | 4053 | wl_iscan_results_t * list_buf; |
|---|
| 4108 | 4054 | wl_iscan_results_t list; |
|---|
| 4109 | | - wl_scan_results_v109_t *results; |
|---|
| 4055 | + wl_scan_results_t *results; |
|---|
| 4110 | 4056 | uint32 status; |
|---|
| 4111 | 4057 | |
|---|
| 4112 | 4058 | /* buffers are allocated on demand */ |
|---|
| .. | .. |
|---|
| 4331 | 4277 | wl_iw_autochannel(struct net_device *dev, char* command, int total_len) |
|---|
| 4332 | 4278 | { |
|---|
| 4333 | 4279 | struct dhd_pub *dhd = dhd_get_pub(dev); |
|---|
| 4280 | + wl_wext_info_t *wext_info = NULL; |
|---|
| 4334 | 4281 | int ret = 0; |
|---|
| 4335 | 4282 | #ifdef WL_ESCAN |
|---|
| 4336 | 4283 | int bytes_written = -1; |
|---|
| 4337 | 4284 | #endif |
|---|
| 4338 | 4285 | |
|---|
| 4339 | 4286 | DHD_CHECK(dhd, dev); |
|---|
| 4287 | + wext_info = dhd->wext_info; |
|---|
| 4340 | 4288 | #ifdef WL_ESCAN |
|---|
| 4341 | 4289 | sscanf(command, "%*s %d", &dhd->escan->autochannel); |
|---|
| 4342 | 4290 | if (dhd->escan->autochannel == 0) { |
|---|