From 9d77db3c730780c8ef5ccd4b66403ff5675cfe4e Mon Sep 17 00:00:00 2001 From: hc <hc@nodka.com> Date: Mon, 13 May 2024 10:30:14 +0000 Subject: [PATCH] modify sin led gpio --- kernel/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/wl_iw.c | 234 ++++++++++++++++++++++++---------------------------------- 1 files changed, 96 insertions(+), 138 deletions(-) diff --git a/kernel/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/wl_iw.c b/kernel/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/wl_iw.c old mode 100644 new mode 100755 index 10e4f34..ddec5e5 --- a/kernel/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/wl_iw.c +++ b/kernel/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/wl_iw.c @@ -216,8 +216,8 @@ #endif /* !WL_ESCAN */ struct pmk_list { - pmkid_list_v1_t pmkids; - pmkid_v1_t foo[MAXPMKID - 1]; + pmkid_list_t pmkids; + pmkid_t foo[MAXPMKID - 1]; }; typedef struct wl_wext_info { @@ -293,7 +293,7 @@ index = dhd_net2idx(dhd->info, dev); if (index == DHD_BAD_IF) { - WL_ERROR(("Bad ifidx from %s\n", dev->name)); + WL_ERROR(("Bad ifidx from dev:%p\n", dev)); return -ENODEV; } ret = dhd_ioctl_process(dhd, index, &ioc, arg); @@ -456,7 +456,6 @@ #endif /* WIRELESS_EXT < 13 */ #if WIRELESS_EXT > 12 -#ifdef CONFIG_WEXT_PRIV static int wl_iw_set_leddc( struct net_device *dev, @@ -503,7 +502,6 @@ error = dev_wlc_ioctl(dev, WLC_SET_PM, &pm, sizeof(pm)); return error; } -#endif /* CONFIG_WEXT_PRIV */ #endif /* WIRELESS_EXT > 12 */ int @@ -534,7 +532,7 @@ wl_iw_config_commit( struct net_device *dev, struct iw_request_info *info, - union iwreq_data *zwrq, + void *zwrq, char *extra ) { @@ -618,11 +616,10 @@ wl_iw_set_freq( struct net_device *dev, struct iw_request_info *info, - union iwreq_data *wrqu, + struct iw_freq *fwrq, char *extra ) { - struct iw_freq *fwrq = &wrqu->freq; int error, chan; uint sf = 0; struct dhd_pub *dhd = dhd_get_pub(dev); @@ -671,22 +668,18 @@ wl_iw_get_freq( struct net_device *dev, struct iw_request_info *info, - union iwreq_data *wrqu, + struct iw_freq *fwrq, char *extra ) { - struct dhd_pub *dhd = dhd_get_pub(dev); - struct iw_freq *fwrq = &wrqu->freq; int error; - chanspec_t chanspec = 0; + u32 chanspec = 0; int ctl_chan; WL_TRACE(("%s: SIOCGIWFREQ\n", dev->name)); - DHD_CHECK(dhd, dev); - if ((error = dev_wlc_intvar_get(dev, "chanspec", (s32 *)&chanspec))) + if ((error = dev_wlc_intvar_get(dev, "chanspec", &chanspec))) return error; - chanspec = wl_ext_chspec_driver_to_host(dhd, chanspec); ctl_chan = wf_chspec_ctlchan(chanspec); /* Return radio channel in channel form */ @@ -699,7 +692,7 @@ wl_iw_set_mode( struct net_device *dev, struct iw_request_info *info, - union iwreq_data *wrqu, + __u32 *uwrq, char *extra ) { @@ -716,7 +709,7 @@ wext_info->conn_info.channel = 0; } - switch (wrqu->mode) { + switch (*uwrq) { case IW_MODE_MASTER: infra = ap = 1; break; @@ -744,7 +737,7 @@ wl_iw_get_mode( struct net_device *dev, struct iw_request_info *info, - union iwreq_data *wrqu, + __u32 *uwrq, char *extra ) { @@ -758,7 +751,7 @@ infra = dtoh32(infra); ap = dtoh32(ap); - wrqu->mode = infra ? ap ? IW_MODE_MASTER : IW_MODE_INFRA : IW_MODE_ADHOC; + *uwrq = infra ? ap ? IW_MODE_MASTER : IW_MODE_INFRA : IW_MODE_ADHOC; return 0; } @@ -767,11 +760,10 @@ wl_iw_get_range( struct net_device *dev, struct iw_request_info *info, - union iwreq_data *wrqu, + struct iw_point *dwrq, char *extra ) { - struct iw_point *dwrq = (struct iw_point *)wrqu; struct iw_range *range = (struct iw_range *) extra; static int channels[MAXCHANNEL+1]; wl_uint32_list_t *list = (wl_uint32_list_t *) channels; @@ -1000,11 +992,10 @@ wl_iw_set_spy( struct net_device *dev, struct iw_request_info *info, - union iwreq_data *wrqu, + struct iw_point *dwrq, char *extra ) { - struct iw_point *dwrq = (struct iw_point *)wrqu; wl_iw_t *iw = IW_DEV_IF(dev); struct sockaddr *addr = (struct sockaddr *) extra; int i; @@ -1026,11 +1017,10 @@ wl_iw_get_spy( struct net_device *dev, struct iw_request_info *info, - union iwreq_data *wrqu, + struct iw_point *dwrq, char *extra ) { - struct iw_point *dwrq = (struct iw_point *)wrqu; wl_iw_t *iw = IW_DEV_IF(dev); struct sockaddr *addr = (struct sockaddr *) extra; struct iw_quality *qual = (struct iw_quality *) &addr[iw->spy_num]; @@ -1056,7 +1046,7 @@ wl_iw_set_wap( struct net_device *dev, struct iw_request_info *info, - union iwreq_data *wrqu, + struct sockaddr *awrq, char *extra ) { @@ -1067,13 +1057,13 @@ WL_TRACE(("%s: SIOCSIWAP\n", dev->name)); DHD_CHECK(dhd, dev); wext_info = dhd->wext_info; - if (wrqu->ap_addr.sa_family != ARPHRD_ETHER) { + if (awrq->sa_family != ARPHRD_ETHER) { WL_ERROR(("Invalid Header...sa_family\n")); return -EINVAL; } /* Ignore "auto" or "off" */ - if (ETHER_ISBCAST(wrqu->ap_addr.sa_data) || ETHER_ISNULLADDR(wrqu->ap_addr.sa_data)) { + if (ETHER_ISBCAST(awrq->sa_data) || ETHER_ISNULLADDR(awrq->sa_data)) { scb_val_t scbval; bzero(&scbval, sizeof(scb_val_t)); WL_MSG(dev->name, "WLC_DISASSOC\n"); @@ -1086,21 +1076,21 @@ #endif return 0; } - /* WL_ASSOC(("Assoc to %s\n", bcm_ether_ntoa((struct ether_addr *)&(wrqu->ap_addr.sa_data), + /* WL_ASSOC(("Assoc to %s\n", bcm_ether_ntoa((struct ether_addr *)&(awrq->sa_data), * eabuf))); */ /* Reassociate to the specified AP */ if (wext_info) - memcpy(&wext_info->conn_info.bssid, wrqu->ap_addr.sa_data, ETHER_ADDR_LEN); + memcpy(&wext_info->conn_info.bssid, awrq->sa_data, ETHER_ADDR_LEN); if (wext_info && wext_info->conn_info.ssid.SSID_len) { if ((error = wl_ext_connect(dev, &wext_info->conn_info))) return error; } else { - if ((error = dev_wlc_ioctl(dev, WLC_REASSOC, wrqu->ap_addr.sa_data, ETHER_ADDR_LEN))) { + if ((error = dev_wlc_ioctl(dev, WLC_REASSOC, awrq->sa_data, ETHER_ADDR_LEN))) { WL_ERROR(("WLC_REASSOC failed (%d).\n", error)); return error; } - WL_MSG(dev->name, "join BSSID="MACSTR"\n", MAC2STR((u8 *)wrqu->ap_addr.sa_data)); + WL_MSG(dev->name, "join BSSID="MACSTR"\n", MAC2STR((u8 *)awrq->sa_data)); } #ifdef WL_EXT_IAPSTA wl_ext_in4way_sync_wext(dev, STA_NO_BTC_IN4WAY, WL_EXT_STATUS_CONNECTING, NULL); @@ -1113,17 +1103,17 @@ wl_iw_get_wap( struct net_device *dev, struct iw_request_info *info, - union iwreq_data *wrqu, + struct sockaddr *awrq, char *extra ) { WL_TRACE(("%s: SIOCGIWAP\n", dev->name)); - wrqu->ap_addr.sa_family = ARPHRD_ETHER; - memset(wrqu->ap_addr.sa_data, 0, ETHER_ADDR_LEN); + awrq->sa_family = ARPHRD_ETHER; + memset(awrq->sa_data, 0, ETHER_ADDR_LEN); /* Ignore error (may be down or disassociated) */ - (void) dev_wlc_ioctl(dev, WLC_GET_BSSID, wrqu->ap_addr.sa_data, ETHER_ADDR_LEN); + (void) dev_wlc_ioctl(dev, WLC_GET_BSSID, awrq->sa_data, ETHER_ADDR_LEN); return 0; } @@ -1133,7 +1123,7 @@ wl_iw_mlme( struct net_device *dev, struct iw_request_info *info, - union iwreq_data *wrqu, + struct sockaddr *awrq, char *extra ) { @@ -1181,15 +1171,14 @@ wl_iw_get_aplist( struct net_device *dev, struct iw_request_info *info, - union iwreq_data *wrqu, + struct iw_point *dwrq, char *extra ) { - struct iw_point *dwrq = (struct iw_point *)wrqu; - wl_scan_results_v109_t *list; + wl_scan_results_t *list; struct sockaddr *addr = (struct sockaddr *) extra; struct iw_quality qual[IW_MAX_AP]; - wl_bss_info_v109_t *bi = NULL; + wl_bss_info_t *bi = NULL; int error, i; uint buflen = dwrq->length; int16 rssi; @@ -1216,7 +1205,7 @@ ASSERT(list->version == WL_BSS_INFO_VERSION); for (i = 0, dwrq->length = 0; i < list->count && dwrq->length < IW_MAX_AP; i++) { - bi = bi ? (wl_bss_info_v109_t *)((uintptr)bi + dtoh32(bi->length)) : list->bss_info; + bi = bi ? (wl_bss_info_t *)((uintptr)bi + dtoh32(bi->length)) : list->bss_info; ASSERT(((uintptr)bi + dtoh32(bi->length)) <= ((uintptr)list + buflen)); @@ -1258,18 +1247,17 @@ wl_iw_iscan_get_aplist( struct net_device *dev, struct iw_request_info *info, - union iwreq_data *wrqu, + struct iw_point *dwrq, char *extra ) { - struct iw_point *dwrq = (struct iw_point *)wrqu; - wl_scan_results_v109_t *list; + wl_scan_results_t *list; iscan_buf_t * buf; iscan_info_t *iscan; struct sockaddr *addr = (struct sockaddr *) extra; struct iw_quality qual[IW_MAX_AP]; - wl_bss_info_v109_t *bi = NULL; + wl_bss_info_t *bi = NULL; int i; int16 rssi; struct dhd_pub *dhd = dhd_get_pub(dev); @@ -1295,7 +1283,7 @@ bi = NULL; for (i = 0, dwrq->length = 0; i < list->count && dwrq->length < IW_MAX_AP; i++) { - bi = bi ? (wl_bss_info_v109_t *)((uintptr)bi + dtoh32(bi->length)) : list->bss_info; + bi = bi ? (wl_bss_info_t *)((uintptr)bi + dtoh32(bi->length)) : list->bss_info; ASSERT(((uintptr)bi + dtoh32(bi->length)) <= ((uintptr)list + WLC_IW_ISCAN_MAXLEN)); @@ -1377,11 +1365,11 @@ ) { struct dhd_pub *dhd = dhd_get_pub(dev); + wl_wext_info_t *wext_info = NULL; wlc_ssid_t ssid; #ifdef WL_ESCAN wl_scan_info_t scan_info; #else - wl_wext_info_t *wext_info = NULL; iscan_info_t *iscan; #ifdef WL_EXT_IAPSTA int err; @@ -1389,6 +1377,7 @@ #endif DHD_CHECK(dhd, dev); + wext_info = dhd->wext_info; #ifdef WL_ESCAN /* default Broadcast scan */ memset(&ssid, 0, sizeof(ssid)); @@ -1409,7 +1398,6 @@ scan_info.ssid.SSID_len = ssid.SSID_len; return wl_escan_set_scan(dev, &scan_info); #else - wext_info = dhd->wext_info; iscan = &wext_info->iscan; WL_TRACE(("%s: SIOCSIWSCAN iscan=%p\n", dev->name, iscan)); #ifdef WL_EXT_IAPSTA @@ -1544,7 +1532,7 @@ #endif int wl_iw_handle_scanresults_ies(char **event_p, char *end, - struct iw_request_info *info, wl_bss_info_v109_t *bi) + struct iw_request_info *info, wl_bss_info_t *bi) { #if WIRELESS_EXT > 17 struct iw_event iwe; @@ -1608,7 +1596,7 @@ } #ifdef BCMWAPI_WPI - ptr = ((uint8 *)bi) + sizeof(wl_bss_info_v109_t); + ptr = ((uint8 *)bi) + sizeof(wl_bss_info_t); ptr_len = bi->ie_length; while ((ie = bcm_parse_tlvs(ptr, ptr_len, DOT11_MNG_WAPI_ID))) { @@ -1651,15 +1639,14 @@ wl_iw_get_scan( struct net_device *dev, struct iw_request_info *info, - union iwreq_data *wrqu, + struct iw_point *dwrq, char *extra ) { - struct iw_point *dwrq = (struct iw_point *)wrqu; channel_info_t ci; - wl_scan_results_v109_t *list; + wl_scan_results_t *list; struct iw_event iwe; - wl_bss_info_v109_t *bi = NULL; + wl_bss_info_t *bi = NULL; int error, i, j; char *event = extra, *end = extra + dwrq->length, *value; uint buflen = dwrq->length; @@ -1695,7 +1682,7 @@ ASSERT(list->version == WL_BSS_INFO_VERSION); for (i = 0; i < list->count && i < IW_MAX_AP; i++) { - bi = bi ? (wl_bss_info_v109_t *)((uintptr)bi + dtoh32(bi->length)) : list->bss_info; + bi = bi ? (wl_bss_info_t *)((uintptr)bi + dtoh32(bi->length)) : list->bss_info; ASSERT(((uintptr)bi + dtoh32(bi->length)) <= ((uintptr)list + buflen)); @@ -1782,17 +1769,16 @@ wl_iw_iscan_get_scan( struct net_device *dev, struct iw_request_info *info, - union iwreq_data *wrqu, + struct iw_point *dwrq, char *extra ) { - struct iw_point *dwrq = (struct iw_point *)wrqu; struct dhd_pub *dhd = dhd_get_pub(dev); -#ifndef WL_ESCAN wl_wext_info_t *wext_info = NULL; - wl_scan_results_v109_t *list; +#ifndef WL_ESCAN + wl_scan_results_t *list; struct iw_event iwe; - wl_bss_info_v109_t *bi = NULL; + wl_bss_info_t *bi = NULL; int ii, j; int apcnt; char *event = extra, *end = extra + dwrq->length, *value; @@ -1803,6 +1789,7 @@ #endif DHD_CHECK(dhd, dev); + wext_info = dhd->wext_info; #ifdef WL_ESCAN return wl_escan_get_scan(dev, info, dwrq, extra); #else @@ -1811,7 +1798,6 @@ if (!extra) return -EINVAL; - wext_info = dhd->wext_info; /* use backup if our thread is not successful */ iscan = &wext_info->iscan; if ((!iscan) || (iscan->sysioc_pid < 0)) { @@ -1836,7 +1822,7 @@ bi = NULL; for (ii = 0; ii < list->count && apcnt < IW_MAX_AP; apcnt++, ii++) { - bi = bi ? (wl_bss_info_v109_t *)((uintptr)bi + dtoh32(bi->length)) : list->bss_info; + bi = bi ? (wl_bss_info_t *)((uintptr)bi + dtoh32(bi->length)) : list->bss_info; ASSERT(((uintptr)bi + dtoh32(bi->length)) <= ((uintptr)list + WLC_IW_ISCAN_MAXLEN)); @@ -1933,11 +1919,10 @@ wl_iw_set_essid( struct net_device *dev, struct iw_request_info *info, - union iwreq_data *wrqu, + struct iw_point *dwrq, char *extra ) { - struct iw_point *dwrq = (struct iw_point *)wrqu; wlc_ssid_t ssid; int error; struct dhd_pub *dhd = dhd_get_pub(dev); @@ -1997,11 +1982,10 @@ wl_iw_get_essid( struct net_device *dev, struct iw_request_info *info, - union iwreq_data *wrqu, + struct iw_point *dwrq, char *extra ) { - struct iw_point *dwrq = (struct iw_point *)wrqu; wlc_ssid_t ssid; int error; @@ -2020,14 +2004,13 @@ /* Max SSID length check */ if (ssid.SSID_len > IW_ESSID_MAX_SIZE) { ssid.SSID_len = IW_ESSID_MAX_SIZE; - /* Get the current SSID */ - memcpy(extra, ssid.SSID, ssid.SSID_len); - /* NULL terminating as length of extra buffer is IW_ESSID_MAX_SIZE ie 32 */ - extra[IW_ESSID_MAX_SIZE-1] = '\0'; - } else { - /* Get the current SSID */ - memcpy(extra, ssid.SSID, ssid.SSID_len); } + + /* Get the current SSID */ + memcpy(extra, ssid.SSID, ssid.SSID_len); + + /* NULL terminating as length of extra buffer is IW_ESSID_MAX_SIZE ie 32 */ + extra[IW_ESSID_MAX_SIZE] = '\0'; dwrq->length = ssid.SSID_len; @@ -2040,11 +2023,10 @@ wl_iw_set_nick( struct net_device *dev, struct iw_request_info *info, - union iwreq_data *wrqu, + struct iw_point *dwrq, char *extra ) { - struct iw_point *dwrq = (struct iw_point *)wrqu; wl_iw_t *iw = IW_DEV_IF(dev); WL_TRACE(("%s: SIOCSIWNICKN\n", dev->name)); @@ -2065,11 +2047,10 @@ wl_iw_get_nick( struct net_device *dev, struct iw_request_info *info, - union iwreq_data *wrqu, + struct iw_point *dwrq, char *extra ) { - struct iw_point *dwrq = (struct iw_point *)wrqu; wl_iw_t *iw = IW_DEV_IF(dev); WL_TRACE(("%s: SIOCGIWNICKN\n", dev->name)); @@ -2085,11 +2066,10 @@ static int wl_iw_set_rate( struct net_device *dev, struct iw_request_info *info, - union iwreq_data *wrqu, + struct iw_param *vwrq, char *extra ) { - struct iw_param *vwrq = &wrqu->bitrate; wl_rateset_t rateset; int error, rate, i, error_bg, error_a; @@ -2152,11 +2132,10 @@ static int wl_iw_get_rate( struct net_device *dev, struct iw_request_info *info, - union iwreq_data *wrqu, + struct iw_param *vwrq, char *extra ) { - struct iw_param *vwrq = &wrqu->bitrate; int error, rate; WL_TRACE(("%s: SIOCGIWRATE\n", dev->name)); @@ -2174,11 +2153,10 @@ wl_iw_set_rts( struct net_device *dev, struct iw_request_info *info, - union iwreq_data *wrqu, + struct iw_param *vwrq, char *extra ) { - struct iw_param *vwrq = &wrqu->rts; int error, rts; WL_TRACE(("%s: SIOCSIWRTS\n", dev->name)); @@ -2200,11 +2178,10 @@ wl_iw_get_rts( struct net_device *dev, struct iw_request_info *info, - union iwreq_data *wrqu, + struct iw_param *vwrq, char *extra ) { - struct iw_param *vwrq = &wrqu->rts; int error, rts; WL_TRACE(("%s: SIOCGIWRTS\n", dev->name)); @@ -2223,11 +2200,10 @@ wl_iw_set_frag( struct net_device *dev, struct iw_request_info *info, - union iwreq_data *wrqu, + struct iw_param *vwrq, char *extra ) { - struct iw_param *vwrq = &wrqu->frag; int error, frag; WL_TRACE(("%s: SIOCSIWFRAG\n", dev->name)); @@ -2249,11 +2225,10 @@ wl_iw_get_frag( struct net_device *dev, struct iw_request_info *info, - union iwreq_data *wrqu, + struct iw_param *vwrq, char *extra ) { - struct iw_param *vwrq = &wrqu->frag; int error, fragthreshold; WL_TRACE(("%s: SIOCGIWFRAG\n", dev->name)); @@ -2272,11 +2247,10 @@ wl_iw_set_txpow( struct net_device *dev, struct iw_request_info *info, - union iwreq_data *wrqu, + struct iw_param *vwrq, char *extra ) { - struct iw_param *vwrq = &wrqu->txpower; int error, disable; uint16 txpwrmw; WL_TRACE(("%s: SIOCSIWTXPOW\n", dev->name)); @@ -2313,11 +2287,10 @@ wl_iw_get_txpow( struct net_device *dev, struct iw_request_info *info, - union iwreq_data *wrqu, + struct iw_param *vwrq, char *extra ) { - struct iw_param *vwrq = &wrqu->txpower; int error, disable, txpwrdbm; uint8 result; @@ -2342,11 +2315,10 @@ wl_iw_set_retry( struct net_device *dev, struct iw_request_info *info, - union iwreq_data *wrqu, + struct iw_param *vwrq, char *extra ) { - struct iw_param *vwrq = &wrqu->retry; int error, lrl, srl; WL_TRACE(("%s: SIOCSIWRETRY\n", dev->name)); @@ -2390,11 +2362,10 @@ wl_iw_get_retry( struct net_device *dev, struct iw_request_info *info, - union iwreq_data *wrqu, + struct iw_param *vwrq, char *extra ) { - struct iw_param *vwrq = &wrqu->retry; int error, lrl, srl; WL_TRACE(("%s: SIOCGIWRETRY\n", dev->name)); @@ -2432,11 +2403,10 @@ wl_iw_set_encode( struct net_device *dev, struct iw_request_info *info, - union iwreq_data *wrqu, + struct iw_point *dwrq, char *extra ) { - struct iw_point *dwrq = (struct iw_point *)wrqu; wl_wsec_key_t key; int error, val, wsec; @@ -2522,11 +2492,10 @@ wl_iw_get_encode( struct net_device *dev, struct iw_request_info *info, - union iwreq_data *wrqu, + struct iw_point *dwrq, char *extra ) { - struct iw_point *dwrq = (struct iw_point *)wrqu; wl_wsec_key_t key; int error, val, wsec, auth; @@ -2586,11 +2555,10 @@ wl_iw_set_power( struct net_device *dev, struct iw_request_info *info, - union iwreq_data *wrqu, + struct iw_param *vwrq, char *extra ) { - struct iw_param *vwrq = &wrqu->power; int error, pm; WL_TRACE(("%s: SIOCSIWPOWER\n", dev->name)); @@ -2608,11 +2576,10 @@ wl_iw_get_power( struct net_device *dev, struct iw_request_info *info, - union iwreq_data *wrqu, + struct iw_param *vwrq, char *extra ) { - struct iw_param *vwrq = &wrqu->power; int error, pm; WL_TRACE(("%s: SIOCGIWPOWER\n", dev->name)); @@ -2632,11 +2599,10 @@ wl_iw_set_wpaie( struct net_device *dev, struct iw_request_info *info, - union iwreq_data *wrqu, + struct iw_point *iwp, char *extra ) { - struct iw_point *iwp = (struct iw_point *)wrqu; #if defined(BCMWAPI_WPI) uchar buf[WLC_IOCTL_SMLEN] = {0}; uchar *p = buf; @@ -2661,11 +2627,10 @@ wl_iw_get_wpaie( struct net_device *dev, struct iw_request_info *info, - union iwreq_data *wrqu, + struct iw_point *iwp, char *extra ) { - struct iw_point *iwp = (struct iw_point *)wrqu; WL_TRACE(("%s: SIOCGIWGENIE\n", dev->name)); iwp->length = 64; dev_wlc_bufvar_get(dev, "wpaie", extra, iwp->length); @@ -2676,11 +2641,10 @@ wl_iw_set_encodeext( struct net_device *dev, struct iw_request_info *info, - union iwreq_data *wrqu, + struct iw_point *dwrq, char *extra ) { - struct iw_point *dwrq = (struct iw_point *)wrqu; wl_wsec_key_t key; int error; struct iw_encode_ext *iwe; @@ -2829,7 +2793,7 @@ wl_iw_set_pmksa( struct net_device *dev, struct iw_request_info *info, - union iwreq_data *wrqu, + struct iw_param *vwrq, char *extra ) { @@ -2837,7 +2801,7 @@ struct iw_pmksa *iwpmksa; uint i; char eabuf[ETHER_ADDR_STR_LEN]; - pmkid_v1_t *pmkid_array = NULL; + pmkid_t *pmkid_array = NULL; struct dhd_pub *dhd = dhd_get_pub(dev); wl_wext_info_t *wext_info = NULL; @@ -2854,7 +2818,7 @@ bzero((char *)pmk_list, sizeof(struct pmk_list)); } if (iwpmksa->cmd == IW_PMKSA_REMOVE) { - pmkid_list_v1_t pmkid, *pmkidptr; + pmkid_list_t pmkid, *pmkidptr; pmkidptr = &pmkid; bcopy(&iwpmksa->bssid.sa_data[0], &pmkidptr->pmkid[0].BSSID, ETHER_ADDR_LEN); bcopy(&iwpmksa->pmkid[0], &pmkidptr->pmkid[0].PMKID, WPA2_PMKID_LEN); @@ -2919,7 +2883,7 @@ wl_iw_get_encodeext( struct net_device *dev, struct iw_request_info *info, - union iwreq_data *wrqu, + struct iw_param *vwrq, char *extra ) { @@ -2931,11 +2895,10 @@ wl_iw_set_wpaauth( struct net_device *dev, struct iw_request_info *info, - union iwreq_data *wrqu, + struct iw_param *vwrq, char *extra ) { - struct iw_param *vwrq = &wrqu->param; int error = 0; int paramid; int paramval; @@ -3190,11 +3153,10 @@ wl_iw_get_wpaauth( struct net_device *dev, struct iw_request_info *info, - union iwreq_data *wrqu, + struct iw_param *vwrq, char *extra ) { - struct iw_param *vwrq = &wrqu->param; int error; int paramid; int paramval = 0; @@ -3361,7 +3323,6 @@ }; #if WIRELESS_EXT > 12 -#ifdef CONFIG_WEXT_PRIV enum { WL_IW_SET_LEDDC = SIOCIWFIRSTPRIV, WL_IW_SET_VLANMODE, @@ -3397,18 +3358,15 @@ }, { 0, 0, 0, { 0 } } }; -#endif /* CONFIG_WEXT_PRIV */ const struct iw_handler_def wl_iw_handler_def = { .num_standard = ARRAYSIZE(wl_iw_handler), - .standard = (const iw_handler *) wl_iw_handler, -#ifdef CONFIG_WEXT_PRIV .num_private = ARRAY_SIZE(wl_iw_priv_handler), .num_private_args = ARRAY_SIZE(wl_iw_priv_args), + .standard = (const iw_handler *) wl_iw_handler, .private = wl_iw_priv_handler, .private_args = wl_iw_priv_args, -#endif /* CONFIG_WEXT_PRIV */ #if WIRELESS_EXT >= 19 get_wireless_stats: dhd_get_wireless_stats, #endif /* WIRELESS_EXT >= 19 */ @@ -3893,12 +3851,10 @@ int rssi; scb_val_t scb_val; #if WIRELESS_EXT > 11 -#ifdef WL_NAN char *cntbuf = NULL; wl_cnt_info_t *cntinfo; uint16 ver; uint32 corerev = 0; -#endif #endif /* WIRELESS_EXT > 11 */ phy_noise = 0; @@ -3942,7 +3898,6 @@ #endif /* WIRELESS_EXT > 18 */ #if WIRELESS_EXT > 11 -#ifdef WL_NAN WL_TRACE(("wl_iw_get_wireless_stats counters\n *****")); cntbuf = kmalloc(MAX_WLIW_IOCTL_LEN, GFP_KERNEL); @@ -3963,10 +3918,12 @@ cntinfo->version = dtoh16(cntinfo->version); cntinfo->datalen = dtoh16(cntinfo->datalen); ver = cntinfo->version; +#ifdef WL_NAN CHK_CNTBUF_DATALEN(cntbuf, MAX_WLIW_IOCTL_LEN); - if (ver > WL_CNT_VERSION_XTLV) { +#endif + if (ver > WL_CNT_T_VERSION) { WL_TRACE(("\tIncorrect version of counters struct: expected %d; got %d\n", - WL_CNT_VERSION_XTLV, ver)); + WL_CNT_T_VERSION, ver)); res = BCME_VERSION; goto done; } @@ -3982,6 +3939,7 @@ corerev = dtoh32(revinfo.corerev); } +#ifdef WL_NAN res = wl_cntbuf_to_xtlv_format(NULL, cntinfo, MAX_WLIW_IOCTL_LEN, corerev); if (res) { WL_ERROR(("wl_cntbuf_to_xtlv_format failed %d\n", res)); @@ -3997,11 +3955,9 @@ done: #if WIRELESS_EXT > 11 -#ifdef WL_NAN if (cntbuf) { kfree(cntbuf); } -#endif #endif /* WIRELESS_EXT > 11 */ return res; } @@ -4033,7 +3989,7 @@ } static int -wl_iw_iscan_prep(wl_scan_params_v1_t *params, wlc_ssid_t *ssid) +wl_iw_iscan_prep(wl_scan_params_t *params, wlc_ssid_t *ssid) { int err = 0; @@ -4059,14 +4015,14 @@ static int wl_iw_iscan(iscan_info_t *iscan, wlc_ssid_t *ssid, uint16 action) { - int params_size = (WL_SCAN_PARAMS_V1_FIXED_SIZE + OFFSETOF(wl_iscan_params_v1_t, params)); - wl_iscan_params_v1_t *params; + int params_size = (WL_SCAN_PARAMS_FIXED_SIZE + OFFSETOF(wl_iscan_params_t, params)); + wl_iscan_params_t *params; int err = 0; if (ssid && ssid->SSID_len) { params_size += sizeof(wlc_ssid_t); } - params = (wl_iscan_params_v1_t*)kmalloc(params_size, GFP_KERNEL); + params = (wl_iscan_params_t*)kmalloc(params_size, GFP_KERNEL); if (params == NULL) { return -ENOMEM; } @@ -4080,7 +4036,7 @@ params->action = htod16(action); params->scan_duration = htod16(0); - /* params_size += OFFSETOF(wl_iscan_params_v1_t, params); */ + /* params_size += OFFSETOF(wl_iscan_params_t, params); */ (void) dev_iw_iovar_setbuf(iscan->dev, "iscan", params, params_size, iscan->ioctlbuf, WLC_IOCTL_SMLEN); } @@ -4096,7 +4052,7 @@ iscan_buf_t * ptr; wl_iscan_results_t * list_buf; wl_iscan_results_t list; - wl_scan_results_v109_t *results; + wl_scan_results_t *results; uint32 status; /* buffers are allocated on demand */ @@ -4321,12 +4277,14 @@ wl_iw_autochannel(struct net_device *dev, char* command, int total_len) { struct dhd_pub *dhd = dhd_get_pub(dev); + wl_wext_info_t *wext_info = NULL; int ret = 0; #ifdef WL_ESCAN int bytes_written = -1; #endif DHD_CHECK(dhd, dev); + wext_info = dhd->wext_info; #ifdef WL_ESCAN sscanf(command, "%*s %d", &dhd->escan->autochannel); if (dhd->escan->autochannel == 0) { -- Gitblit v1.6.2