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 | | - chanspec_t chanspec = 0; |
|---|
| 676 | + u32 chanspec = 0; |
|---|
| 682 | 677 | int ctl_chan; |
|---|
| 683 | 678 | |
|---|
| 684 | 679 | WL_TRACE(("%s: SIOCGIWFREQ\n", dev->name)); |
|---|
| 685 | 680 | |
|---|
| 686 | | - DHD_CHECK(dhd, dev); |
|---|
| 687 | | - if ((error = dev_wlc_intvar_get(dev, "chanspec", (s32 *)&chanspec))) |
|---|
| 681 | + if ((error = dev_wlc_intvar_get(dev, "chanspec", &chanspec))) |
|---|
| 688 | 682 | return error; |
|---|
| 689 | | - chanspec = wl_ext_chspec_driver_to_host(dhd, chanspec); |
|---|
| 690 | 683 | ctl_chan = wf_chspec_ctlchan(chanspec); |
|---|
| 691 | 684 | |
|---|
| 692 | 685 | /* Return radio channel in channel form */ |
|---|
| .. | .. |
|---|
| 699 | 692 | wl_iw_set_mode( |
|---|
| 700 | 693 | struct net_device *dev, |
|---|
| 701 | 694 | struct iw_request_info *info, |
|---|
| 702 | | - union iwreq_data *wrqu, |
|---|
| 695 | + __u32 *uwrq, |
|---|
| 703 | 696 | char *extra |
|---|
| 704 | 697 | ) |
|---|
| 705 | 698 | { |
|---|
| .. | .. |
|---|
| 716 | 709 | wext_info->conn_info.channel = 0; |
|---|
| 717 | 710 | } |
|---|
| 718 | 711 | |
|---|
| 719 | | - switch (wrqu->mode) { |
|---|
| 712 | + switch (*uwrq) { |
|---|
| 720 | 713 | case IW_MODE_MASTER: |
|---|
| 721 | 714 | infra = ap = 1; |
|---|
| 722 | 715 | break; |
|---|
| .. | .. |
|---|
| 744 | 737 | wl_iw_get_mode( |
|---|
| 745 | 738 | struct net_device *dev, |
|---|
| 746 | 739 | struct iw_request_info *info, |
|---|
| 747 | | - union iwreq_data *wrqu, |
|---|
| 740 | + __u32 *uwrq, |
|---|
| 748 | 741 | char *extra |
|---|
| 749 | 742 | ) |
|---|
| 750 | 743 | { |
|---|
| .. | .. |
|---|
| 758 | 751 | |
|---|
| 759 | 752 | infra = dtoh32(infra); |
|---|
| 760 | 753 | ap = dtoh32(ap); |
|---|
| 761 | | - 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; |
|---|
| 762 | 755 | |
|---|
| 763 | 756 | return 0; |
|---|
| 764 | 757 | } |
|---|
| .. | .. |
|---|
| 767 | 760 | wl_iw_get_range( |
|---|
| 768 | 761 | struct net_device *dev, |
|---|
| 769 | 762 | struct iw_request_info *info, |
|---|
| 770 | | - union iwreq_data *wrqu, |
|---|
| 763 | + struct iw_point *dwrq, |
|---|
| 771 | 764 | char *extra |
|---|
| 772 | 765 | ) |
|---|
| 773 | 766 | { |
|---|
| 774 | | - struct iw_point *dwrq = (struct iw_point *)wrqu; |
|---|
| 775 | 767 | struct iw_range *range = (struct iw_range *) extra; |
|---|
| 776 | 768 | static int channels[MAXCHANNEL+1]; |
|---|
| 777 | 769 | wl_uint32_list_t *list = (wl_uint32_list_t *) channels; |
|---|
| .. | .. |
|---|
| 1000 | 992 | wl_iw_set_spy( |
|---|
| 1001 | 993 | struct net_device *dev, |
|---|
| 1002 | 994 | struct iw_request_info *info, |
|---|
| 1003 | | - union iwreq_data *wrqu, |
|---|
| 995 | + struct iw_point *dwrq, |
|---|
| 1004 | 996 | char *extra |
|---|
| 1005 | 997 | ) |
|---|
| 1006 | 998 | { |
|---|
| 1007 | | - struct iw_point *dwrq = (struct iw_point *)wrqu; |
|---|
| 1008 | 999 | wl_iw_t *iw = IW_DEV_IF(dev); |
|---|
| 1009 | 1000 | struct sockaddr *addr = (struct sockaddr *) extra; |
|---|
| 1010 | 1001 | int i; |
|---|
| .. | .. |
|---|
| 1026 | 1017 | wl_iw_get_spy( |
|---|
| 1027 | 1018 | struct net_device *dev, |
|---|
| 1028 | 1019 | struct iw_request_info *info, |
|---|
| 1029 | | - union iwreq_data *wrqu, |
|---|
| 1020 | + struct iw_point *dwrq, |
|---|
| 1030 | 1021 | char *extra |
|---|
| 1031 | 1022 | ) |
|---|
| 1032 | 1023 | { |
|---|
| 1033 | | - struct iw_point *dwrq = (struct iw_point *)wrqu; |
|---|
| 1034 | 1024 | wl_iw_t *iw = IW_DEV_IF(dev); |
|---|
| 1035 | 1025 | struct sockaddr *addr = (struct sockaddr *) extra; |
|---|
| 1036 | 1026 | struct iw_quality *qual = (struct iw_quality *) &addr[iw->spy_num]; |
|---|
| .. | .. |
|---|
| 1056 | 1046 | wl_iw_set_wap( |
|---|
| 1057 | 1047 | struct net_device *dev, |
|---|
| 1058 | 1048 | struct iw_request_info *info, |
|---|
| 1059 | | - union iwreq_data *wrqu, |
|---|
| 1049 | + struct sockaddr *awrq, |
|---|
| 1060 | 1050 | char *extra |
|---|
| 1061 | 1051 | ) |
|---|
| 1062 | 1052 | { |
|---|
| .. | .. |
|---|
| 1067 | 1057 | WL_TRACE(("%s: SIOCSIWAP\n", dev->name)); |
|---|
| 1068 | 1058 | DHD_CHECK(dhd, dev); |
|---|
| 1069 | 1059 | wext_info = dhd->wext_info; |
|---|
| 1070 | | - if (wrqu->ap_addr.sa_family != ARPHRD_ETHER) { |
|---|
| 1060 | + if (awrq->sa_family != ARPHRD_ETHER) { |
|---|
| 1071 | 1061 | WL_ERROR(("Invalid Header...sa_family\n")); |
|---|
| 1072 | 1062 | return -EINVAL; |
|---|
| 1073 | 1063 | } |
|---|
| 1074 | 1064 | |
|---|
| 1075 | 1065 | /* Ignore "auto" or "off" */ |
|---|
| 1076 | | - 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)) { |
|---|
| 1077 | 1067 | scb_val_t scbval; |
|---|
| 1078 | 1068 | bzero(&scbval, sizeof(scb_val_t)); |
|---|
| 1079 | 1069 | WL_MSG(dev->name, "WLC_DISASSOC\n"); |
|---|
| .. | .. |
|---|
| 1086 | 1076 | #endif |
|---|
| 1087 | 1077 | return 0; |
|---|
| 1088 | 1078 | } |
|---|
| 1089 | | - /* 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), |
|---|
| 1090 | 1080 | * eabuf))); |
|---|
| 1091 | 1081 | */ |
|---|
| 1092 | 1082 | /* Reassociate to the specified AP */ |
|---|
| 1093 | 1083 | if (wext_info) |
|---|
| 1094 | | - 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); |
|---|
| 1095 | 1085 | if (wext_info && wext_info->conn_info.ssid.SSID_len) { |
|---|
| 1096 | 1086 | if ((error = wl_ext_connect(dev, &wext_info->conn_info))) |
|---|
| 1097 | 1087 | return error; |
|---|
| 1098 | 1088 | } else { |
|---|
| 1099 | | - 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))) { |
|---|
| 1100 | 1090 | WL_ERROR(("WLC_REASSOC failed (%d).\n", error)); |
|---|
| 1101 | 1091 | return error; |
|---|
| 1102 | 1092 | } |
|---|
| 1103 | | - 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)); |
|---|
| 1104 | 1094 | } |
|---|
| 1105 | 1095 | #ifdef WL_EXT_IAPSTA |
|---|
| 1106 | 1096 | wl_ext_in4way_sync_wext(dev, STA_NO_BTC_IN4WAY, WL_EXT_STATUS_CONNECTING, NULL); |
|---|
| .. | .. |
|---|
| 1113 | 1103 | wl_iw_get_wap( |
|---|
| 1114 | 1104 | struct net_device *dev, |
|---|
| 1115 | 1105 | struct iw_request_info *info, |
|---|
| 1116 | | - union iwreq_data *wrqu, |
|---|
| 1106 | + struct sockaddr *awrq, |
|---|
| 1117 | 1107 | char *extra |
|---|
| 1118 | 1108 | ) |
|---|
| 1119 | 1109 | { |
|---|
| 1120 | 1110 | WL_TRACE(("%s: SIOCGIWAP\n", dev->name)); |
|---|
| 1121 | 1111 | |
|---|
| 1122 | | - wrqu->ap_addr.sa_family = ARPHRD_ETHER; |
|---|
| 1123 | | - 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); |
|---|
| 1124 | 1114 | |
|---|
| 1125 | 1115 | /* Ignore error (may be down or disassociated) */ |
|---|
| 1126 | | - (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); |
|---|
| 1127 | 1117 | |
|---|
| 1128 | 1118 | return 0; |
|---|
| 1129 | 1119 | } |
|---|
| .. | .. |
|---|
| 1133 | 1123 | wl_iw_mlme( |
|---|
| 1134 | 1124 | struct net_device *dev, |
|---|
| 1135 | 1125 | struct iw_request_info *info, |
|---|
| 1136 | | - union iwreq_data *wrqu, |
|---|
| 1126 | + struct sockaddr *awrq, |
|---|
| 1137 | 1127 | char *extra |
|---|
| 1138 | 1128 | ) |
|---|
| 1139 | 1129 | { |
|---|
| .. | .. |
|---|
| 1181 | 1171 | wl_iw_get_aplist( |
|---|
| 1182 | 1172 | struct net_device *dev, |
|---|
| 1183 | 1173 | struct iw_request_info *info, |
|---|
| 1184 | | - union iwreq_data *wrqu, |
|---|
| 1174 | + struct iw_point *dwrq, |
|---|
| 1185 | 1175 | char *extra |
|---|
| 1186 | 1176 | ) |
|---|
| 1187 | 1177 | { |
|---|
| 1188 | | - struct iw_point *dwrq = (struct iw_point *)wrqu; |
|---|
| 1189 | | - wl_scan_results_v109_t *list; |
|---|
| 1178 | + wl_scan_results_t *list; |
|---|
| 1190 | 1179 | struct sockaddr *addr = (struct sockaddr *) extra; |
|---|
| 1191 | 1180 | struct iw_quality qual[IW_MAX_AP]; |
|---|
| 1192 | | - wl_bss_info_v109_t *bi = NULL; |
|---|
| 1181 | + wl_bss_info_t *bi = NULL; |
|---|
| 1193 | 1182 | int error, i; |
|---|
| 1194 | 1183 | uint buflen = dwrq->length; |
|---|
| 1195 | 1184 | int16 rssi; |
|---|
| .. | .. |
|---|
| 1216 | 1205 | ASSERT(list->version == WL_BSS_INFO_VERSION); |
|---|
| 1217 | 1206 | |
|---|
| 1218 | 1207 | for (i = 0, dwrq->length = 0; i < list->count && dwrq->length < IW_MAX_AP; i++) { |
|---|
| 1219 | | - 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; |
|---|
| 1220 | 1209 | ASSERT(((uintptr)bi + dtoh32(bi->length)) <= ((uintptr)list + |
|---|
| 1221 | 1210 | buflen)); |
|---|
| 1222 | 1211 | |
|---|
| .. | .. |
|---|
| 1258 | 1247 | wl_iw_iscan_get_aplist( |
|---|
| 1259 | 1248 | struct net_device *dev, |
|---|
| 1260 | 1249 | struct iw_request_info *info, |
|---|
| 1261 | | - union iwreq_data *wrqu, |
|---|
| 1250 | + struct iw_point *dwrq, |
|---|
| 1262 | 1251 | char *extra |
|---|
| 1263 | 1252 | ) |
|---|
| 1264 | 1253 | { |
|---|
| 1265 | | - struct iw_point *dwrq = (struct iw_point *)wrqu; |
|---|
| 1266 | | - wl_scan_results_v109_t *list; |
|---|
| 1254 | + wl_scan_results_t *list; |
|---|
| 1267 | 1255 | iscan_buf_t * buf; |
|---|
| 1268 | 1256 | iscan_info_t *iscan; |
|---|
| 1269 | 1257 | |
|---|
| 1270 | 1258 | struct sockaddr *addr = (struct sockaddr *) extra; |
|---|
| 1271 | 1259 | struct iw_quality qual[IW_MAX_AP]; |
|---|
| 1272 | | - wl_bss_info_v109_t *bi = NULL; |
|---|
| 1260 | + wl_bss_info_t *bi = NULL; |
|---|
| 1273 | 1261 | int i; |
|---|
| 1274 | 1262 | int16 rssi; |
|---|
| 1275 | 1263 | struct dhd_pub *dhd = dhd_get_pub(dev); |
|---|
| .. | .. |
|---|
| 1295 | 1283 | |
|---|
| 1296 | 1284 | bi = NULL; |
|---|
| 1297 | 1285 | for (i = 0, dwrq->length = 0; i < list->count && dwrq->length < IW_MAX_AP; i++) { |
|---|
| 1298 | | - 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; |
|---|
| 1299 | 1287 | ASSERT(((uintptr)bi + dtoh32(bi->length)) <= ((uintptr)list + |
|---|
| 1300 | 1288 | WLC_IW_ISCAN_MAXLEN)); |
|---|
| 1301 | 1289 | |
|---|
| .. | .. |
|---|
| 1377 | 1365 | ) |
|---|
| 1378 | 1366 | { |
|---|
| 1379 | 1367 | struct dhd_pub *dhd = dhd_get_pub(dev); |
|---|
| 1368 | + wl_wext_info_t *wext_info = NULL; |
|---|
| 1380 | 1369 | wlc_ssid_t ssid; |
|---|
| 1381 | 1370 | #ifdef WL_ESCAN |
|---|
| 1382 | 1371 | wl_scan_info_t scan_info; |
|---|
| 1383 | 1372 | #else |
|---|
| 1384 | | - wl_wext_info_t *wext_info = NULL; |
|---|
| 1385 | 1373 | iscan_info_t *iscan; |
|---|
| 1386 | 1374 | #ifdef WL_EXT_IAPSTA |
|---|
| 1387 | 1375 | int err; |
|---|
| .. | .. |
|---|
| 1389 | 1377 | #endif |
|---|
| 1390 | 1378 | |
|---|
| 1391 | 1379 | DHD_CHECK(dhd, dev); |
|---|
| 1380 | + wext_info = dhd->wext_info; |
|---|
| 1392 | 1381 | #ifdef WL_ESCAN |
|---|
| 1393 | 1382 | /* default Broadcast scan */ |
|---|
| 1394 | 1383 | memset(&ssid, 0, sizeof(ssid)); |
|---|
| .. | .. |
|---|
| 1409 | 1398 | scan_info.ssid.SSID_len = ssid.SSID_len; |
|---|
| 1410 | 1399 | return wl_escan_set_scan(dev, &scan_info); |
|---|
| 1411 | 1400 | #else |
|---|
| 1412 | | - wext_info = dhd->wext_info; |
|---|
| 1413 | 1401 | iscan = &wext_info->iscan; |
|---|
| 1414 | 1402 | WL_TRACE(("%s: SIOCSIWSCAN iscan=%p\n", dev->name, iscan)); |
|---|
| 1415 | 1403 | #ifdef WL_EXT_IAPSTA |
|---|
| .. | .. |
|---|
| 1544 | 1532 | #endif |
|---|
| 1545 | 1533 | int |
|---|
| 1546 | 1534 | wl_iw_handle_scanresults_ies(char **event_p, char *end, |
|---|
| 1547 | | - struct iw_request_info *info, wl_bss_info_v109_t *bi) |
|---|
| 1535 | + struct iw_request_info *info, wl_bss_info_t *bi) |
|---|
| 1548 | 1536 | { |
|---|
| 1549 | 1537 | #if WIRELESS_EXT > 17 |
|---|
| 1550 | 1538 | struct iw_event iwe; |
|---|
| .. | .. |
|---|
| 1608 | 1596 | } |
|---|
| 1609 | 1597 | |
|---|
| 1610 | 1598 | #ifdef BCMWAPI_WPI |
|---|
| 1611 | | - ptr = ((uint8 *)bi) + sizeof(wl_bss_info_v109_t); |
|---|
| 1599 | + ptr = ((uint8 *)bi) + sizeof(wl_bss_info_t); |
|---|
| 1612 | 1600 | ptr_len = bi->ie_length; |
|---|
| 1613 | 1601 | |
|---|
| 1614 | 1602 | while ((ie = bcm_parse_tlvs(ptr, ptr_len, DOT11_MNG_WAPI_ID))) { |
|---|
| .. | .. |
|---|
| 1651 | 1639 | wl_iw_get_scan( |
|---|
| 1652 | 1640 | struct net_device *dev, |
|---|
| 1653 | 1641 | struct iw_request_info *info, |
|---|
| 1654 | | - union iwreq_data *wrqu, |
|---|
| 1642 | + struct iw_point *dwrq, |
|---|
| 1655 | 1643 | char *extra |
|---|
| 1656 | 1644 | ) |
|---|
| 1657 | 1645 | { |
|---|
| 1658 | | - struct iw_point *dwrq = (struct iw_point *)wrqu; |
|---|
| 1659 | 1646 | channel_info_t ci; |
|---|
| 1660 | | - wl_scan_results_v109_t *list; |
|---|
| 1647 | + wl_scan_results_t *list; |
|---|
| 1661 | 1648 | struct iw_event iwe; |
|---|
| 1662 | | - wl_bss_info_v109_t *bi = NULL; |
|---|
| 1649 | + wl_bss_info_t *bi = NULL; |
|---|
| 1663 | 1650 | int error, i, j; |
|---|
| 1664 | 1651 | char *event = extra, *end = extra + dwrq->length, *value; |
|---|
| 1665 | 1652 | uint buflen = dwrq->length; |
|---|
| .. | .. |
|---|
| 1695 | 1682 | ASSERT(list->version == WL_BSS_INFO_VERSION); |
|---|
| 1696 | 1683 | |
|---|
| 1697 | 1684 | for (i = 0; i < list->count && i < IW_MAX_AP; i++) { |
|---|
| 1698 | | - 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; |
|---|
| 1699 | 1686 | ASSERT(((uintptr)bi + dtoh32(bi->length)) <= ((uintptr)list + |
|---|
| 1700 | 1687 | buflen)); |
|---|
| 1701 | 1688 | |
|---|
| .. | .. |
|---|
| 1782 | 1769 | wl_iw_iscan_get_scan( |
|---|
| 1783 | 1770 | struct net_device *dev, |
|---|
| 1784 | 1771 | struct iw_request_info *info, |
|---|
| 1785 | | - union iwreq_data *wrqu, |
|---|
| 1772 | + struct iw_point *dwrq, |
|---|
| 1786 | 1773 | char *extra |
|---|
| 1787 | 1774 | ) |
|---|
| 1788 | 1775 | { |
|---|
| 1789 | | - struct iw_point *dwrq = (struct iw_point *)wrqu; |
|---|
| 1790 | 1776 | struct dhd_pub *dhd = dhd_get_pub(dev); |
|---|
| 1791 | | -#ifndef WL_ESCAN |
|---|
| 1792 | 1777 | wl_wext_info_t *wext_info = NULL; |
|---|
| 1793 | | - wl_scan_results_v109_t *list; |
|---|
| 1778 | +#ifndef WL_ESCAN |
|---|
| 1779 | + wl_scan_results_t *list; |
|---|
| 1794 | 1780 | struct iw_event iwe; |
|---|
| 1795 | | - wl_bss_info_v109_t *bi = NULL; |
|---|
| 1781 | + wl_bss_info_t *bi = NULL; |
|---|
| 1796 | 1782 | int ii, j; |
|---|
| 1797 | 1783 | int apcnt; |
|---|
| 1798 | 1784 | char *event = extra, *end = extra + dwrq->length, *value; |
|---|
| .. | .. |
|---|
| 1803 | 1789 | #endif |
|---|
| 1804 | 1790 | |
|---|
| 1805 | 1791 | DHD_CHECK(dhd, dev); |
|---|
| 1792 | + wext_info = dhd->wext_info; |
|---|
| 1806 | 1793 | #ifdef WL_ESCAN |
|---|
| 1807 | 1794 | return wl_escan_get_scan(dev, info, dwrq, extra); |
|---|
| 1808 | 1795 | #else |
|---|
| .. | .. |
|---|
| 1811 | 1798 | if (!extra) |
|---|
| 1812 | 1799 | return -EINVAL; |
|---|
| 1813 | 1800 | |
|---|
| 1814 | | - wext_info = dhd->wext_info; |
|---|
| 1815 | 1801 | /* use backup if our thread is not successful */ |
|---|
| 1816 | 1802 | iscan = &wext_info->iscan; |
|---|
| 1817 | 1803 | if ((!iscan) || (iscan->sysioc_pid < 0)) { |
|---|
| .. | .. |
|---|
| 1836 | 1822 | |
|---|
| 1837 | 1823 | bi = NULL; |
|---|
| 1838 | 1824 | for (ii = 0; ii < list->count && apcnt < IW_MAX_AP; apcnt++, ii++) { |
|---|
| 1839 | | - 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; |
|---|
| 1840 | 1826 | ASSERT(((uintptr)bi + dtoh32(bi->length)) <= ((uintptr)list + |
|---|
| 1841 | 1827 | WLC_IW_ISCAN_MAXLEN)); |
|---|
| 1842 | 1828 | |
|---|
| .. | .. |
|---|
| 1933 | 1919 | wl_iw_set_essid( |
|---|
| 1934 | 1920 | struct net_device *dev, |
|---|
| 1935 | 1921 | struct iw_request_info *info, |
|---|
| 1936 | | - union iwreq_data *wrqu, |
|---|
| 1922 | + struct iw_point *dwrq, |
|---|
| 1937 | 1923 | char *extra |
|---|
| 1938 | 1924 | ) |
|---|
| 1939 | 1925 | { |
|---|
| 1940 | | - struct iw_point *dwrq = (struct iw_point *)wrqu; |
|---|
| 1941 | 1926 | wlc_ssid_t ssid; |
|---|
| 1942 | 1927 | int error; |
|---|
| 1943 | 1928 | struct dhd_pub *dhd = dhd_get_pub(dev); |
|---|
| .. | .. |
|---|
| 1997 | 1982 | wl_iw_get_essid( |
|---|
| 1998 | 1983 | struct net_device *dev, |
|---|
| 1999 | 1984 | struct iw_request_info *info, |
|---|
| 2000 | | - union iwreq_data *wrqu, |
|---|
| 1985 | + struct iw_point *dwrq, |
|---|
| 2001 | 1986 | char *extra |
|---|
| 2002 | 1987 | ) |
|---|
| 2003 | 1988 | { |
|---|
| 2004 | | - struct iw_point *dwrq = (struct iw_point *)wrqu; |
|---|
| 2005 | 1989 | wlc_ssid_t ssid; |
|---|
| 2006 | 1990 | int error; |
|---|
| 2007 | 1991 | |
|---|
| .. | .. |
|---|
| 2020 | 2004 | /* Max SSID length check */ |
|---|
| 2021 | 2005 | if (ssid.SSID_len > IW_ESSID_MAX_SIZE) { |
|---|
| 2022 | 2006 | ssid.SSID_len = IW_ESSID_MAX_SIZE; |
|---|
| 2023 | | - /* Get the current SSID */ |
|---|
| 2024 | | - memcpy(extra, ssid.SSID, ssid.SSID_len); |
|---|
| 2025 | | - /* NULL terminating as length of extra buffer is IW_ESSID_MAX_SIZE ie 32 */ |
|---|
| 2026 | | - extra[IW_ESSID_MAX_SIZE-1] = '\0'; |
|---|
| 2027 | | - } else { |
|---|
| 2028 | | - /* Get the current SSID */ |
|---|
| 2029 | | - memcpy(extra, ssid.SSID, ssid.SSID_len); |
|---|
| 2030 | 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'; |
|---|
| 2031 | 2014 | |
|---|
| 2032 | 2015 | dwrq->length = ssid.SSID_len; |
|---|
| 2033 | 2016 | |
|---|
| .. | .. |
|---|
| 2040 | 2023 | wl_iw_set_nick( |
|---|
| 2041 | 2024 | struct net_device *dev, |
|---|
| 2042 | 2025 | struct iw_request_info *info, |
|---|
| 2043 | | - union iwreq_data *wrqu, |
|---|
| 2026 | + struct iw_point *dwrq, |
|---|
| 2044 | 2027 | char *extra |
|---|
| 2045 | 2028 | ) |
|---|
| 2046 | 2029 | { |
|---|
| 2047 | | - struct iw_point *dwrq = (struct iw_point *)wrqu; |
|---|
| 2048 | 2030 | wl_iw_t *iw = IW_DEV_IF(dev); |
|---|
| 2049 | 2031 | WL_TRACE(("%s: SIOCSIWNICKN\n", dev->name)); |
|---|
| 2050 | 2032 | |
|---|
| .. | .. |
|---|
| 2065 | 2047 | wl_iw_get_nick( |
|---|
| 2066 | 2048 | struct net_device *dev, |
|---|
| 2067 | 2049 | struct iw_request_info *info, |
|---|
| 2068 | | - union iwreq_data *wrqu, |
|---|
| 2050 | + struct iw_point *dwrq, |
|---|
| 2069 | 2051 | char *extra |
|---|
| 2070 | 2052 | ) |
|---|
| 2071 | 2053 | { |
|---|
| 2072 | | - struct iw_point *dwrq = (struct iw_point *)wrqu; |
|---|
| 2073 | 2054 | wl_iw_t *iw = IW_DEV_IF(dev); |
|---|
| 2074 | 2055 | WL_TRACE(("%s: SIOCGIWNICKN\n", dev->name)); |
|---|
| 2075 | 2056 | |
|---|
| .. | .. |
|---|
| 2085 | 2066 | static int wl_iw_set_rate( |
|---|
| 2086 | 2067 | struct net_device *dev, |
|---|
| 2087 | 2068 | struct iw_request_info *info, |
|---|
| 2088 | | - union iwreq_data *wrqu, |
|---|
| 2069 | + struct iw_param *vwrq, |
|---|
| 2089 | 2070 | char *extra |
|---|
| 2090 | 2071 | ) |
|---|
| 2091 | 2072 | { |
|---|
| 2092 | | - struct iw_param *vwrq = &wrqu->bitrate; |
|---|
| 2093 | 2073 | wl_rateset_t rateset; |
|---|
| 2094 | 2074 | int error, rate, i, error_bg, error_a; |
|---|
| 2095 | 2075 | |
|---|
| .. | .. |
|---|
| 2152 | 2132 | static int wl_iw_get_rate( |
|---|
| 2153 | 2133 | struct net_device *dev, |
|---|
| 2154 | 2134 | struct iw_request_info *info, |
|---|
| 2155 | | - union iwreq_data *wrqu, |
|---|
| 2135 | + struct iw_param *vwrq, |
|---|
| 2156 | 2136 | char *extra |
|---|
| 2157 | 2137 | ) |
|---|
| 2158 | 2138 | { |
|---|
| 2159 | | - struct iw_param *vwrq = &wrqu->bitrate; |
|---|
| 2160 | 2139 | int error, rate; |
|---|
| 2161 | 2140 | |
|---|
| 2162 | 2141 | WL_TRACE(("%s: SIOCGIWRATE\n", dev->name)); |
|---|
| .. | .. |
|---|
| 2174 | 2153 | wl_iw_set_rts( |
|---|
| 2175 | 2154 | struct net_device *dev, |
|---|
| 2176 | 2155 | struct iw_request_info *info, |
|---|
| 2177 | | - union iwreq_data *wrqu, |
|---|
| 2156 | + struct iw_param *vwrq, |
|---|
| 2178 | 2157 | char *extra |
|---|
| 2179 | 2158 | ) |
|---|
| 2180 | 2159 | { |
|---|
| 2181 | | - struct iw_param *vwrq = &wrqu->rts; |
|---|
| 2182 | 2160 | int error, rts; |
|---|
| 2183 | 2161 | |
|---|
| 2184 | 2162 | WL_TRACE(("%s: SIOCSIWRTS\n", dev->name)); |
|---|
| .. | .. |
|---|
| 2200 | 2178 | wl_iw_get_rts( |
|---|
| 2201 | 2179 | struct net_device *dev, |
|---|
| 2202 | 2180 | struct iw_request_info *info, |
|---|
| 2203 | | - union iwreq_data *wrqu, |
|---|
| 2181 | + struct iw_param *vwrq, |
|---|
| 2204 | 2182 | char *extra |
|---|
| 2205 | 2183 | ) |
|---|
| 2206 | 2184 | { |
|---|
| 2207 | | - struct iw_param *vwrq = &wrqu->rts; |
|---|
| 2208 | 2185 | int error, rts; |
|---|
| 2209 | 2186 | |
|---|
| 2210 | 2187 | WL_TRACE(("%s: SIOCGIWRTS\n", dev->name)); |
|---|
| .. | .. |
|---|
| 2223 | 2200 | wl_iw_set_frag( |
|---|
| 2224 | 2201 | struct net_device *dev, |
|---|
| 2225 | 2202 | struct iw_request_info *info, |
|---|
| 2226 | | - union iwreq_data *wrqu, |
|---|
| 2203 | + struct iw_param *vwrq, |
|---|
| 2227 | 2204 | char *extra |
|---|
| 2228 | 2205 | ) |
|---|
| 2229 | 2206 | { |
|---|
| 2230 | | - struct iw_param *vwrq = &wrqu->frag; |
|---|
| 2231 | 2207 | int error, frag; |
|---|
| 2232 | 2208 | |
|---|
| 2233 | 2209 | WL_TRACE(("%s: SIOCSIWFRAG\n", dev->name)); |
|---|
| .. | .. |
|---|
| 2249 | 2225 | wl_iw_get_frag( |
|---|
| 2250 | 2226 | struct net_device *dev, |
|---|
| 2251 | 2227 | struct iw_request_info *info, |
|---|
| 2252 | | - union iwreq_data *wrqu, |
|---|
| 2228 | + struct iw_param *vwrq, |
|---|
| 2253 | 2229 | char *extra |
|---|
| 2254 | 2230 | ) |
|---|
| 2255 | 2231 | { |
|---|
| 2256 | | - struct iw_param *vwrq = &wrqu->frag; |
|---|
| 2257 | 2232 | int error, fragthreshold; |
|---|
| 2258 | 2233 | |
|---|
| 2259 | 2234 | WL_TRACE(("%s: SIOCGIWFRAG\n", dev->name)); |
|---|
| .. | .. |
|---|
| 2272 | 2247 | wl_iw_set_txpow( |
|---|
| 2273 | 2248 | struct net_device *dev, |
|---|
| 2274 | 2249 | struct iw_request_info *info, |
|---|
| 2275 | | - union iwreq_data *wrqu, |
|---|
| 2250 | + struct iw_param *vwrq, |
|---|
| 2276 | 2251 | char *extra |
|---|
| 2277 | 2252 | ) |
|---|
| 2278 | 2253 | { |
|---|
| 2279 | | - struct iw_param *vwrq = &wrqu->txpower; |
|---|
| 2280 | 2254 | int error, disable; |
|---|
| 2281 | 2255 | uint16 txpwrmw; |
|---|
| 2282 | 2256 | WL_TRACE(("%s: SIOCSIWTXPOW\n", dev->name)); |
|---|
| .. | .. |
|---|
| 2313 | 2287 | wl_iw_get_txpow( |
|---|
| 2314 | 2288 | struct net_device *dev, |
|---|
| 2315 | 2289 | struct iw_request_info *info, |
|---|
| 2316 | | - union iwreq_data *wrqu, |
|---|
| 2290 | + struct iw_param *vwrq, |
|---|
| 2317 | 2291 | char *extra |
|---|
| 2318 | 2292 | ) |
|---|
| 2319 | 2293 | { |
|---|
| 2320 | | - struct iw_param *vwrq = &wrqu->txpower; |
|---|
| 2321 | 2294 | int error, disable, txpwrdbm; |
|---|
| 2322 | 2295 | uint8 result; |
|---|
| 2323 | 2296 | |
|---|
| .. | .. |
|---|
| 2342 | 2315 | wl_iw_set_retry( |
|---|
| 2343 | 2316 | struct net_device *dev, |
|---|
| 2344 | 2317 | struct iw_request_info *info, |
|---|
| 2345 | | - union iwreq_data *wrqu, |
|---|
| 2318 | + struct iw_param *vwrq, |
|---|
| 2346 | 2319 | char *extra |
|---|
| 2347 | 2320 | ) |
|---|
| 2348 | 2321 | { |
|---|
| 2349 | | - struct iw_param *vwrq = &wrqu->retry; |
|---|
| 2350 | 2322 | int error, lrl, srl; |
|---|
| 2351 | 2323 | |
|---|
| 2352 | 2324 | WL_TRACE(("%s: SIOCSIWRETRY\n", dev->name)); |
|---|
| .. | .. |
|---|
| 2390 | 2362 | wl_iw_get_retry( |
|---|
| 2391 | 2363 | struct net_device *dev, |
|---|
| 2392 | 2364 | struct iw_request_info *info, |
|---|
| 2393 | | - union iwreq_data *wrqu, |
|---|
| 2365 | + struct iw_param *vwrq, |
|---|
| 2394 | 2366 | char *extra |
|---|
| 2395 | 2367 | ) |
|---|
| 2396 | 2368 | { |
|---|
| 2397 | | - struct iw_param *vwrq = &wrqu->retry; |
|---|
| 2398 | 2369 | int error, lrl, srl; |
|---|
| 2399 | 2370 | |
|---|
| 2400 | 2371 | WL_TRACE(("%s: SIOCGIWRETRY\n", dev->name)); |
|---|
| .. | .. |
|---|
| 2432 | 2403 | wl_iw_set_encode( |
|---|
| 2433 | 2404 | struct net_device *dev, |
|---|
| 2434 | 2405 | struct iw_request_info *info, |
|---|
| 2435 | | - union iwreq_data *wrqu, |
|---|
| 2406 | + struct iw_point *dwrq, |
|---|
| 2436 | 2407 | char *extra |
|---|
| 2437 | 2408 | ) |
|---|
| 2438 | 2409 | { |
|---|
| 2439 | | - struct iw_point *dwrq = (struct iw_point *)wrqu; |
|---|
| 2440 | 2410 | wl_wsec_key_t key; |
|---|
| 2441 | 2411 | int error, val, wsec; |
|---|
| 2442 | 2412 | |
|---|
| .. | .. |
|---|
| 2522 | 2492 | wl_iw_get_encode( |
|---|
| 2523 | 2493 | struct net_device *dev, |
|---|
| 2524 | 2494 | struct iw_request_info *info, |
|---|
| 2525 | | - union iwreq_data *wrqu, |
|---|
| 2495 | + struct iw_point *dwrq, |
|---|
| 2526 | 2496 | char *extra |
|---|
| 2527 | 2497 | ) |
|---|
| 2528 | 2498 | { |
|---|
| 2529 | | - struct iw_point *dwrq = (struct iw_point *)wrqu; |
|---|
| 2530 | 2499 | wl_wsec_key_t key; |
|---|
| 2531 | 2500 | int error, val, wsec, auth; |
|---|
| 2532 | 2501 | |
|---|
| .. | .. |
|---|
| 2586 | 2555 | wl_iw_set_power( |
|---|
| 2587 | 2556 | struct net_device *dev, |
|---|
| 2588 | 2557 | struct iw_request_info *info, |
|---|
| 2589 | | - union iwreq_data *wrqu, |
|---|
| 2558 | + struct iw_param *vwrq, |
|---|
| 2590 | 2559 | char *extra |
|---|
| 2591 | 2560 | ) |
|---|
| 2592 | 2561 | { |
|---|
| 2593 | | - struct iw_param *vwrq = &wrqu->power; |
|---|
| 2594 | 2562 | int error, pm; |
|---|
| 2595 | 2563 | |
|---|
| 2596 | 2564 | WL_TRACE(("%s: SIOCSIWPOWER\n", dev->name)); |
|---|
| .. | .. |
|---|
| 2608 | 2576 | wl_iw_get_power( |
|---|
| 2609 | 2577 | struct net_device *dev, |
|---|
| 2610 | 2578 | struct iw_request_info *info, |
|---|
| 2611 | | - union iwreq_data *wrqu, |
|---|
| 2579 | + struct iw_param *vwrq, |
|---|
| 2612 | 2580 | char *extra |
|---|
| 2613 | 2581 | ) |
|---|
| 2614 | 2582 | { |
|---|
| 2615 | | - struct iw_param *vwrq = &wrqu->power; |
|---|
| 2616 | 2583 | int error, pm; |
|---|
| 2617 | 2584 | |
|---|
| 2618 | 2585 | WL_TRACE(("%s: SIOCGIWPOWER\n", dev->name)); |
|---|
| .. | .. |
|---|
| 2632 | 2599 | wl_iw_set_wpaie( |
|---|
| 2633 | 2600 | struct net_device *dev, |
|---|
| 2634 | 2601 | struct iw_request_info *info, |
|---|
| 2635 | | - union iwreq_data *wrqu, |
|---|
| 2602 | + struct iw_point *iwp, |
|---|
| 2636 | 2603 | char *extra |
|---|
| 2637 | 2604 | ) |
|---|
| 2638 | 2605 | { |
|---|
| 2639 | | - struct iw_point *iwp = (struct iw_point *)wrqu; |
|---|
| 2640 | 2606 | #if defined(BCMWAPI_WPI) |
|---|
| 2641 | 2607 | uchar buf[WLC_IOCTL_SMLEN] = {0}; |
|---|
| 2642 | 2608 | uchar *p = buf; |
|---|
| .. | .. |
|---|
| 2661 | 2627 | wl_iw_get_wpaie( |
|---|
| 2662 | 2628 | struct net_device *dev, |
|---|
| 2663 | 2629 | struct iw_request_info *info, |
|---|
| 2664 | | - union iwreq_data *wrqu, |
|---|
| 2630 | + struct iw_point *iwp, |
|---|
| 2665 | 2631 | char *extra |
|---|
| 2666 | 2632 | ) |
|---|
| 2667 | 2633 | { |
|---|
| 2668 | | - struct iw_point *iwp = (struct iw_point *)wrqu; |
|---|
| 2669 | 2634 | WL_TRACE(("%s: SIOCGIWGENIE\n", dev->name)); |
|---|
| 2670 | 2635 | iwp->length = 64; |
|---|
| 2671 | 2636 | dev_wlc_bufvar_get(dev, "wpaie", extra, iwp->length); |
|---|
| .. | .. |
|---|
| 2676 | 2641 | wl_iw_set_encodeext( |
|---|
| 2677 | 2642 | struct net_device *dev, |
|---|
| 2678 | 2643 | struct iw_request_info *info, |
|---|
| 2679 | | - union iwreq_data *wrqu, |
|---|
| 2644 | + struct iw_point *dwrq, |
|---|
| 2680 | 2645 | char *extra |
|---|
| 2681 | 2646 | ) |
|---|
| 2682 | 2647 | { |
|---|
| 2683 | | - struct iw_point *dwrq = (struct iw_point *)wrqu; |
|---|
| 2684 | 2648 | wl_wsec_key_t key; |
|---|
| 2685 | 2649 | int error; |
|---|
| 2686 | 2650 | struct iw_encode_ext *iwe; |
|---|
| .. | .. |
|---|
| 2829 | 2793 | wl_iw_set_pmksa( |
|---|
| 2830 | 2794 | struct net_device *dev, |
|---|
| 2831 | 2795 | struct iw_request_info *info, |
|---|
| 2832 | | - union iwreq_data *wrqu, |
|---|
| 2796 | + struct iw_param *vwrq, |
|---|
| 2833 | 2797 | char *extra |
|---|
| 2834 | 2798 | ) |
|---|
| 2835 | 2799 | { |
|---|
| .. | .. |
|---|
| 2837 | 2801 | struct iw_pmksa *iwpmksa; |
|---|
| 2838 | 2802 | uint i; |
|---|
| 2839 | 2803 | char eabuf[ETHER_ADDR_STR_LEN]; |
|---|
| 2840 | | - pmkid_v1_t *pmkid_array = NULL; |
|---|
| 2804 | + pmkid_t *pmkid_array = NULL; |
|---|
| 2841 | 2805 | struct dhd_pub *dhd = dhd_get_pub(dev); |
|---|
| 2842 | 2806 | wl_wext_info_t *wext_info = NULL; |
|---|
| 2843 | 2807 | |
|---|
| .. | .. |
|---|
| 2854 | 2818 | bzero((char *)pmk_list, sizeof(struct pmk_list)); |
|---|
| 2855 | 2819 | } |
|---|
| 2856 | 2820 | if (iwpmksa->cmd == IW_PMKSA_REMOVE) { |
|---|
| 2857 | | - pmkid_list_v1_t pmkid, *pmkidptr; |
|---|
| 2821 | + pmkid_list_t pmkid, *pmkidptr; |
|---|
| 2858 | 2822 | pmkidptr = &pmkid; |
|---|
| 2859 | 2823 | bcopy(&iwpmksa->bssid.sa_data[0], &pmkidptr->pmkid[0].BSSID, ETHER_ADDR_LEN); |
|---|
| 2860 | 2824 | bcopy(&iwpmksa->pmkid[0], &pmkidptr->pmkid[0].PMKID, WPA2_PMKID_LEN); |
|---|
| .. | .. |
|---|
| 2919 | 2883 | wl_iw_get_encodeext( |
|---|
| 2920 | 2884 | struct net_device *dev, |
|---|
| 2921 | 2885 | struct iw_request_info *info, |
|---|
| 2922 | | - union iwreq_data *wrqu, |
|---|
| 2886 | + struct iw_param *vwrq, |
|---|
| 2923 | 2887 | char *extra |
|---|
| 2924 | 2888 | ) |
|---|
| 2925 | 2889 | { |
|---|
| .. | .. |
|---|
| 2931 | 2895 | wl_iw_set_wpaauth( |
|---|
| 2932 | 2896 | struct net_device *dev, |
|---|
| 2933 | 2897 | struct iw_request_info *info, |
|---|
| 2934 | | - union iwreq_data *wrqu, |
|---|
| 2898 | + struct iw_param *vwrq, |
|---|
| 2935 | 2899 | char *extra |
|---|
| 2936 | 2900 | ) |
|---|
| 2937 | 2901 | { |
|---|
| 2938 | | - struct iw_param *vwrq = &wrqu->param; |
|---|
| 2939 | 2902 | int error = 0; |
|---|
| 2940 | 2903 | int paramid; |
|---|
| 2941 | 2904 | int paramval; |
|---|
| .. | .. |
|---|
| 3190 | 3153 | wl_iw_get_wpaauth( |
|---|
| 3191 | 3154 | struct net_device *dev, |
|---|
| 3192 | 3155 | struct iw_request_info *info, |
|---|
| 3193 | | - union iwreq_data *wrqu, |
|---|
| 3156 | + struct iw_param *vwrq, |
|---|
| 3194 | 3157 | char *extra |
|---|
| 3195 | 3158 | ) |
|---|
| 3196 | 3159 | { |
|---|
| 3197 | | - struct iw_param *vwrq = &wrqu->param; |
|---|
| 3198 | 3160 | int error; |
|---|
| 3199 | 3161 | int paramid; |
|---|
| 3200 | 3162 | int paramval = 0; |
|---|
| .. | .. |
|---|
| 3361 | 3323 | }; |
|---|
| 3362 | 3324 | |
|---|
| 3363 | 3325 | #if WIRELESS_EXT > 12 |
|---|
| 3364 | | -#ifdef CONFIG_WEXT_PRIV |
|---|
| 3365 | 3326 | enum { |
|---|
| 3366 | 3327 | WL_IW_SET_LEDDC = SIOCIWFIRSTPRIV, |
|---|
| 3367 | 3328 | WL_IW_SET_VLANMODE, |
|---|
| .. | .. |
|---|
| 3397 | 3358 | }, |
|---|
| 3398 | 3359 | { 0, 0, 0, { 0 } } |
|---|
| 3399 | 3360 | }; |
|---|
| 3400 | | -#endif /* CONFIG_WEXT_PRIV */ |
|---|
| 3401 | 3361 | |
|---|
| 3402 | 3362 | const struct iw_handler_def wl_iw_handler_def = |
|---|
| 3403 | 3363 | { |
|---|
| 3404 | 3364 | .num_standard = ARRAYSIZE(wl_iw_handler), |
|---|
| 3405 | | - .standard = (const iw_handler *) wl_iw_handler, |
|---|
| 3406 | | -#ifdef CONFIG_WEXT_PRIV |
|---|
| 3407 | 3365 | .num_private = ARRAY_SIZE(wl_iw_priv_handler), |
|---|
| 3408 | 3366 | .num_private_args = ARRAY_SIZE(wl_iw_priv_args), |
|---|
| 3367 | + .standard = (const iw_handler *) wl_iw_handler, |
|---|
| 3409 | 3368 | .private = wl_iw_priv_handler, |
|---|
| 3410 | 3369 | .private_args = wl_iw_priv_args, |
|---|
| 3411 | | -#endif /* CONFIG_WEXT_PRIV */ |
|---|
| 3412 | 3370 | #if WIRELESS_EXT >= 19 |
|---|
| 3413 | 3371 | get_wireless_stats: dhd_get_wireless_stats, |
|---|
| 3414 | 3372 | #endif /* WIRELESS_EXT >= 19 */ |
|---|
| .. | .. |
|---|
| 3893 | 3851 | int rssi; |
|---|
| 3894 | 3852 | scb_val_t scb_val; |
|---|
| 3895 | 3853 | #if WIRELESS_EXT > 11 |
|---|
| 3896 | | -#ifdef WL_NAN |
|---|
| 3897 | 3854 | char *cntbuf = NULL; |
|---|
| 3898 | 3855 | wl_cnt_info_t *cntinfo; |
|---|
| 3899 | 3856 | uint16 ver; |
|---|
| 3900 | 3857 | uint32 corerev = 0; |
|---|
| 3901 | | -#endif |
|---|
| 3902 | 3858 | #endif /* WIRELESS_EXT > 11 */ |
|---|
| 3903 | 3859 | |
|---|
| 3904 | 3860 | phy_noise = 0; |
|---|
| .. | .. |
|---|
| 3942 | 3898 | #endif /* WIRELESS_EXT > 18 */ |
|---|
| 3943 | 3899 | |
|---|
| 3944 | 3900 | #if WIRELESS_EXT > 11 |
|---|
| 3945 | | -#ifdef WL_NAN |
|---|
| 3946 | 3901 | WL_TRACE(("wl_iw_get_wireless_stats counters\n *****")); |
|---|
| 3947 | 3902 | |
|---|
| 3948 | 3903 | cntbuf = kmalloc(MAX_WLIW_IOCTL_LEN, GFP_KERNEL); |
|---|
| .. | .. |
|---|
| 3963 | 3918 | cntinfo->version = dtoh16(cntinfo->version); |
|---|
| 3964 | 3919 | cntinfo->datalen = dtoh16(cntinfo->datalen); |
|---|
| 3965 | 3920 | ver = cntinfo->version; |
|---|
| 3921 | +#ifdef WL_NAN |
|---|
| 3966 | 3922 | CHK_CNTBUF_DATALEN(cntbuf, MAX_WLIW_IOCTL_LEN); |
|---|
| 3967 | | - if (ver > WL_CNT_VERSION_XTLV) { |
|---|
| 3923 | +#endif |
|---|
| 3924 | + if (ver > WL_CNT_T_VERSION) { |
|---|
| 3968 | 3925 | WL_TRACE(("\tIncorrect version of counters struct: expected %d; got %d\n", |
|---|
| 3969 | | - WL_CNT_VERSION_XTLV, ver)); |
|---|
| 3926 | + WL_CNT_T_VERSION, ver)); |
|---|
| 3970 | 3927 | res = BCME_VERSION; |
|---|
| 3971 | 3928 | goto done; |
|---|
| 3972 | 3929 | } |
|---|
| .. | .. |
|---|
| 3982 | 3939 | corerev = dtoh32(revinfo.corerev); |
|---|
| 3983 | 3940 | } |
|---|
| 3984 | 3941 | |
|---|
| 3942 | +#ifdef WL_NAN |
|---|
| 3985 | 3943 | res = wl_cntbuf_to_xtlv_format(NULL, cntinfo, MAX_WLIW_IOCTL_LEN, corerev); |
|---|
| 3986 | 3944 | if (res) { |
|---|
| 3987 | 3945 | WL_ERROR(("wl_cntbuf_to_xtlv_format failed %d\n", res)); |
|---|
| .. | .. |
|---|
| 3997 | 3955 | |
|---|
| 3998 | 3956 | done: |
|---|
| 3999 | 3957 | #if WIRELESS_EXT > 11 |
|---|
| 4000 | | -#ifdef WL_NAN |
|---|
| 4001 | 3958 | if (cntbuf) { |
|---|
| 4002 | 3959 | kfree(cntbuf); |
|---|
| 4003 | 3960 | } |
|---|
| 4004 | | -#endif |
|---|
| 4005 | 3961 | #endif /* WIRELESS_EXT > 11 */ |
|---|
| 4006 | 3962 | return res; |
|---|
| 4007 | 3963 | } |
|---|
| .. | .. |
|---|
| 4033 | 3989 | } |
|---|
| 4034 | 3990 | |
|---|
| 4035 | 3991 | static int |
|---|
| 4036 | | -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) |
|---|
| 4037 | 3993 | { |
|---|
| 4038 | 3994 | int err = 0; |
|---|
| 4039 | 3995 | |
|---|
| .. | .. |
|---|
| 4059 | 4015 | static int |
|---|
| 4060 | 4016 | wl_iw_iscan(iscan_info_t *iscan, wlc_ssid_t *ssid, uint16 action) |
|---|
| 4061 | 4017 | { |
|---|
| 4062 | | - int params_size = (WL_SCAN_PARAMS_V1_FIXED_SIZE + OFFSETOF(wl_iscan_params_v1_t, params)); |
|---|
| 4063 | | - 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; |
|---|
| 4064 | 4020 | int err = 0; |
|---|
| 4065 | 4021 | |
|---|
| 4066 | 4022 | if (ssid && ssid->SSID_len) { |
|---|
| 4067 | 4023 | params_size += sizeof(wlc_ssid_t); |
|---|
| 4068 | 4024 | } |
|---|
| 4069 | | - params = (wl_iscan_params_v1_t*)kmalloc(params_size, GFP_KERNEL); |
|---|
| 4025 | + params = (wl_iscan_params_t*)kmalloc(params_size, GFP_KERNEL); |
|---|
| 4070 | 4026 | if (params == NULL) { |
|---|
| 4071 | 4027 | return -ENOMEM; |
|---|
| 4072 | 4028 | } |
|---|
| .. | .. |
|---|
| 4080 | 4036 | params->action = htod16(action); |
|---|
| 4081 | 4037 | params->scan_duration = htod16(0); |
|---|
| 4082 | 4038 | |
|---|
| 4083 | | - /* params_size += OFFSETOF(wl_iscan_params_v1_t, params); */ |
|---|
| 4039 | + /* params_size += OFFSETOF(wl_iscan_params_t, params); */ |
|---|
| 4084 | 4040 | (void) dev_iw_iovar_setbuf(iscan->dev, "iscan", params, params_size, |
|---|
| 4085 | 4041 | iscan->ioctlbuf, WLC_IOCTL_SMLEN); |
|---|
| 4086 | 4042 | } |
|---|
| .. | .. |
|---|
| 4096 | 4052 | iscan_buf_t * ptr; |
|---|
| 4097 | 4053 | wl_iscan_results_t * list_buf; |
|---|
| 4098 | 4054 | wl_iscan_results_t list; |
|---|
| 4099 | | - wl_scan_results_v109_t *results; |
|---|
| 4055 | + wl_scan_results_t *results; |
|---|
| 4100 | 4056 | uint32 status; |
|---|
| 4101 | 4057 | |
|---|
| 4102 | 4058 | /* buffers are allocated on demand */ |
|---|
| .. | .. |
|---|
| 4321 | 4277 | wl_iw_autochannel(struct net_device *dev, char* command, int total_len) |
|---|
| 4322 | 4278 | { |
|---|
| 4323 | 4279 | struct dhd_pub *dhd = dhd_get_pub(dev); |
|---|
| 4280 | + wl_wext_info_t *wext_info = NULL; |
|---|
| 4324 | 4281 | int ret = 0; |
|---|
| 4325 | 4282 | #ifdef WL_ESCAN |
|---|
| 4326 | 4283 | int bytes_written = -1; |
|---|
| 4327 | 4284 | #endif |
|---|
| 4328 | 4285 | |
|---|
| 4329 | 4286 | DHD_CHECK(dhd, dev); |
|---|
| 4287 | + wext_info = dhd->wext_info; |
|---|
| 4330 | 4288 | #ifdef WL_ESCAN |
|---|
| 4331 | 4289 | sscanf(command, "%*s %d", &dhd->escan->autochannel); |
|---|
| 4332 | 4290 | if (dhd->escan->autochannel == 0) { |
|---|