Commit 366bbb3f authored by Arend van Spriel's avatar Arend van Spriel Committed by Greg Kroah-Hartman

staging: brcm80211: rename ioctl command codes in dhd.h

The naming convention in the driver is to be aligned. This commit
changes the prefix used for the ioctl command codes.
Signed-off-by: default avatarArend van Spriel <arend@broadcom.com>
Reviewed-by: default avatarRoland Vossen <rvossen@broadcom.com>
Reviewed-by: default avatarFranky Lin <frankyl@broadcom.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent aba5e0ad
...@@ -26,50 +26,54 @@ struct dhd_bus; ...@@ -26,50 +26,54 @@ struct dhd_bus;
struct dhd_prot; struct dhd_prot;
struct dhd_info; struct dhd_info;
#define WLC_UP 2 #define BRCMF_C_IOCTL_SMLEN 256 /* "small" ioctl buffer required */
#define WLC_SET_PROMISC 10 #define BRCMF_C_IOCTL_MEDLEN 1536 /* "med" ioctl buffer required */
#define WLC_GET_RATE 12 #define BRCMF_C_IOCTL_MAXLEN 8192
#define WLC_GET_INFRA 19
#define WLC_SET_INFRA 20 #define BRCMF_C_UP 2
#define WLC_GET_AUTH 21 #define BRCMF_C_SET_PROMISC 10
#define WLC_SET_AUTH 22 #define BRCMF_C_GET_RATE 12
#define WLC_GET_BSSID 23 #define BRCMF_C_GET_INFRA 19
#define WLC_GET_SSID 25 #define BRCMF_C_SET_INFRA 20
#define WLC_SET_SSID 26 #define BRCMF_C_GET_AUTH 21
#define WLC_GET_CHANNEL 29 #define BRCMF_C_SET_AUTH 22
#define WLC_GET_SRL 31 #define BRCMF_C_GET_BSSID 23
#define WLC_GET_LRL 33 #define BRCMF_C_GET_SSID 25
#define WLC_GET_RADIO 37 #define BRCMF_C_SET_SSID 26
#define WLC_SET_RADIO 38 #define BRCMF_C_GET_CHANNEL 29
#define WLC_GET_PHYTYPE 39 #define BRCMF_C_GET_SRL 31
#define WLC_SET_KEY 45 #define BRCMF_C_GET_LRL 33
#define WLC_SET_PASSIVE_SCAN 49 #define BRCMF_C_GET_RADIO 37
#define WLC_SCAN 50 #define BRCMF_C_SET_RADIO 38
#define WLC_SCAN_RESULTS 51 #define BRCMF_C_GET_PHYTYPE 39
#define WLC_DISASSOC 52 #define BRCMF_C_SET_KEY 45
#define WLC_REASSOC 53 #define BRCMF_C_SET_PASSIVE_SCAN 49
#define WLC_SET_ROAM_TRIGGER 55 #define BRCMF_C_SCAN 50
#define WLC_SET_ROAM_DELTA 57 #define BRCMF_C_SCAN_RESULTS 51
#define WLC_GET_DTIMPRD 77 #define BRCMF_C_DISASSOC 52
#define WLC_SET_COUNTRY 84 #define BRCMF_C_REASSOC 53
#define WLC_GET_PM 85 #define BRCMF_C_SET_ROAM_TRIGGER 55
#define WLC_SET_PM 86 #define BRCMF_C_SET_ROAM_DELTA 57
#define WLC_GET_AP 117 #define BRCMF_C_GET_DTIMPRD 77
#define WLC_SET_AP 118 #define BRCMF_C_SET_COUNTRY 84
#define WLC_GET_RSSI 127 #define BRCMF_C_GET_PM 85
#define WLC_GET_WSEC 133 #define BRCMF_C_SET_PM 86
#define WLC_SET_WSEC 134 #define BRCMF_C_GET_AP 117
#define WLC_GET_PHY_NOISE 135 #define BRCMF_C_SET_AP 118
#define WLC_GET_BSS_INFO 136 #define BRCMF_C_GET_RSSI 127
#define WLC_SET_SCAN_CHANNEL_TIME 185 #define BRCMF_C_GET_WSEC 133
#define WLC_SET_SCAN_UNASSOC_TIME 187 #define BRCMF_C_SET_WSEC 134
#define WLC_SCB_DEAUTHENTICATE_FOR_REASON 201 #define BRCMF_C_GET_PHY_NOISE 135
#define WLC_GET_VALID_CHANNELS 217 #define BRCMF_C_GET_BSS_INFO 136
#define WLC_GET_KEY_PRIMARY 235 #define BRCMF_C_SET_SCAN_CHANNEL_TIME 185
#define WLC_SET_KEY_PRIMARY 236 #define BRCMF_C_SET_SCAN_UNASSOC_TIME 187
#define WLC_SET_SCAN_PASSIVE_TIME 258 #define BRCMF_C_SCB_DEAUTHENTICATE_FOR_REASON 201
#define WLC_GET_VAR 262 /* get value of named variable */ #define BRCMF_C_GET_VALID_CHANNELS 217
#define WLC_SET_VAR 263 /* set named variable to value */ #define BRCMF_C_GET_KEY_PRIMARY 235
#define BRCMF_C_SET_KEY_PRIMARY 236
#define BRCMF_C_SET_SCAN_PASSIVE_TIME 258
#define BRCMF_C_GET_VAR 262
#define BRCMF_C_SET_VAR 263
/* phy types (returned by WLC_GET_PHYTPE) */ /* phy types (returned by WLC_GET_PHYTPE) */
#define WLC_PHY_TYPE_A 0 #define WLC_PHY_TYPE_A 0
...@@ -154,10 +158,6 @@ struct dhd_info; ...@@ -154,10 +158,6 @@ struct dhd_info;
#define WL_KF_RES_5 (1 << 5) /* Reserved for backward compat */ #define WL_KF_RES_5 (1 << 5) /* Reserved for backward compat */
#define WL_IBSS_PEER_GROUP_KEY (1 << 6) /* Indicates a group key for a IBSS PEER */ #define WL_IBSS_PEER_GROUP_KEY (1 << 6) /* Indicates a group key for a IBSS PEER */
#define WLC_IOCTL_SMLEN 256 /* "small" length ioctl buffer required */
#define WLC_IOCTL_MEDLEN 1536 /* "med" length ioctl buffer required */
#define WLC_IOCTL_MAXLEN 8192
#define DHD_IF_VIF 0x01 /* Virtual IF (Hidden from user) */ #define DHD_IF_VIF 0x01 /* Virtual IF (Hidden from user) */
/* optionally set by a module_param_string() */ /* optionally set by a module_param_string() */
......
...@@ -109,7 +109,7 @@ typedef struct dhd_prot { ...@@ -109,7 +109,7 @@ typedef struct dhd_prot {
u32 lastcmd; u32 lastcmd;
u8 bus_header[BUS_HEADER_LEN]; u8 bus_header[BUS_HEADER_LEN];
struct cdc_ioctl msg; struct cdc_ioctl msg;
unsigned char buf[WLC_IOCTL_MAXLEN + ROUND_UP_MARGIN]; unsigned char buf[BRCMF_C_IOCTL_MAXLEN + ROUND_UP_MARGIN];
} dhd_prot_t; } dhd_prot_t;
static int dhdcdc_msg(dhd_pub_t *dhd) static int dhdcdc_msg(dhd_pub_t *dhd)
...@@ -162,7 +162,7 @@ dhdcdc_query_ioctl(dhd_pub_t *dhd, int ifidx, uint cmd, void *buf, uint len) ...@@ -162,7 +162,7 @@ dhdcdc_query_ioctl(dhd_pub_t *dhd, int ifidx, uint cmd, void *buf, uint len)
DHD_CTL(("%s: cmd %d len %d\n", __func__, cmd, len)); DHD_CTL(("%s: cmd %d len %d\n", __func__, cmd, len));
/* Respond "bcmerror" and "bcmerrorstr" with local cache */ /* Respond "bcmerror" and "bcmerrorstr" with local cache */
if (cmd == WLC_GET_VAR && buf) { if (cmd == BRCMF_C_GET_VAR && buf) {
if (!strcmp((char *)buf, "bcmerrorstr")) { if (!strcmp((char *)buf, "bcmerrorstr")) {
strncpy((char *)buf, "bcm_error", strncpy((char *)buf, "bcm_error",
BCME_STRLEN); BCME_STRLEN);
...@@ -296,9 +296,9 @@ dhd_prot_ioctl(dhd_pub_t *dhd, int ifidx, wl_ioctl_t *ioc, void *buf, int len) ...@@ -296,9 +296,9 @@ dhd_prot_ioctl(dhd_pub_t *dhd, int ifidx, wl_ioctl_t *ioc, void *buf, int len)
DHD_TRACE(("%s: Enter\n", __func__)); DHD_TRACE(("%s: Enter\n", __func__));
ASSERT(len <= WLC_IOCTL_MAXLEN); ASSERT(len <= BRCMF_C_IOCTL_MAXLEN);
if (len > WLC_IOCTL_MAXLEN) if (len > BRCMF_C_IOCTL_MAXLEN)
goto done; goto done;
if (prot->pending == true) { if (prot->pending == true) {
...@@ -306,7 +306,8 @@ dhd_prot_ioctl(dhd_pub_t *dhd, int ifidx, wl_ioctl_t *ioc, void *buf, int len) ...@@ -306,7 +306,8 @@ dhd_prot_ioctl(dhd_pub_t *dhd, int ifidx, wl_ioctl_t *ioc, void *buf, int len)
"lastcmd=0x%x (%lu)\n", "lastcmd=0x%x (%lu)\n",
ioc->cmd, (unsigned long)ioc->cmd, prot->lastcmd, ioc->cmd, (unsigned long)ioc->cmd, prot->lastcmd,
(unsigned long)prot->lastcmd)); (unsigned long)prot->lastcmd));
if ((ioc->cmd == WLC_SET_VAR) || (ioc->cmd == WLC_GET_VAR)) if ((ioc->cmd == BRCMF_C_SET_VAR) ||
(ioc->cmd == BRCMF_C_GET_VAR))
DHD_TRACE(("iovar cmd=%s\n", (char *)buf)); DHD_TRACE(("iovar cmd=%s\n", (char *)buf));
goto done; goto done;
...@@ -332,7 +333,8 @@ dhd_prot_ioctl(dhd_pub_t *dhd, int ifidx, wl_ioctl_t *ioc, void *buf, int len) ...@@ -332,7 +333,8 @@ dhd_prot_ioctl(dhd_pub_t *dhd, int ifidx, wl_ioctl_t *ioc, void *buf, int len)
} }
/* Intercept the wme_dp ioctl here */ /* Intercept the wme_dp ioctl here */
if ((!ret) && (ioc->cmd == WLC_SET_VAR) && (!strcmp(buf, "wme_dp"))) { if (!ret && ioc->cmd == BRCMF_C_SET_VAR &&
!strcmp(buf, "wme_dp")) {
int slen, val = 0; int slen, val = 0;
slen = strlen("wme_dp") + 1; slen = strlen("wme_dp") + 1;
...@@ -464,8 +466,8 @@ int dhd_prot_attach(dhd_pub_t *dhd) ...@@ -464,8 +466,8 @@ int dhd_prot_attach(dhd_pub_t *dhd)
#ifdef BDC #ifdef BDC
dhd->hdrlen += BDC_HEADER_LEN; dhd->hdrlen += BDC_HEADER_LEN;
#endif #endif
dhd->maxctl = dhd->maxctl = BRCMF_C_IOCTL_MAXLEN +
WLC_IOCTL_MAXLEN + sizeof(struct cdc_ioctl) + ROUND_UP_MARGIN; sizeof(struct cdc_ioctl) + ROUND_UP_MARGIN;
return 0; return 0;
fail: fail:
...@@ -503,7 +505,7 @@ int dhd_prot_init(dhd_pub_t *dhd) ...@@ -503,7 +505,7 @@ int dhd_prot_init(dhd_pub_t *dhd)
/* Get the device MAC address */ /* Get the device MAC address */
strcpy(buf, "cur_etheraddr"); strcpy(buf, "cur_etheraddr");
ret = dhdcdc_query_ioctl(dhd, 0, WLC_GET_VAR, buf, sizeof(buf)); ret = dhdcdc_query_ioctl(dhd, 0, BRCMF_C_GET_VAR, buf, sizeof(buf));
if (ret < 0) { if (ret < 0) {
dhd_os_proto_unblock(dhd); dhd_os_proto_unblock(dhd);
return ret; return ret;
......
...@@ -997,7 +997,7 @@ brcmf_c_pktfilter_offload_enable(dhd_pub_t *dhd, char *arg, int enable, ...@@ -997,7 +997,7 @@ brcmf_c_pktfilter_offload_enable(dhd_pub_t *dhd, char *arg, int enable,
memcpy((char *)pkt_filterp, &enable_parm, sizeof(enable_parm)); memcpy((char *)pkt_filterp, &enable_parm, sizeof(enable_parm));
/* Enable/disable the specified filter. */ /* Enable/disable the specified filter. */
rc = dhdcdc_set_ioctl(dhd, 0, WLC_SET_VAR, buf, buf_len); rc = dhdcdc_set_ioctl(dhd, 0, BRCMF_C_SET_VAR, buf, buf_len);
rc = rc >= 0 ? 0 : rc; rc = rc >= 0 ? 0 : rc;
if (rc) if (rc)
DHD_TRACE(("%s: failed to add pktfilter %s, retcode = %d\n", DHD_TRACE(("%s: failed to add pktfilter %s, retcode = %d\n",
...@@ -1009,7 +1009,7 @@ brcmf_c_pktfilter_offload_enable(dhd_pub_t *dhd, char *arg, int enable, ...@@ -1009,7 +1009,7 @@ brcmf_c_pktfilter_offload_enable(dhd_pub_t *dhd, char *arg, int enable,
/* Contorl the master mode */ /* Contorl the master mode */
brcmu_mkiovar("pkt_filter_mode", (char *)&master_mode, 4, buf, brcmu_mkiovar("pkt_filter_mode", (char *)&master_mode, 4, buf,
sizeof(buf)); sizeof(buf));
rc = dhdcdc_set_ioctl(dhd, 0, WLC_SET_VAR, buf, sizeof(buf)); rc = dhdcdc_set_ioctl(dhd, 0, BRCMF_C_SET_VAR, buf, sizeof(buf));
rc = rc >= 0 ? 0 : rc; rc = rc >= 0 ? 0 : rc;
if (rc) if (rc)
DHD_TRACE(("%s: failed to add pktfilter %s, retcode = %d\n", DHD_TRACE(("%s: failed to add pktfilter %s, retcode = %d\n",
...@@ -1140,7 +1140,7 @@ void brcmf_c_pktfilter_offload_set(dhd_pub_t *dhd, char *arg) ...@@ -1140,7 +1140,7 @@ void brcmf_c_pktfilter_offload_set(dhd_pub_t *dhd, char *arg)
&pkt_filter, &pkt_filter,
WL_PKT_FILTER_FIXED_LEN + WL_PKT_FILTER_PATTERN_FIXED_LEN); WL_PKT_FILTER_FIXED_LEN + WL_PKT_FILTER_PATTERN_FIXED_LEN);
rc = dhdcdc_set_ioctl(dhd, 0, WLC_SET_VAR, buf, buf_len); rc = dhdcdc_set_ioctl(dhd, 0, BRCMF_C_SET_VAR, buf, buf_len);
rc = rc >= 0 ? 0 : rc; rc = rc >= 0 ? 0 : rc;
if (rc) if (rc)
...@@ -1162,8 +1162,8 @@ void brcmf_c_arp_offload_set(dhd_pub_t *dhd, int arp_mode) ...@@ -1162,8 +1162,8 @@ void brcmf_c_arp_offload_set(dhd_pub_t *dhd, int arp_mode)
int retcode; int retcode;
brcmu_mkiovar("arp_ol", (char *)&arp_mode, 4, iovbuf, sizeof(iovbuf)); brcmu_mkiovar("arp_ol", (char *)&arp_mode, 4, iovbuf, sizeof(iovbuf));
retcode = dhdcdc_set_ioctl(dhd, 0, WLC_SET_VAR, iovbuf, retcode = dhdcdc_set_ioctl(dhd, 0, BRCMF_C_SET_VAR,
sizeof(iovbuf)); iovbuf, sizeof(iovbuf));
retcode = retcode >= 0 ? 0 : retcode; retcode = retcode >= 0 ? 0 : retcode;
if (retcode) if (retcode)
DHD_TRACE(("%s: failed to set ARP offload mode to 0x%x, " DHD_TRACE(("%s: failed to set ARP offload mode to 0x%x, "
...@@ -1179,8 +1179,8 @@ void brcmf_c_arp_offload_enable(dhd_pub_t *dhd, int arp_enable) ...@@ -1179,8 +1179,8 @@ void brcmf_c_arp_offload_enable(dhd_pub_t *dhd, int arp_enable)
int retcode; int retcode;
brcmu_mkiovar("arpoe", (char *)&arp_enable, 4, iovbuf, sizeof(iovbuf)); brcmu_mkiovar("arpoe", (char *)&arp_enable, 4, iovbuf, sizeof(iovbuf));
retcode = dhdcdc_set_ioctl(dhd, 0, WLC_SET_VAR, iovbuf, retcode = dhdcdc_set_ioctl(dhd, 0, BRCMF_C_SET_VAR,
sizeof(iovbuf)); iovbuf, sizeof(iovbuf));
retcode = retcode >= 0 ? 0 : retcode; retcode = retcode >= 0 ? 0 : retcode;
if (retcode) if (retcode)
DHD_TRACE(("%s: failed to enabe ARP offload to %d, " DHD_TRACE(("%s: failed to enabe ARP offload to %d, "
...@@ -1220,8 +1220,8 @@ int brcmf_c_preinit_ioctls(dhd_pub_t *dhd) ...@@ -1220,8 +1220,8 @@ int brcmf_c_preinit_ioctls(dhd_pub_t *dhd)
if (!ret) { if (!ret) {
brcmu_mkiovar("cur_etheraddr", (void *)ea_addr, ETH_ALEN, brcmu_mkiovar("cur_etheraddr", (void *)ea_addr, ETH_ALEN,
buf, sizeof(buf)); buf, sizeof(buf));
ret = dhdcdc_set_ioctl(dhd, 0, WLC_SET_VAR, buf, ret = dhdcdc_set_ioctl(dhd, 0, BRCMF_C_SET_VAR,
sizeof(buf)); buf, sizeof(buf));
if (ret < 0) { if (ret < 0) {
DHD_ERROR(("%s: can't set MAC address , error=%d\n", DHD_ERROR(("%s: can't set MAC address , error=%d\n",
__func__, ret)); __func__, ret));
...@@ -1233,7 +1233,7 @@ int brcmf_c_preinit_ioctls(dhd_pub_t *dhd) ...@@ -1233,7 +1233,7 @@ int brcmf_c_preinit_ioctls(dhd_pub_t *dhd)
/* Set Country code */ /* Set Country code */
if (dhd->country_code[0] != 0) { if (dhd->country_code[0] != 0) {
if (dhdcdc_set_ioctl(dhd, 0, WLC_SET_COUNTRY, if (dhdcdc_set_ioctl(dhd, 0, BRCMF_C_SET_COUNTRY,
dhd->country_code, dhd->country_code,
sizeof(dhd->country_code)) < 0) { sizeof(dhd->country_code)) < 0) {
DHD_ERROR(("%s: country code setting failed\n", DHD_ERROR(("%s: country code setting failed\n",
...@@ -1245,47 +1245,47 @@ int brcmf_c_preinit_ioctls(dhd_pub_t *dhd) ...@@ -1245,47 +1245,47 @@ int brcmf_c_preinit_ioctls(dhd_pub_t *dhd)
memset(buf, 0, sizeof(buf)); memset(buf, 0, sizeof(buf));
ptr = buf; ptr = buf;
brcmu_mkiovar("ver", 0, 0, buf, sizeof(buf)); brcmu_mkiovar("ver", 0, 0, buf, sizeof(buf));
dhdcdc_query_ioctl(dhd, 0, WLC_GET_VAR, buf, sizeof(buf)); dhdcdc_query_ioctl(dhd, 0, BRCMF_C_GET_VAR, buf, sizeof(buf));
strsep(&ptr, "\n"); strsep(&ptr, "\n");
/* Print fw version info */ /* Print fw version info */
DHD_ERROR(("Firmware version = %s\n", buf)); DHD_ERROR(("Firmware version = %s\n", buf));
/* Set PowerSave mode */ /* Set PowerSave mode */
dhdcdc_set_ioctl(dhd, 0, WLC_SET_PM, (char *)&power_mode, dhdcdc_set_ioctl(dhd, 0, BRCMF_C_SET_PM, (char *)&power_mode,
sizeof(power_mode)); sizeof(power_mode));
/* Match Host and Dongle rx alignment */ /* Match Host and Dongle rx alignment */
brcmu_mkiovar("bus:txglomalign", (char *)&dongle_align, 4, iovbuf, brcmu_mkiovar("bus:txglomalign", (char *)&dongle_align, 4, iovbuf,
sizeof(iovbuf)); sizeof(iovbuf));
dhdcdc_set_ioctl(dhd, 0, WLC_SET_VAR, iovbuf, sizeof(iovbuf)); dhdcdc_set_ioctl(dhd, 0, BRCMF_C_SET_VAR, iovbuf, sizeof(iovbuf));
/* disable glom option per default */ /* disable glom option per default */
brcmu_mkiovar("bus:txglom", (char *)&glom, 4, iovbuf, sizeof(iovbuf)); brcmu_mkiovar("bus:txglom", (char *)&glom, 4, iovbuf, sizeof(iovbuf));
dhdcdc_set_ioctl(dhd, 0, WLC_SET_VAR, iovbuf, sizeof(iovbuf)); dhdcdc_set_ioctl(dhd, 0, BRCMF_C_SET_VAR, iovbuf, sizeof(iovbuf));
/* Setup timeout if Beacons are lost and roam is off to report /* Setup timeout if Beacons are lost and roam is off to report
link down */ link down */
brcmu_mkiovar("bcn_timeout", (char *)&bcn_timeout, 4, iovbuf, brcmu_mkiovar("bcn_timeout", (char *)&bcn_timeout, 4, iovbuf,
sizeof(iovbuf)); sizeof(iovbuf));
dhdcdc_set_ioctl(dhd, 0, WLC_SET_VAR, iovbuf, sizeof(iovbuf)); dhdcdc_set_ioctl(dhd, 0, BRCMF_C_SET_VAR, iovbuf, sizeof(iovbuf));
/* Enable/Disable build-in roaming to allowed ext supplicant to take /* Enable/Disable build-in roaming to allowed ext supplicant to take
of romaing */ of romaing */
brcmu_mkiovar("roam_off", (char *)&dhd_roam, 4, iovbuf, sizeof(iovbuf)); brcmu_mkiovar("roam_off", (char *)&dhd_roam, 4, iovbuf, sizeof(iovbuf));
dhdcdc_set_ioctl(dhd, 0, WLC_SET_VAR, iovbuf, sizeof(iovbuf)); dhdcdc_set_ioctl(dhd, 0, BRCMF_C_SET_VAR, iovbuf, sizeof(iovbuf));
/* Force STA UP */ /* Force STA UP */
if (dhd_radio_up) if (dhd_radio_up)
dhdcdc_set_ioctl(dhd, 0, WLC_UP, (char *)&up, sizeof(up)); dhdcdc_set_ioctl(dhd, 0, BRCMF_C_UP, (char *)&up, sizeof(up));
/* Setup event_msgs */ /* Setup event_msgs */
brcmu_mkiovar("event_msgs", dhd->eventmask, WL_EVENTING_MASK_LEN, brcmu_mkiovar("event_msgs", dhd->eventmask, WL_EVENTING_MASK_LEN,
iovbuf, sizeof(iovbuf)); iovbuf, sizeof(iovbuf));
dhdcdc_set_ioctl(dhd, 0, WLC_SET_VAR, iovbuf, sizeof(iovbuf)); dhdcdc_set_ioctl(dhd, 0, BRCMF_C_SET_VAR, iovbuf, sizeof(iovbuf));
dhdcdc_set_ioctl(dhd, 0, WLC_SET_SCAN_CHANNEL_TIME, dhdcdc_set_ioctl(dhd, 0, BRCMF_C_SET_SCAN_CHANNEL_TIME,
(char *)&scan_assoc_time, sizeof(scan_assoc_time)); (char *)&scan_assoc_time, sizeof(scan_assoc_time));
dhdcdc_set_ioctl(dhd, 0, WLC_SET_SCAN_UNASSOC_TIME, dhdcdc_set_ioctl(dhd, 0, BRCMF_C_SET_SCAN_UNASSOC_TIME,
(char *)&scan_unassoc_time, sizeof(scan_unassoc_time)); (char *)&scan_unassoc_time, sizeof(scan_unassoc_time));
#ifdef ARP_OFFLOAD_SUPPORT #ifdef ARP_OFFLOAD_SUPPORT
...@@ -1626,7 +1626,7 @@ int dhd_iscan_request(void *dhdp, u16 action) ...@@ -1626,7 +1626,7 @@ int dhd_iscan_request(void *dhdp, u16 action)
int rc; int rc;
wl_iscan_params_t params; wl_iscan_params_t params;
dhd_pub_t *dhd = dhd_bus_pub(dhdp); dhd_pub_t *dhd = dhd_bus_pub(dhdp);
char buf[WLC_IOCTL_SMLEN]; char buf[BRCMF_C_IOCTL_SMLEN];
memset(&params, 0, sizeof(wl_iscan_params_t)); memset(&params, 0, sizeof(wl_iscan_params_t));
memcpy(&params.params.bssid, &ether_bcast, ETH_ALEN); memcpy(&params.params.bssid, &ether_bcast, ETH_ALEN);
...@@ -1645,8 +1645,8 @@ int dhd_iscan_request(void *dhdp, u16 action) ...@@ -1645,8 +1645,8 @@ int dhd_iscan_request(void *dhdp, u16 action)
params.scan_duration = 0; params.scan_duration = 0;
brcmu_mkiovar("iscan", (char *)&params, sizeof(wl_iscan_params_t), buf, brcmu_mkiovar("iscan", (char *)&params, sizeof(wl_iscan_params_t), buf,
WLC_IOCTL_SMLEN); BRCMF_C_IOCTL_SMLEN);
rc = dhd_wl_ioctl(dhdp, WLC_SET_VAR, buf, WLC_IOCTL_SMLEN); rc = dhd_wl_ioctl(dhdp, BRCMF_C_SET_VAR, buf, BRCMF_C_IOCTL_SMLEN);
return rc; return rc;
} }
...@@ -1683,7 +1683,7 @@ static int dhd_iscan_get_partial_result(void *dhdp, uint *scan_count) ...@@ -1683,7 +1683,7 @@ static int dhd_iscan_get_partial_result(void *dhdp, uint *scan_count)
brcmu_mkiovar("iscanresults", (char *)&list, brcmu_mkiovar("iscanresults", (char *)&list,
WL_ISCAN_RESULTS_FIXED_SIZE, WL_ISCAN_RESULTS_FIXED_SIZE,
iscan_cur->iscan_buf, WLC_IW_ISCAN_MAXLEN); iscan_cur->iscan_buf, WLC_IW_ISCAN_MAXLEN);
rc = dhd_wl_ioctl(dhdp, WLC_GET_VAR, iscan_cur->iscan_buf, rc = dhd_wl_ioctl(dhdp, BRCMF_C_GET_VAR, iscan_cur->iscan_buf,
WLC_IW_ISCAN_MAXLEN); WLC_IW_ISCAN_MAXLEN);
results->buflen = results->buflen; results->buflen = results->buflen;
...@@ -1714,13 +1714,13 @@ int dhd_pno_clean(dhd_pub_t *dhd) ...@@ -1714,13 +1714,13 @@ int dhd_pno_clean(dhd_pub_t *dhd)
/* Disable pfn */ /* Disable pfn */
iov_len = brcmu_mkiovar("pfn", (char *)&pfn_enabled, 4, iovbuf, iov_len = brcmu_mkiovar("pfn", (char *)&pfn_enabled, 4, iovbuf,
sizeof(iovbuf)); sizeof(iovbuf));
ret = dhdcdc_set_ioctl(dhd, 0, WLC_SET_VAR, iovbuf, sizeof(iovbuf)); ret = dhdcdc_set_ioctl(dhd, 0, BRCMF_C_SET_VAR, iovbuf, sizeof(iovbuf));
if (ret >= 0) { if (ret >= 0) {
/* clear pfn */ /* clear pfn */
iov_len = brcmu_mkiovar("pfnclear", 0, 0, iovbuf, iov_len = brcmu_mkiovar("pfnclear", 0, 0, iovbuf,
sizeof(iovbuf)); sizeof(iovbuf));
if (iov_len) { if (iov_len) {
ret = dhdcdc_set_ioctl(dhd, 0, WLC_SET_VAR, iovbuf, ret = dhdcdc_set_ioctl(dhd, 0, BRCMF_C_SET_VAR, iovbuf,
iov_len); iov_len);
if (ret < 0) { if (ret < 0) {
DHD_ERROR(("%s failed code %d\n", __func__, DHD_ERROR(("%s failed code %d\n", __func__,
...@@ -1750,7 +1750,7 @@ int dhd_pno_enable(dhd_pub_t *dhd, int pfn_enabled) ...@@ -1750,7 +1750,7 @@ int dhd_pno_enable(dhd_pub_t *dhd, int pfn_enabled)
ret = brcmu_mkiovar("pfn", (char *)&pfn_enabled, 4, iovbuf, ret = brcmu_mkiovar("pfn", (char *)&pfn_enabled, 4, iovbuf,
sizeof(iovbuf)); sizeof(iovbuf));
if (ret > 0) { if (ret > 0) {
ret = dhdcdc_set_ioctl(dhd, 0, WLC_SET_VAR, iovbuf, ret = dhdcdc_set_ioctl(dhd, 0, BRCMF_C_SET_VAR, iovbuf,
sizeof(iovbuf)); sizeof(iovbuf));
if (ret < 0) { if (ret < 0) {
DHD_ERROR(("%s failed for error=%d\n", __func__, ret)); DHD_ERROR(("%s failed for error=%d\n", __func__, ret));
...@@ -1822,7 +1822,7 @@ dhd_pno_set(dhd_pub_t *dhd, wlc_ssid_t *ssids_local, int nssid, unsigned char sc ...@@ -1822,7 +1822,7 @@ dhd_pno_set(dhd_pub_t *dhd, wlc_ssid_t *ssids_local, int nssid, unsigned char sc
brcmu_mkiovar("pfn_set", (char *)&pfn_param, sizeof(pfn_param), iovbuf, brcmu_mkiovar("pfn_set", (char *)&pfn_param, sizeof(pfn_param), iovbuf,
sizeof(iovbuf)); sizeof(iovbuf));
dhdcdc_set_ioctl(dhd, 0, WLC_SET_VAR, iovbuf, sizeof(iovbuf)); dhdcdc_set_ioctl(dhd, 0, BRCMF_C_SET_VAR, iovbuf, sizeof(iovbuf));
/* set all pfn ssid */ /* set all pfn ssid */
for (i = 0; i < nssid; i++) { for (i = 0; i < nssid; i++) {
...@@ -1840,7 +1840,7 @@ dhd_pno_set(dhd_pub_t *dhd, wlc_ssid_t *ssids_local, int nssid, unsigned char sc ...@@ -1840,7 +1840,7 @@ dhd_pno_set(dhd_pub_t *dhd, wlc_ssid_t *ssids_local, int nssid, unsigned char sc
err = brcmu_mkiovar("pfn_add", (char *)&pfn_element, err = brcmu_mkiovar("pfn_add", (char *)&pfn_element,
sizeof(pfn_element), iovbuf, sizeof(iovbuf)); sizeof(pfn_element), iovbuf, sizeof(iovbuf));
if (err > 0) { if (err > 0) {
err = dhdcdc_set_ioctl(dhd, 0, WLC_SET_VAR, iovbuf, err = dhdcdc_set_ioctl(dhd, 0, BRCMF_C_SET_VAR, iovbuf,
sizeof(iovbuf)); sizeof(iovbuf));
if (err < 0) { if (err < 0) {
DHD_ERROR(("%s failed for i=%d error=%d\n", DHD_ERROR(("%s failed for i=%d error=%d\n",
......
...@@ -417,7 +417,7 @@ static int dhd_set_suspend(int value, dhd_pub_t *dhd) ...@@ -417,7 +417,7 @@ static int dhd_set_suspend(int value, dhd_pub_t *dhd)
DHD_TRACE(("%s: force extra Suspend setting\n", DHD_TRACE(("%s: force extra Suspend setting\n",
__func__)); __func__));
dhdcdc_set_ioctl(dhd, 0, WLC_SET_PM, dhdcdc_set_ioctl(dhd, 0, BRCMF_C_SET_PM,
(char *)&power_mode, (char *)&power_mode,
sizeof(power_mode)); sizeof(power_mode));
...@@ -437,7 +437,7 @@ static int dhd_set_suspend(int value, dhd_pub_t *dhd) ...@@ -437,7 +437,7 @@ static int dhd_set_suspend(int value, dhd_pub_t *dhd)
bcn_li_dtim = dhd->dtim_skip; bcn_li_dtim = dhd->dtim_skip;
brcmu_mkiovar("bcn_li_dtim", (char *)&bcn_li_dtim, brcmu_mkiovar("bcn_li_dtim", (char *)&bcn_li_dtim,
4, iovbuf, sizeof(iovbuf)); 4, iovbuf, sizeof(iovbuf));
dhdcdc_set_ioctl(dhd, 0, WLC_SET_VAR, iovbuf, dhdcdc_set_ioctl(dhd, 0, BRCMF_C_SET_VAR, iovbuf,
sizeof(iovbuf)); sizeof(iovbuf));
#ifdef CUSTOMER_HW2 #ifdef CUSTOMER_HW2
/* Disable build-in roaming to allowed \ /* Disable build-in roaming to allowed \
...@@ -445,7 +445,7 @@ static int dhd_set_suspend(int value, dhd_pub_t *dhd) ...@@ -445,7 +445,7 @@ static int dhd_set_suspend(int value, dhd_pub_t *dhd)
*/ */
brcmu_mkiovar("roam_off", (char *)&roamvar, 4, brcmu_mkiovar("roam_off", (char *)&roamvar, 4,
iovbuf, sizeof(iovbuf)); iovbuf, sizeof(iovbuf));
dhdcdc_set_ioctl(dhd, 0, WLC_SET_VAR, iovbuf, dhdcdc_set_ioctl(dhd, 0, BRCMF_C_SET_VAR, iovbuf,
sizeof(iovbuf)); sizeof(iovbuf));
#endif /* CUSTOMER_HW2 */ #endif /* CUSTOMER_HW2 */
} else { } else {
...@@ -455,7 +455,7 @@ static int dhd_set_suspend(int value, dhd_pub_t *dhd) ...@@ -455,7 +455,7 @@ static int dhd_set_suspend(int value, dhd_pub_t *dhd)
__func__)); __func__));
power_mode = PM_FAST; power_mode = PM_FAST;
dhdcdc_set_ioctl(dhd, 0, WLC_SET_PM, dhdcdc_set_ioctl(dhd, 0, BRCMF_C_SET_PM,
(char *)&power_mode, (char *)&power_mode,
sizeof(power_mode)); sizeof(power_mode));
...@@ -466,13 +466,13 @@ static int dhd_set_suspend(int value, dhd_pub_t *dhd) ...@@ -466,13 +466,13 @@ static int dhd_set_suspend(int value, dhd_pub_t *dhd)
brcmu_mkiovar("bcn_li_dtim", (char *)&dhd->dtim_skip, brcmu_mkiovar("bcn_li_dtim", (char *)&dhd->dtim_skip,
4, iovbuf, sizeof(iovbuf)); 4, iovbuf, sizeof(iovbuf));
dhdcdc_set_ioctl(dhd, 0, WLC_SET_VAR, iovbuf, dhdcdc_set_ioctl(dhd, 0, BRCMF_C_SET_VAR, iovbuf,
sizeof(iovbuf)); sizeof(iovbuf));
#ifdef CUSTOMER_HW2 #ifdef CUSTOMER_HW2
roamvar = 0; roamvar = 0;
brcmu_mkiovar("roam_off", (char *)&roamvar, 4, iovbuf, brcmu_mkiovar("roam_off", (char *)&roamvar, 4, iovbuf,
sizeof(iovbuf)); sizeof(iovbuf));
dhdcdc_set_ioctl(dhd, 0, WLC_SET_VAR, iovbuf, dhdcdc_set_ioctl(dhd, 0, BRCMF_C_SET_VAR, iovbuf,
sizeof(iovbuf)); sizeof(iovbuf));
#endif /* CUSTOMER_HW2 */ #endif /* CUSTOMER_HW2 */
} }
...@@ -672,7 +672,7 @@ static void _dhd_set_multicast_list(dhd_info_t *dhd, int ifidx) ...@@ -672,7 +672,7 @@ static void _dhd_set_multicast_list(dhd_info_t *dhd, int ifidx)
} }
memset(&ioc, 0, sizeof(ioc)); memset(&ioc, 0, sizeof(ioc));
ioc.cmd = WLC_SET_VAR; ioc.cmd = BRCMF_C_SET_VAR;
ioc.buf = buf; ioc.buf = buf;
ioc.len = buflen; ioc.len = buflen;
ioc.set = true; ioc.set = true;
...@@ -710,7 +710,7 @@ static void _dhd_set_multicast_list(dhd_info_t *dhd, int ifidx) ...@@ -710,7 +710,7 @@ static void _dhd_set_multicast_list(dhd_info_t *dhd, int ifidx)
} }
memset(&ioc, 0, sizeof(ioc)); memset(&ioc, 0, sizeof(ioc));
ioc.cmd = WLC_SET_VAR; ioc.cmd = BRCMF_C_SET_VAR;
ioc.buf = buf; ioc.buf = buf;
ioc.len = buflen; ioc.len = buflen;
ioc.set = true; ioc.set = true;
...@@ -731,7 +731,7 @@ static void _dhd_set_multicast_list(dhd_info_t *dhd, int ifidx) ...@@ -731,7 +731,7 @@ static void _dhd_set_multicast_list(dhd_info_t *dhd, int ifidx)
allmulti = cpu_to_le32(allmulti); allmulti = cpu_to_le32(allmulti);
memset(&ioc, 0, sizeof(ioc)); memset(&ioc, 0, sizeof(ioc));
ioc.cmd = WLC_SET_PROMISC; ioc.cmd = BRCMF_C_SET_PROMISC;
ioc.buf = &allmulti; ioc.buf = &allmulti;
ioc.len = sizeof(allmulti); ioc.len = sizeof(allmulti);
ioc.set = true; ioc.set = true;
...@@ -759,7 +759,7 @@ _dhd_set_mac_address(dhd_info_t *dhd, int ifidx, u8 *addr) ...@@ -759,7 +759,7 @@ _dhd_set_mac_address(dhd_info_t *dhd, int ifidx, u8 *addr)
return -1; return -1;
} }
memset(&ioc, 0, sizeof(ioc)); memset(&ioc, 0, sizeof(ioc));
ioc.cmd = WLC_SET_VAR; ioc.cmd = BRCMF_C_SET_VAR;
ioc.buf = buf; ioc.buf = buf;
ioc.len = 32; ioc.len = 32;
ioc.set = true; ioc.set = true;
...@@ -1368,7 +1368,7 @@ static int dhd_toe_get(dhd_info_t *dhd, int ifidx, u32 *toe_ol) ...@@ -1368,7 +1368,7 @@ static int dhd_toe_get(dhd_info_t *dhd, int ifidx, u32 *toe_ol)
memset(&ioc, 0, sizeof(ioc)); memset(&ioc, 0, sizeof(ioc));
ioc.cmd = WLC_GET_VAR; ioc.cmd = BRCMF_C_GET_VAR;
ioc.buf = buf; ioc.buf = buf;
ioc.len = (uint) sizeof(buf); ioc.len = (uint) sizeof(buf);
ioc.set = false; ioc.set = false;
...@@ -1402,7 +1402,7 @@ static int dhd_toe_set(dhd_info_t *dhd, int ifidx, u32 toe_ol) ...@@ -1402,7 +1402,7 @@ static int dhd_toe_set(dhd_info_t *dhd, int ifidx, u32 toe_ol)
memset(&ioc, 0, sizeof(ioc)); memset(&ioc, 0, sizeof(ioc));
ioc.cmd = WLC_SET_VAR; ioc.cmd = BRCMF_C_SET_VAR;
ioc.buf = buf; ioc.buf = buf;
ioc.len = (uint) sizeof(buf); ioc.len = (uint) sizeof(buf);
ioc.set = true; ioc.set = true;
...@@ -1652,13 +1652,14 @@ static int dhd_ioctl_entry(struct net_device *net, struct ifreq *ifr, int cmd) ...@@ -1652,13 +1652,14 @@ static int dhd_ioctl_entry(struct net_device *net, struct ifreq *ifr, int cmd)
goto done; goto done;
} }
/* Intercept WLC_SET_KEY IOCTL - serialize M4 send and set key IOCTL to /*
* prevent M4 encryption. * Intercept BRCMF_C_SET_KEY IOCTL - serialize M4 send and
* set key IOCTL to prevent M4 encryption.
*/ */
is_set_key_cmd = ((ioc.cmd == WLC_SET_KEY) || is_set_key_cmd = ((ioc.cmd == BRCMF_C_SET_KEY) ||
((ioc.cmd == WLC_SET_VAR) && ((ioc.cmd == BRCMF_C_SET_VAR) &&
!(strncmp("wsec_key", ioc.buf, 9))) || !(strncmp("wsec_key", ioc.buf, 9))) ||
((ioc.cmd == WLC_SET_VAR) && ((ioc.cmd == BRCMF_C_SET_VAR) &&
!(strncmp("bsscfg:wsec_key", ioc.buf, 15)))); !(strncmp("bsscfg:wsec_key", ioc.buf, 15))));
if (is_set_key_cmd) if (is_set_key_cmd)
dhd_wait_pend8021x(net); dhd_wait_pend8021x(net);
...@@ -2023,7 +2024,7 @@ int dhd_bus_start(dhd_pub_t *dhdp) ...@@ -2023,7 +2024,7 @@ int dhd_bus_start(dhd_pub_t *dhdp)
#ifdef EMBEDDED_PLATFORM #ifdef EMBEDDED_PLATFORM
brcmu_mkiovar("event_msgs", dhdp->eventmask, WL_EVENTING_MASK_LEN, brcmu_mkiovar("event_msgs", dhdp->eventmask, WL_EVENTING_MASK_LEN,
iovbuf, sizeof(iovbuf)); iovbuf, sizeof(iovbuf));
dhdcdc_query_ioctl(dhdp, 0, WLC_GET_VAR, iovbuf, sizeof(iovbuf)); dhdcdc_query_ioctl(dhdp, 0, BRCMF_C_GET_VAR, iovbuf, sizeof(iovbuf));
memcpy(dhdp->eventmask, iovbuf, WL_EVENTING_MASK_LEN); memcpy(dhdp->eventmask, iovbuf, WL_EVENTING_MASK_LEN);
setbit(dhdp->eventmask, WLC_E_SET_SSID); setbit(dhdp->eventmask, WLC_E_SET_SSID);
...@@ -2076,7 +2077,7 @@ dhd_iovar(dhd_pub_t *pub, int ifidx, char *name, char *cmd_buf, uint cmd_len, ...@@ -2076,7 +2077,7 @@ dhd_iovar(dhd_pub_t *pub, int ifidx, char *name, char *cmd_buf, uint cmd_len,
memset(&ioc, 0, sizeof(ioc)); memset(&ioc, 0, sizeof(ioc));
ioc.cmd = set ? WLC_SET_VAR : WLC_GET_VAR; ioc.cmd = set ? BRCMF_C_SET_VAR : BRCMF_C_GET_VAR;
ioc.buf = buf; ioc.buf = buf;
ioc.len = len; ioc.len = len;
ioc.set = set; ioc.set = set;
......
...@@ -596,7 +596,7 @@ wl_cfg80211_change_iface(struct wiphy *wiphy, struct net_device *ndev, ...@@ -596,7 +596,7 @@ wl_cfg80211_change_iface(struct wiphy *wiphy, struct net_device *ndev,
} }
infra = cpu_to_le32(infra); infra = cpu_to_le32(infra);
err = wl_dev_ioctl(ndev, WLC_SET_INFRA, &infra, sizeof(infra)); err = wl_dev_ioctl(ndev, BRCMF_C_SET_INFRA, &infra, sizeof(infra));
if (unlikely(err)) { if (unlikely(err)) {
WL_ERR("WLC_SET_INFRA error (%d)\n", err); WL_ERR("WLC_SET_INFRA error (%d)\n", err);
err = -EAGAIN; err = -EAGAIN;
...@@ -643,7 +643,7 @@ wl_dev_iovar_setbuf(struct net_device *dev, s8 * iovar, void *param, ...@@ -643,7 +643,7 @@ wl_dev_iovar_setbuf(struct net_device *dev, s8 * iovar, void *param,
iolen = brcmu_mkiovar(iovar, param, paramlen, bufptr, buflen); iolen = brcmu_mkiovar(iovar, param, paramlen, bufptr, buflen);
BUG_ON(!iolen); BUG_ON(!iolen);
return wl_dev_ioctl(dev, WLC_SET_VAR, bufptr, iolen); return wl_dev_ioctl(dev, BRCMF_C_SET_VAR, bufptr, iolen);
} }
static s32 static s32
...@@ -655,7 +655,7 @@ wl_dev_iovar_getbuf(struct net_device *dev, s8 * iovar, void *param, ...@@ -655,7 +655,7 @@ wl_dev_iovar_getbuf(struct net_device *dev, s8 * iovar, void *param,
iolen = brcmu_mkiovar(iovar, param, paramlen, bufptr, buflen); iolen = brcmu_mkiovar(iovar, param, paramlen, bufptr, buflen);
BUG_ON(!iolen); BUG_ON(!iolen);
return wl_dev_ioctl(dev, WLC_GET_VAR, bufptr, buflen); return wl_dev_ioctl(dev, BRCMF_C_GET_VAR, bufptr, buflen);
} }
static s32 static s32
...@@ -671,7 +671,7 @@ wl_run_iscan(struct wl_iscan_ctrl *iscan, struct wlc_ssid *ssid, u16 action) ...@@ -671,7 +671,7 @@ wl_run_iscan(struct wl_iscan_ctrl *iscan, struct wlc_ssid *ssid, u16 action)
params = kzalloc(params_size, GFP_KERNEL); params = kzalloc(params_size, GFP_KERNEL);
if (unlikely(!params)) if (unlikely(!params))
return -ENOMEM; return -ENOMEM;
BUG_ON(params_size >= WLC_IOCTL_SMLEN); BUG_ON(params_size >= BRCMF_C_IOCTL_SMLEN);
wl_iscan_prep(&params->params, ssid); wl_iscan_prep(&params->params, ssid);
...@@ -681,7 +681,7 @@ wl_run_iscan(struct wl_iscan_ctrl *iscan, struct wlc_ssid *ssid, u16 action) ...@@ -681,7 +681,7 @@ wl_run_iscan(struct wl_iscan_ctrl *iscan, struct wlc_ssid *ssid, u16 action)
/* params_size += offsetof(wl_iscan_params_t, params); */ /* params_size += offsetof(wl_iscan_params_t, params); */
err = wl_dev_iovar_setbuf(iscan->dev, "iscan", params, params_size, err = wl_dev_iovar_setbuf(iscan->dev, "iscan", params, params_size,
iscan->ioctl_buf, WLC_IOCTL_SMLEN); iscan->ioctl_buf, BRCMF_C_IOCTL_SMLEN);
if (unlikely(err)) { if (unlikely(err)) {
if (err == -EBUSY) { if (err == -EBUSY) {
WL_INFO("system busy : iscan canceled\n"); WL_INFO("system busy : iscan canceled\n");
...@@ -707,7 +707,7 @@ static s32 wl_do_iscan(struct wl_priv *wl) ...@@ -707,7 +707,7 @@ static s32 wl_do_iscan(struct wl_priv *wl)
iscan->state = WL_ISCAN_STATE_SCANING; iscan->state = WL_ISCAN_STATE_SCANING;
passive_scan = wl->active_scan ? 0 : 1; passive_scan = wl->active_scan ? 0 : 1;
err = wl_dev_ioctl(wl_to_ndev(wl), WLC_SET_PASSIVE_SCAN, err = wl_dev_ioctl(wl_to_ndev(wl), BRCMF_C_SET_PASSIVE_SCAN,
&passive_scan, sizeof(passive_scan)); &passive_scan, sizeof(passive_scan));
if (unlikely(err)) { if (unlikely(err)) {
WL_ERR("error (%d)\n", err); WL_ERR("error (%d)\n", err);
...@@ -786,14 +786,14 @@ __wl_cfg80211_scan(struct wiphy *wiphy, struct net_device *ndev, ...@@ -786,14 +786,14 @@ __wl_cfg80211_scan(struct wiphy *wiphy, struct net_device *ndev,
} }
passive_scan = wl->active_scan ? 0 : 1; passive_scan = wl->active_scan ? 0 : 1;
err = wl_dev_ioctl(ndev, WLC_SET_PASSIVE_SCAN, err = wl_dev_ioctl(ndev, BRCMF_C_SET_PASSIVE_SCAN,
&passive_scan, sizeof(passive_scan)); &passive_scan, sizeof(passive_scan));
if (unlikely(err)) { if (unlikely(err)) {
WL_ERR("WLC_SET_PASSIVE_SCAN error (%d)\n", err); WL_ERR("WLC_SET_PASSIVE_SCAN error (%d)\n", err);
goto scan_out; goto scan_out;
} }
wl_set_mpc(ndev, 0); wl_set_mpc(ndev, 0);
err = wl_dev_ioctl(ndev, WLC_SCAN, &sr->ssid, err = wl_dev_ioctl(ndev, BRCMF_C_SCAN, &sr->ssid,
sizeof(sr->ssid)); sizeof(sr->ssid));
if (err) { if (err) {
if (err == -EBUSY) { if (err == -EBUSY) {
...@@ -835,7 +835,7 @@ wl_cfg80211_scan(struct wiphy *wiphy, struct net_device *ndev, ...@@ -835,7 +835,7 @@ wl_cfg80211_scan(struct wiphy *wiphy, struct net_device *ndev,
static s32 wl_dev_intvar_set(struct net_device *dev, s8 *name, s32 val) static s32 wl_dev_intvar_set(struct net_device *dev, s8 *name, s32 val)
{ {
s8 buf[WLC_IOCTL_SMLEN]; s8 buf[BRCMF_C_IOCTL_SMLEN];
u32 len; u32 len;
s32 err = 0; s32 err = 0;
...@@ -844,7 +844,7 @@ static s32 wl_dev_intvar_set(struct net_device *dev, s8 *name, s32 val) ...@@ -844,7 +844,7 @@ static s32 wl_dev_intvar_set(struct net_device *dev, s8 *name, s32 val)
sizeof(buf)); sizeof(buf));
BUG_ON(!len); BUG_ON(!len);
err = wl_dev_ioctl(dev, WLC_SET_VAR, buf, len); err = wl_dev_ioctl(dev, BRCMF_C_SET_VAR, buf, len);
if (unlikely(err)) if (unlikely(err))
WL_ERR("error (%d)\n", err); WL_ERR("error (%d)\n", err);
...@@ -855,7 +855,7 @@ static s32 ...@@ -855,7 +855,7 @@ static s32
wl_dev_intvar_get(struct net_device *dev, s8 *name, s32 *retval) wl_dev_intvar_get(struct net_device *dev, s8 *name, s32 *retval)
{ {
union { union {
s8 buf[WLC_IOCTL_SMLEN]; s8 buf[BRCMF_C_IOCTL_SMLEN];
s32 val; s32 val;
} var; } var;
u32 len; u32 len;
...@@ -866,7 +866,7 @@ wl_dev_intvar_get(struct net_device *dev, s8 *name, s32 *retval) ...@@ -866,7 +866,7 @@ wl_dev_intvar_get(struct net_device *dev, s8 *name, s32 *retval)
brcmu_mkiovar(name, (char *)(&data_null), 0, (char *)(&var), brcmu_mkiovar(name, (char *)(&data_null), 0, (char *)(&var),
sizeof(var.buf)); sizeof(var.buf));
BUG_ON(!len); BUG_ON(!len);
err = wl_dev_ioctl(dev, WLC_GET_VAR, &var, len); err = wl_dev_ioctl(dev, BRCMF_C_GET_VAR, &var, len);
if (unlikely(err)) if (unlikely(err))
WL_ERR("error (%d)\n", err); WL_ERR("error (%d)\n", err);
...@@ -1084,7 +1084,8 @@ wl_cfg80211_join_ibss(struct wiphy *wiphy, struct net_device *dev, ...@@ -1084,7 +1084,8 @@ wl_cfg80211_join_ibss(struct wiphy *wiphy, struct net_device *dev,
wl->ibss_starter = false; wl->ibss_starter = false;
err = wl_dev_ioctl(dev, WLC_SET_SSID, &join_params, join_params_size); err = wl_dev_ioctl(dev, BRCMF_C_SET_SSID,
&join_params, join_params_size);
if (unlikely(err)) { if (unlikely(err)) {
WL_ERR("WLC_SET_SSID failed (%d)\n", err); WL_ERR("WLC_SET_SSID failed (%d)\n", err);
goto done; goto done;
...@@ -1343,7 +1344,7 @@ wl_set_set_sharedkey(struct net_device *dev, ...@@ -1343,7 +1344,7 @@ wl_set_set_sharedkey(struct net_device *dev,
key.len, key.index, key.algo); key.len, key.index, key.algo);
WL_CONN("key \"%s\"\n", key.data); WL_CONN("key \"%s\"\n", key.data);
swap_key_from_BE(&key); swap_key_from_BE(&key);
err = wl_dev_ioctl(dev, WLC_SET_KEY, &key, err = wl_dev_ioctl(dev, BRCMF_C_SET_KEY, &key,
sizeof(key)); sizeof(key));
if (unlikely(err)) { if (unlikely(err)) {
WL_ERR("WLC_SET_KEY error (%d)\n", err); WL_ERR("WLC_SET_KEY error (%d)\n", err);
...@@ -1448,7 +1449,8 @@ wl_cfg80211_connect(struct wiphy *wiphy, struct net_device *dev, ...@@ -1448,7 +1449,8 @@ wl_cfg80211_connect(struct wiphy *wiphy, struct net_device *dev,
} }
wl_ch_to_chanspec(wl->channel, &join_params, &join_params_size); wl_ch_to_chanspec(wl->channel, &join_params, &join_params_size);
err = wl_dev_ioctl(dev, WLC_SET_SSID, &join_params, join_params_size); err = wl_dev_ioctl(dev, BRCMF_C_SET_SSID,
&join_params, join_params_size);
if (err) if (err)
WL_ERR("WLC_SET_SSID failed (%d)\n", err); WL_ERR("WLC_SET_SSID failed (%d)\n", err);
...@@ -1475,7 +1477,7 @@ wl_cfg80211_disconnect(struct wiphy *wiphy, struct net_device *dev, ...@@ -1475,7 +1477,7 @@ wl_cfg80211_disconnect(struct wiphy *wiphy, struct net_device *dev,
scbval.val = reason_code; scbval.val = reason_code;
memcpy(&scbval.ea, wl_read_prof(wl, WL_PROF_BSSID), ETH_ALEN); memcpy(&scbval.ea, wl_read_prof(wl, WL_PROF_BSSID), ETH_ALEN);
scbval.val = cpu_to_le32(scbval.val); scbval.val = cpu_to_le32(scbval.val);
err = wl_dev_ioctl(dev, WLC_DISASSOC, &scbval, err = wl_dev_ioctl(dev, BRCMF_C_DISASSOC, &scbval,
sizeof(scb_val_t)); sizeof(scb_val_t));
if (unlikely(err)) if (unlikely(err))
WL_ERR("error (%d)\n", err); WL_ERR("error (%d)\n", err);
...@@ -1521,7 +1523,7 @@ wl_cfg80211_set_tx_power(struct wiphy *wiphy, ...@@ -1521,7 +1523,7 @@ wl_cfg80211_set_tx_power(struct wiphy *wiphy,
/* Make sure radio is off or on as far as software is concerned */ /* Make sure radio is off or on as far as software is concerned */
disable = WL_RADIO_SW_DISABLE << 16; disable = WL_RADIO_SW_DISABLE << 16;
disable = cpu_to_le32(disable); disable = cpu_to_le32(disable);
err = wl_dev_ioctl(ndev, WLC_SET_RADIO, &disable, sizeof(disable)); err = wl_dev_ioctl(ndev, BRCMF_C_SET_RADIO, &disable, sizeof(disable));
if (unlikely(err)) if (unlikely(err))
WL_ERR("WLC_SET_RADIO error (%d)\n", err); WL_ERR("WLC_SET_RADIO error (%d)\n", err);
...@@ -1577,7 +1579,7 @@ wl_cfg80211_config_default_key(struct wiphy *wiphy, struct net_device *dev, ...@@ -1577,7 +1579,7 @@ wl_cfg80211_config_default_key(struct wiphy *wiphy, struct net_device *dev,
WL_CONN("key index (%d)\n", key_idx); WL_CONN("key index (%d)\n", key_idx);
CHECK_SYS_UP(); CHECK_SYS_UP();
err = wl_dev_ioctl(dev, WLC_GET_WSEC, &wsec, sizeof(wsec)); err = wl_dev_ioctl(dev, BRCMF_C_GET_WSEC, &wsec, sizeof(wsec));
if (unlikely(err)) { if (unlikely(err)) {
WL_ERR("WLC_GET_WSEC error (%d)\n", err); WL_ERR("WLC_GET_WSEC error (%d)\n", err);
goto done; goto done;
...@@ -1588,7 +1590,7 @@ wl_cfg80211_config_default_key(struct wiphy *wiphy, struct net_device *dev, ...@@ -1588,7 +1590,7 @@ wl_cfg80211_config_default_key(struct wiphy *wiphy, struct net_device *dev,
/* Just select a new current key */ /* Just select a new current key */
index = (u32) key_idx; index = (u32) key_idx;
index = cpu_to_le32(index); index = cpu_to_le32(index);
err = wl_dev_ioctl(dev, WLC_SET_KEY_PRIMARY, &index, err = wl_dev_ioctl(dev, BRCMF_C_SET_KEY_PRIMARY, &index,
sizeof(index)); sizeof(index));
if (unlikely(err)) if (unlikely(err))
WL_ERR("error (%d)\n", err); WL_ERR("error (%d)\n", err);
...@@ -1616,7 +1618,7 @@ wl_add_keyext(struct wiphy *wiphy, struct net_device *dev, ...@@ -1616,7 +1618,7 @@ wl_add_keyext(struct wiphy *wiphy, struct net_device *dev,
if (key.len == 0) { if (key.len == 0) {
/* key delete */ /* key delete */
swap_key_from_BE(&key); swap_key_from_BE(&key);
err = wl_dev_ioctl(dev, WLC_SET_KEY, &key, sizeof(key)); err = wl_dev_ioctl(dev, BRCMF_C_SET_KEY, &key, sizeof(key));
if (unlikely(err)) { if (unlikely(err)) {
WL_ERR("key delete error (%d)\n", err); WL_ERR("key delete error (%d)\n", err);
return err; return err;
...@@ -1676,7 +1678,7 @@ wl_add_keyext(struct wiphy *wiphy, struct net_device *dev, ...@@ -1676,7 +1678,7 @@ wl_add_keyext(struct wiphy *wiphy, struct net_device *dev,
swap_key_from_BE(&key); swap_key_from_BE(&key);
dhd_wait_pend8021x(dev); dhd_wait_pend8021x(dev);
err = wl_dev_ioctl(dev, WLC_SET_KEY, &key, sizeof(key)); err = wl_dev_ioctl(dev, BRCMF_C_SET_KEY, &key, sizeof(key));
if (unlikely(err)) { if (unlikely(err)) {
WL_ERR("WLC_SET_KEY error (%d)\n", err); WL_ERR("WLC_SET_KEY error (%d)\n", err);
return err; return err;
...@@ -1749,7 +1751,7 @@ wl_cfg80211_add_key(struct wiphy *wiphy, struct net_device *dev, ...@@ -1749,7 +1751,7 @@ wl_cfg80211_add_key(struct wiphy *wiphy, struct net_device *dev,
/* Set the new key/index */ /* Set the new key/index */
swap_key_from_BE(&key); swap_key_from_BE(&key);
err = wl_dev_ioctl(dev, WLC_SET_KEY, &key, sizeof(key)); err = wl_dev_ioctl(dev, BRCMF_C_SET_KEY, &key, sizeof(key));
if (unlikely(err)) { if (unlikely(err)) {
WL_ERR("WLC_SET_KEY error (%d)\n", err); WL_ERR("WLC_SET_KEY error (%d)\n", err);
goto done; goto done;
...@@ -1771,7 +1773,7 @@ wl_cfg80211_add_key(struct wiphy *wiphy, struct net_device *dev, ...@@ -1771,7 +1773,7 @@ wl_cfg80211_add_key(struct wiphy *wiphy, struct net_device *dev,
val = 1; /* assume shared key. otherwise 0 */ val = 1; /* assume shared key. otherwise 0 */
val = cpu_to_le32(val); val = cpu_to_le32(val);
err = wl_dev_ioctl(dev, WLC_SET_AUTH, &val, sizeof(val)); err = wl_dev_ioctl(dev, BRCMF_C_SET_AUTH, &val, sizeof(val));
if (unlikely(err)) if (unlikely(err))
WL_ERR("WLC_SET_AUTH error (%d)\n", err); WL_ERR("WLC_SET_AUTH error (%d)\n", err);
done: done:
...@@ -1799,7 +1801,7 @@ wl_cfg80211_del_key(struct wiphy *wiphy, struct net_device *dev, ...@@ -1799,7 +1801,7 @@ wl_cfg80211_del_key(struct wiphy *wiphy, struct net_device *dev,
WL_CONN("key index (%d)\n", key_idx); WL_CONN("key index (%d)\n", key_idx);
/* Set the new key/index */ /* Set the new key/index */
swap_key_from_BE(&key); swap_key_from_BE(&key);
err = wl_dev_ioctl(dev, WLC_SET_KEY, &key, sizeof(key)); err = wl_dev_ioctl(dev, BRCMF_C_SET_KEY, &key, sizeof(key));
if (unlikely(err)) { if (unlikely(err)) {
if (err == -EINVAL) { if (err == -EINVAL) {
if (key.index >= DOT11_MAX_DEFAULT_KEYS) if (key.index >= DOT11_MAX_DEFAULT_KEYS)
...@@ -1833,7 +1835,7 @@ wl_cfg80211_del_key(struct wiphy *wiphy, struct net_device *dev, ...@@ -1833,7 +1835,7 @@ wl_cfg80211_del_key(struct wiphy *wiphy, struct net_device *dev,
val = 0; /* assume open key. otherwise 1 */ val = 0; /* assume open key. otherwise 1 */
val = cpu_to_le32(val); val = cpu_to_le32(val);
err = wl_dev_ioctl(dev, WLC_SET_AUTH, &val, sizeof(val)); err = wl_dev_ioctl(dev, BRCMF_C_SET_AUTH, &val, sizeof(val));
if (unlikely(err)) { if (unlikely(err)) {
WL_ERR("WLC_SET_AUTH error (%d)\n", err); WL_ERR("WLC_SET_AUTH error (%d)\n", err);
/* Ignore this error, may happen during DISASSOC */ /* Ignore this error, may happen during DISASSOC */
...@@ -1867,7 +1869,7 @@ wl_cfg80211_get_key(struct wiphy *wiphy, struct net_device *dev, ...@@ -1867,7 +1869,7 @@ wl_cfg80211_get_key(struct wiphy *wiphy, struct net_device *dev,
params.key_len = (u8) min_t(u8, WLAN_MAX_KEY_LEN, key.len); params.key_len = (u8) min_t(u8, WLAN_MAX_KEY_LEN, key.len);
memcpy(params.key, key.data, params.key_len); memcpy(params.key, key.data, params.key_len);
err = wl_dev_ioctl(dev, WLC_GET_WSEC, &wsec, sizeof(wsec)); err = wl_dev_ioctl(dev, BRCMF_C_GET_WSEC, &wsec, sizeof(wsec));
if (unlikely(err)) { if (unlikely(err)) {
WL_ERR("WLC_GET_WSEC error (%d)\n", err); WL_ERR("WLC_GET_WSEC error (%d)\n", err);
/* Ignore this error, may happen during DISASSOC */ /* Ignore this error, may happen during DISASSOC */
...@@ -1942,7 +1944,7 @@ wl_cfg80211_get_station(struct wiphy *wiphy, struct net_device *dev, ...@@ -1942,7 +1944,7 @@ wl_cfg80211_get_station(struct wiphy *wiphy, struct net_device *dev,
} }
/* Report the current tx rate */ /* Report the current tx rate */
err = wl_dev_ioctl(dev, WLC_GET_RATE, &rate, sizeof(rate)); err = wl_dev_ioctl(dev, BRCMF_C_GET_RATE, &rate, sizeof(rate));
if (err) { if (err) {
WL_ERR("Could not get rate (%d)\n", err); WL_ERR("Could not get rate (%d)\n", err);
} else { } else {
...@@ -1954,7 +1956,7 @@ wl_cfg80211_get_station(struct wiphy *wiphy, struct net_device *dev, ...@@ -1954,7 +1956,7 @@ wl_cfg80211_get_station(struct wiphy *wiphy, struct net_device *dev,
if (test_bit(WL_STATUS_CONNECTED, &wl->status)) { if (test_bit(WL_STATUS_CONNECTED, &wl->status)) {
scb_val.val = 0; scb_val.val = 0;
err = wl_dev_ioctl(dev, WLC_GET_RSSI, &scb_val, err = wl_dev_ioctl(dev, BRCMF_C_GET_RSSI, &scb_val,
sizeof(scb_val_t)); sizeof(scb_val_t));
if (unlikely(err)) { if (unlikely(err)) {
WL_ERR("Could not get rssi (%d)\n", err); WL_ERR("Could not get rssi (%d)\n", err);
...@@ -1984,7 +1986,7 @@ wl_cfg80211_set_power_mgmt(struct wiphy *wiphy, struct net_device *dev, ...@@ -1984,7 +1986,7 @@ wl_cfg80211_set_power_mgmt(struct wiphy *wiphy, struct net_device *dev,
pm = cpu_to_le32(pm); pm = cpu_to_le32(pm);
WL_INFO("power save %s\n", (pm ? "enabled" : "disabled")); WL_INFO("power save %s\n", (pm ? "enabled" : "disabled"));
err = wl_dev_ioctl(dev, WLC_SET_PM, &pm, sizeof(pm)); err = wl_dev_ioctl(dev, BRCMF_C_SET_PM, &pm, sizeof(pm));
if (unlikely(err)) { if (unlikely(err)) {
if (err == -ENODEV) if (err == -ENODEV)
WL_ERR("net_device is not ready yet\n"); WL_ERR("net_device is not ready yet\n");
...@@ -2522,7 +2524,7 @@ wl_inform_ibss(struct wl_priv *wl, struct net_device *dev, const u8 *bssid) ...@@ -2522,7 +2524,7 @@ wl_inform_ibss(struct wl_priv *wl, struct net_device *dev, const u8 *bssid)
*(u32 *)buf = cpu_to_le32(WL_BSS_INFO_MAX); *(u32 *)buf = cpu_to_le32(WL_BSS_INFO_MAX);
err = wl_dev_ioctl(dev, WLC_GET_BSS_INFO, buf, WL_BSS_INFO_MAX); err = wl_dev_ioctl(dev, BRCMF_C_GET_BSS_INFO, buf, WL_BSS_INFO_MAX);
if (unlikely(err)) { if (unlikely(err)) {
WL_ERR("WLC_GET_BSS_INFO failed: %d\n", err); WL_ERR("WLC_GET_BSS_INFO failed: %d\n", err);
goto CleanUp; goto CleanUp;
...@@ -2684,7 +2686,7 @@ wl_dev_bufvar_set(struct net_device *dev, s8 *name, s8 *buf, s32 len) ...@@ -2684,7 +2686,7 @@ wl_dev_bufvar_set(struct net_device *dev, s8 *name, s8 *buf, s32 len)
buflen = brcmu_mkiovar(name, buf, len, wl->ioctl_buf, WL_IOCTL_LEN_MAX); buflen = brcmu_mkiovar(name, buf, len, wl->ioctl_buf, WL_IOCTL_LEN_MAX);
BUG_ON(!buflen); BUG_ON(!buflen);
return wl_dev_ioctl(dev, WLC_SET_VAR, wl->ioctl_buf, buflen); return wl_dev_ioctl(dev, BRCMF_C_SET_VAR, wl->ioctl_buf, buflen);
} }
static s32 static s32
...@@ -2697,7 +2699,7 @@ wl_dev_bufvar_get(struct net_device *dev, s8 *name, s8 *buf, ...@@ -2697,7 +2699,7 @@ wl_dev_bufvar_get(struct net_device *dev, s8 *name, s8 *buf,
len = brcmu_mkiovar(name, NULL, 0, wl->ioctl_buf, WL_IOCTL_LEN_MAX); len = brcmu_mkiovar(name, NULL, 0, wl->ioctl_buf, WL_IOCTL_LEN_MAX);
BUG_ON(!len); BUG_ON(!len);
err = wl_dev_ioctl(dev, WLC_GET_VAR, (void *)wl->ioctl_buf, err = wl_dev_ioctl(dev, BRCMF_C_GET_VAR, (void *)wl->ioctl_buf,
WL_IOCTL_LEN_MAX); WL_IOCTL_LEN_MAX);
if (unlikely(err)) { if (unlikely(err)) {
WL_ERR("error (%d)\n", err); WL_ERR("error (%d)\n", err);
...@@ -2827,7 +2829,7 @@ static s32 wl_update_bss_info(struct wl_priv *wl) ...@@ -2827,7 +2829,7 @@ static s32 wl_update_bss_info(struct wl_priv *wl)
ssid = (struct wlc_ssid *)wl_read_prof(wl, WL_PROF_SSID); ssid = (struct wlc_ssid *)wl_read_prof(wl, WL_PROF_SSID);
*(u32 *)wl->extra_buf = cpu_to_le32(WL_EXTRA_BUF_MAX); *(u32 *)wl->extra_buf = cpu_to_le32(WL_EXTRA_BUF_MAX);
err = wl_dev_ioctl(wl_to_ndev(wl), WLC_GET_BSS_INFO, err = wl_dev_ioctl(wl_to_ndev(wl), BRCMF_C_GET_BSS_INFO,
wl->extra_buf, WL_EXTRA_BUF_MAX); wl->extra_buf, WL_EXTRA_BUF_MAX);
if (unlikely(err)) { if (unlikely(err)) {
WL_ERR("Could not get bss info %d\n", err); WL_ERR("Could not get bss info %d\n", err);
...@@ -2969,7 +2971,7 @@ wl_notify_scan_status(struct wl_priv *wl, struct net_device *ndev, ...@@ -2969,7 +2971,7 @@ wl_notify_scan_status(struct wl_priv *wl, struct net_device *ndev,
goto scan_done_out; goto scan_done_out;
} }
err = wl_dev_ioctl(ndev, WLC_GET_CHANNEL, &channel_inform, err = wl_dev_ioctl(ndev, BRCMF_C_GET_CHANNEL, &channel_inform,
sizeof(channel_inform)); sizeof(channel_inform));
if (unlikely(err)) { if (unlikely(err)) {
WL_ERR("scan busy (%d)\n", err); WL_ERR("scan busy (%d)\n", err);
...@@ -2987,7 +2989,7 @@ wl_notify_scan_status(struct wl_priv *wl, struct net_device *ndev, ...@@ -2987,7 +2989,7 @@ wl_notify_scan_status(struct wl_priv *wl, struct net_device *ndev,
memset(bss_list, 0, len); memset(bss_list, 0, len);
bss_list->buflen = cpu_to_le32(len); bss_list->buflen = cpu_to_le32(len);
err = wl_dev_ioctl(ndev, WLC_SCAN_RESULTS, bss_list, len); err = wl_dev_ioctl(ndev, BRCMF_C_SCAN_RESULTS, bss_list, len);
if (unlikely(err)) { if (unlikely(err)) {
WL_ERR("%s Scan_results error (%d)\n", ndev->name, err); WL_ERR("%s Scan_results error (%d)\n", ndev->name, err);
err = -EINVAL; err = -EINVAL;
...@@ -3646,7 +3648,7 @@ static s32 wl_dongle_mode(struct net_device *ndev, s32 iftype) ...@@ -3646,7 +3648,7 @@ static s32 wl_dongle_mode(struct net_device *ndev, s32 iftype)
return err; return err;
} }
infra = cpu_to_le32(infra); infra = cpu_to_le32(infra);
err = wl_dev_ioctl(ndev, WLC_SET_INFRA, &infra, sizeof(infra)); err = wl_dev_ioctl(ndev, BRCMF_C_SET_INFRA, &infra, sizeof(infra));
if (unlikely(err)) { if (unlikely(err)) {
WL_ERR("WLC_SET_INFRA error (%d)\n", err); WL_ERR("WLC_SET_INFRA error (%d)\n", err);
return err; return err;
...@@ -3668,7 +3670,7 @@ static s32 wl_dongle_up(struct net_device *ndev, u32 up) ...@@ -3668,7 +3670,7 @@ static s32 wl_dongle_up(struct net_device *ndev, u32 up)
{ {
s32 err = 0; s32 err = 0;
err = wl_dev_ioctl(ndev, WLC_UP, &up, sizeof(up)); err = wl_dev_ioctl(ndev, BRCMF_C_UP, &up, sizeof(up));
if (unlikely(err)) { if (unlikely(err)) {
WL_ERR("WLC_UP error (%d)\n", err); WL_ERR("WLC_UP error (%d)\n", err);
} }
...@@ -3679,7 +3681,8 @@ static s32 wl_dongle_power(struct net_device *ndev, u32 power_mode) ...@@ -3679,7 +3681,8 @@ static s32 wl_dongle_power(struct net_device *ndev, u32 power_mode)
{ {
s32 err = 0; s32 err = 0;
err = wl_dev_ioctl(ndev, WLC_SET_PM, &power_mode, sizeof(power_mode)); err = wl_dev_ioctl(ndev, BRCMF_C_SET_PM,
&power_mode, sizeof(power_mode));
if (unlikely(err)) { if (unlikely(err)) {
WL_ERR("WLC_SET_PM error (%d)\n", err); WL_ERR("WLC_SET_PM error (%d)\n", err);
} }
...@@ -3696,14 +3699,14 @@ wl_dongle_glom(struct net_device *ndev, u32 glom, u32 dongle_align) ...@@ -3696,14 +3699,14 @@ wl_dongle_glom(struct net_device *ndev, u32 glom, u32 dongle_align)
/* Match Host and Dongle rx alignment */ /* Match Host and Dongle rx alignment */
brcmu_mkiovar("bus:txglomalign", (char *)&dongle_align, 4, iovbuf, brcmu_mkiovar("bus:txglomalign", (char *)&dongle_align, 4, iovbuf,
sizeof(iovbuf)); sizeof(iovbuf));
err = wl_dev_ioctl(ndev, WLC_SET_VAR, iovbuf, sizeof(iovbuf)); err = wl_dev_ioctl(ndev, BRCMF_C_SET_VAR, iovbuf, sizeof(iovbuf));
if (unlikely(err)) { if (unlikely(err)) {
WL_ERR("txglomalign error (%d)\n", err); WL_ERR("txglomalign error (%d)\n", err);
goto dongle_glom_out; goto dongle_glom_out;
} }
/* disable glom option per default */ /* disable glom option per default */
brcmu_mkiovar("bus:txglom", (char *)&glom, 4, iovbuf, sizeof(iovbuf)); brcmu_mkiovar("bus:txglom", (char *)&glom, 4, iovbuf, sizeof(iovbuf));
err = wl_dev_ioctl(ndev, WLC_SET_VAR, iovbuf, sizeof(iovbuf)); err = wl_dev_ioctl(ndev, BRCMF_C_SET_VAR, iovbuf, sizeof(iovbuf));
if (unlikely(err)) { if (unlikely(err)) {
WL_ERR("txglom error (%d)\n", err); WL_ERR("txglom error (%d)\n", err);
goto dongle_glom_out; goto dongle_glom_out;
...@@ -3721,7 +3724,7 @@ wl_dongle_offload(struct net_device *ndev, s32 arpoe, s32 arp_ol) ...@@ -3721,7 +3724,7 @@ wl_dongle_offload(struct net_device *ndev, s32 arpoe, s32 arp_ol)
/* Set ARP offload */ /* Set ARP offload */
brcmu_mkiovar("arpoe", (char *)&arpoe, 4, iovbuf, sizeof(iovbuf)); brcmu_mkiovar("arpoe", (char *)&arpoe, 4, iovbuf, sizeof(iovbuf));
err = wl_dev_ioctl(ndev, WLC_SET_VAR, iovbuf, sizeof(iovbuf)); err = wl_dev_ioctl(ndev, BRCMF_C_SET_VAR, iovbuf, sizeof(iovbuf));
if (err) { if (err) {
if (err == -EOPNOTSUPP) if (err == -EOPNOTSUPP)
WL_INFO("arpoe is not supported\n"); WL_INFO("arpoe is not supported\n");
...@@ -3731,7 +3734,7 @@ wl_dongle_offload(struct net_device *ndev, s32 arpoe, s32 arp_ol) ...@@ -3731,7 +3734,7 @@ wl_dongle_offload(struct net_device *ndev, s32 arpoe, s32 arp_ol)
goto dongle_offload_out; goto dongle_offload_out;
} }
brcmu_mkiovar("arp_ol", (char *)&arp_ol, 4, iovbuf, sizeof(iovbuf)); brcmu_mkiovar("arp_ol", (char *)&arp_ol, 4, iovbuf, sizeof(iovbuf));
err = wl_dev_ioctl(ndev, WLC_SET_VAR, iovbuf, sizeof(iovbuf)); err = wl_dev_ioctl(ndev, BRCMF_C_SET_VAR, iovbuf, sizeof(iovbuf));
if (err) { if (err) {
if (err == -EOPNOTSUPP) if (err == -EOPNOTSUPP)
WL_INFO("arp_ol is not supported\n"); WL_INFO("arp_ol is not supported\n");
...@@ -3832,7 +3835,7 @@ static s32 wl_dongle_filter(struct net_device *ndev, u32 filter_mode) ...@@ -3832,7 +3835,7 @@ static s32 wl_dongle_filter(struct net_device *ndev, u32 filter_mode)
memcpy((char *)pkt_filterp, &pkt_filter, memcpy((char *)pkt_filterp, &pkt_filter,
WL_PKT_FILTER_FIXED_LEN + WL_PKT_FILTER_PATTERN_FIXED_LEN); WL_PKT_FILTER_FIXED_LEN + WL_PKT_FILTER_PATTERN_FIXED_LEN);
err = wl_dev_ioctl(ndev, WLC_SET_VAR, buf, buf_len); err = wl_dev_ioctl(ndev, BRCMF_C_SET_VAR, buf, buf_len);
if (err) { if (err) {
if (err == -EOPNOTSUPP) { if (err == -EOPNOTSUPP) {
WL_INFO("filter not supported\n"); WL_INFO("filter not supported\n");
...@@ -3845,7 +3848,7 @@ static s32 wl_dongle_filter(struct net_device *ndev, u32 filter_mode) ...@@ -3845,7 +3848,7 @@ static s32 wl_dongle_filter(struct net_device *ndev, u32 filter_mode)
/* set mode to allow pattern */ /* set mode to allow pattern */
brcmu_mkiovar("pkt_filter_mode", (char *)&filter_mode, 4, iovbuf, brcmu_mkiovar("pkt_filter_mode", (char *)&filter_mode, 4, iovbuf,
sizeof(iovbuf)); sizeof(iovbuf));
err = wl_dev_ioctl(ndev, WLC_SET_VAR, iovbuf, sizeof(iovbuf)); err = wl_dev_ioctl(ndev, BRCMF_C_SET_VAR, iovbuf, sizeof(iovbuf));
if (err) { if (err) {
if (err == -EOPNOTSUPP) { if (err == -EOPNOTSUPP) {
WL_INFO("filter_mode not supported\n"); WL_INFO("filter_mode not supported\n");
...@@ -3872,7 +3875,7 @@ static s32 wl_dongle_eventmsg(struct net_device *ndev) ...@@ -3872,7 +3875,7 @@ static s32 wl_dongle_eventmsg(struct net_device *ndev)
/* Setup event_msgs */ /* Setup event_msgs */
brcmu_mkiovar("event_msgs", eventmask, WL_EVENTING_MASK_LEN, iovbuf, brcmu_mkiovar("event_msgs", eventmask, WL_EVENTING_MASK_LEN, iovbuf,
sizeof(iovbuf)); sizeof(iovbuf));
err = wl_dev_ioctl(ndev, WLC_GET_VAR, iovbuf, sizeof(iovbuf)); err = wl_dev_ioctl(ndev, BRCMF_C_GET_VAR, iovbuf, sizeof(iovbuf));
if (unlikely(err)) { if (unlikely(err)) {
WL_ERR("Get event_msgs error (%d)\n", err); WL_ERR("Get event_msgs error (%d)\n", err);
goto dongle_eventmsg_out; goto dongle_eventmsg_out;
...@@ -3901,7 +3904,7 @@ static s32 wl_dongle_eventmsg(struct net_device *ndev) ...@@ -3901,7 +3904,7 @@ static s32 wl_dongle_eventmsg(struct net_device *ndev)
brcmu_mkiovar("event_msgs", eventmask, WL_EVENTING_MASK_LEN, iovbuf, brcmu_mkiovar("event_msgs", eventmask, WL_EVENTING_MASK_LEN, iovbuf,
sizeof(iovbuf)); sizeof(iovbuf));
err = wl_dev_ioctl(ndev, WLC_SET_VAR, iovbuf, sizeof(iovbuf)); err = wl_dev_ioctl(ndev, BRCMF_C_SET_VAR, iovbuf, sizeof(iovbuf));
if (unlikely(err)) { if (unlikely(err)) {
WL_ERR("Set event_msgs error (%d)\n", err); WL_ERR("Set event_msgs error (%d)\n", err);
goto dongle_eventmsg_out; goto dongle_eventmsg_out;
...@@ -3927,7 +3930,8 @@ wl_dongle_roam(struct net_device *ndev, u32 roamvar, u32 bcn_timeout) ...@@ -3927,7 +3930,8 @@ wl_dongle_roam(struct net_device *ndev, u32 roamvar, u32 bcn_timeout)
if (roamvar) { if (roamvar) {
brcmu_mkiovar("bcn_timeout", (char *)&bcn_timeout, brcmu_mkiovar("bcn_timeout", (char *)&bcn_timeout,
sizeof(bcn_timeout), iovbuf, sizeof(iovbuf)); sizeof(bcn_timeout), iovbuf, sizeof(iovbuf));
err = wl_dev_ioctl(ndev, WLC_SET_VAR, iovbuf, sizeof(iovbuf)); err = wl_dev_ioctl(ndev, BRCMF_C_SET_VAR,
iovbuf, sizeof(iovbuf));
if (unlikely(err)) { if (unlikely(err)) {
WL_ERR("bcn_timeout error (%d)\n", err); WL_ERR("bcn_timeout error (%d)\n", err);
goto dongle_rom_out; goto dongle_rom_out;
...@@ -3941,7 +3945,7 @@ wl_dongle_roam(struct net_device *ndev, u32 roamvar, u32 bcn_timeout) ...@@ -3941,7 +3945,7 @@ wl_dongle_roam(struct net_device *ndev, u32 roamvar, u32 bcn_timeout)
WL_INFO("Internal Roaming = %s\n", roamvar ? "Off" : "On"); WL_INFO("Internal Roaming = %s\n", roamvar ? "Off" : "On");
brcmu_mkiovar("roam_off", (char *)&roamvar, brcmu_mkiovar("roam_off", (char *)&roamvar,
sizeof(roamvar), iovbuf, sizeof(iovbuf)); sizeof(roamvar), iovbuf, sizeof(iovbuf));
err = wl_dev_ioctl(ndev, WLC_SET_VAR, iovbuf, sizeof(iovbuf)); err = wl_dev_ioctl(ndev, BRCMF_C_SET_VAR, iovbuf, sizeof(iovbuf));
if (unlikely(err)) { if (unlikely(err)) {
WL_ERR("roam_off error (%d)\n", err); WL_ERR("roam_off error (%d)\n", err);
goto dongle_rom_out; goto dongle_rom_out;
...@@ -3949,7 +3953,7 @@ wl_dongle_roam(struct net_device *ndev, u32 roamvar, u32 bcn_timeout) ...@@ -3949,7 +3953,7 @@ wl_dongle_roam(struct net_device *ndev, u32 roamvar, u32 bcn_timeout)
roamtrigger[0] = WL_ROAM_TRIGGER_LEVEL; roamtrigger[0] = WL_ROAM_TRIGGER_LEVEL;
roamtrigger[1] = WLC_BAND_ALL; roamtrigger[1] = WLC_BAND_ALL;
err = wl_dev_ioctl(ndev, WLC_SET_ROAM_TRIGGER, err = wl_dev_ioctl(ndev, BRCMF_C_SET_ROAM_TRIGGER,
(void *)roamtrigger, sizeof(roamtrigger)); (void *)roamtrigger, sizeof(roamtrigger));
if (unlikely(err)) { if (unlikely(err)) {
WL_ERR("WLC_SET_ROAM_TRIGGER error (%d)\n", err); WL_ERR("WLC_SET_ROAM_TRIGGER error (%d)\n", err);
...@@ -3958,7 +3962,7 @@ wl_dongle_roam(struct net_device *ndev, u32 roamvar, u32 bcn_timeout) ...@@ -3958,7 +3962,7 @@ wl_dongle_roam(struct net_device *ndev, u32 roamvar, u32 bcn_timeout)
roam_delta[0] = WL_ROAM_DELTA; roam_delta[0] = WL_ROAM_DELTA;
roam_delta[1] = WLC_BAND_ALL; roam_delta[1] = WLC_BAND_ALL;
err = wl_dev_ioctl(ndev, WLC_SET_ROAM_DELTA, err = wl_dev_ioctl(ndev, BRCMF_C_SET_ROAM_DELTA,
(void *)roam_delta, sizeof(roam_delta)); (void *)roam_delta, sizeof(roam_delta));
if (unlikely(err)) { if (unlikely(err)) {
WL_ERR("WLC_SET_ROAM_DELTA error (%d)\n", err); WL_ERR("WLC_SET_ROAM_DELTA error (%d)\n", err);
...@@ -3975,8 +3979,8 @@ wl_dongle_scantime(struct net_device *ndev, s32 scan_assoc_time, ...@@ -3975,8 +3979,8 @@ wl_dongle_scantime(struct net_device *ndev, s32 scan_assoc_time,
{ {
s32 err = 0; s32 err = 0;
err = wl_dev_ioctl(ndev, WLC_SET_SCAN_CHANNEL_TIME, &scan_assoc_time, err = wl_dev_ioctl(ndev, BRCMF_C_SET_SCAN_CHANNEL_TIME,
sizeof(scan_assoc_time)); &scan_assoc_time, sizeof(scan_assoc_time));
if (err) { if (err) {
if (err == -EOPNOTSUPP) if (err == -EOPNOTSUPP)
WL_INFO("Scan assoc time is not supported\n"); WL_INFO("Scan assoc time is not supported\n");
...@@ -3984,8 +3988,8 @@ wl_dongle_scantime(struct net_device *ndev, s32 scan_assoc_time, ...@@ -3984,8 +3988,8 @@ wl_dongle_scantime(struct net_device *ndev, s32 scan_assoc_time,
WL_ERR("Scan assoc time error (%d)\n", err); WL_ERR("Scan assoc time error (%d)\n", err);
goto dongle_scantime_out; goto dongle_scantime_out;
} }
err = wl_dev_ioctl(ndev, WLC_SET_SCAN_UNASSOC_TIME, &scan_unassoc_time, err = wl_dev_ioctl(ndev, BRCMF_C_SET_SCAN_UNASSOC_TIME,
sizeof(scan_unassoc_time)); &scan_unassoc_time, sizeof(scan_unassoc_time));
if (err) { if (err) {
if (err == -EOPNOTSUPP) if (err == -EOPNOTSUPP)
WL_INFO("Scan unassoc time is not supported\n"); WL_INFO("Scan unassoc time is not supported\n");
...@@ -3994,8 +3998,8 @@ wl_dongle_scantime(struct net_device *ndev, s32 scan_assoc_time, ...@@ -3994,8 +3998,8 @@ wl_dongle_scantime(struct net_device *ndev, s32 scan_assoc_time,
goto dongle_scantime_out; goto dongle_scantime_out;
} }
err = wl_dev_ioctl(ndev, WLC_SET_SCAN_PASSIVE_TIME, &scan_passive_time, err = wl_dev_ioctl(ndev, BRCMF_C_SET_SCAN_PASSIVE_TIME,
sizeof(scan_passive_time)); &scan_passive_time, sizeof(scan_passive_time));
if (err) { if (err) {
if (err == -EOPNOTSUPP) if (err == -EOPNOTSUPP)
WL_INFO("Scan passive time is not supported\n"); WL_INFO("Scan passive time is not supported\n");
...@@ -4266,7 +4270,7 @@ static void wl_link_down(struct wl_priv *wl) ...@@ -4266,7 +4270,7 @@ static void wl_link_down(struct wl_priv *wl)
if (wl->link_up) { if (wl->link_up) {
dev = wl_to_ndev(wl); dev = wl_to_ndev(wl);
WL_INFO("Call WLC_DISASSOC to stop excess roaming\n "); WL_INFO("Call WLC_DISASSOC to stop excess roaming\n ");
err = wl_dev_ioctl(dev, WLC_DISASSOC, NULL, 0); err = wl_dev_ioctl(dev, BRCMF_C_DISASSOC, NULL, 0);
if (unlikely(err)) if (unlikely(err))
WL_ERR("WLC_DISASSOC failed (%d)\n", err); WL_ERR("WLC_DISASSOC failed (%d)\n", err);
wl->link_up = false; wl->link_up = false;
......
...@@ -108,7 +108,7 @@ do { \ ...@@ -108,7 +108,7 @@ do { \
#define WL_IOCTL_LEN_MAX 1024 #define WL_IOCTL_LEN_MAX 1024
#define WL_EXTRA_BUF_MAX 2048 #define WL_EXTRA_BUF_MAX 2048
#define WL_ISCAN_BUF_MAX 2048 /* #define WL_ISCAN_BUF_MAX 2048 /*
* the buf lengh can be WLC_IOCTL_MAXLEN (8K) * the buf length can be BRCMF_C_IOCTL_MAXLEN
* to reduce iteration * to reduce iteration
*/ */
#define WL_ISCAN_TIMER_INTERVAL_MS 3000 #define WL_ISCAN_TIMER_INTERVAL_MS 3000
...@@ -276,7 +276,7 @@ struct wl_iscan_ctrl { ...@@ -276,7 +276,7 @@ struct wl_iscan_ctrl {
struct semaphore sync; struct semaphore sync;
struct wl_iscan_eloop el; struct wl_iscan_eloop el;
void *data; void *data;
s8 ioctl_buf[WLC_IOCTL_SMLEN]; s8 ioctl_buf[BRCMF_C_IOCTL_SMLEN];
s8 scan_buf[WL_ISCAN_BUF_MAX]; s8 scan_buf[WL_ISCAN_BUF_MAX];
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment