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;
struct dhd_prot;
struct dhd_info;
#define WLC_UP 2
#define WLC_SET_PROMISC 10
#define WLC_GET_RATE 12
#define WLC_GET_INFRA 19
#define WLC_SET_INFRA 20
#define WLC_GET_AUTH 21
#define WLC_SET_AUTH 22
#define WLC_GET_BSSID 23
#define WLC_GET_SSID 25
#define WLC_SET_SSID 26
#define WLC_GET_CHANNEL 29
#define WLC_GET_SRL 31
#define WLC_GET_LRL 33
#define WLC_GET_RADIO 37
#define WLC_SET_RADIO 38
#define WLC_GET_PHYTYPE 39
#define WLC_SET_KEY 45
#define WLC_SET_PASSIVE_SCAN 49
#define WLC_SCAN 50
#define WLC_SCAN_RESULTS 51
#define WLC_DISASSOC 52
#define WLC_REASSOC 53
#define WLC_SET_ROAM_TRIGGER 55
#define WLC_SET_ROAM_DELTA 57
#define WLC_GET_DTIMPRD 77
#define WLC_SET_COUNTRY 84
#define WLC_GET_PM 85
#define WLC_SET_PM 86
#define WLC_GET_AP 117
#define WLC_SET_AP 118
#define WLC_GET_RSSI 127
#define WLC_GET_WSEC 133
#define WLC_SET_WSEC 134
#define WLC_GET_PHY_NOISE 135
#define WLC_GET_BSS_INFO 136
#define WLC_SET_SCAN_CHANNEL_TIME 185
#define WLC_SET_SCAN_UNASSOC_TIME 187
#define WLC_SCB_DEAUTHENTICATE_FOR_REASON 201
#define WLC_GET_VALID_CHANNELS 217
#define WLC_GET_KEY_PRIMARY 235
#define WLC_SET_KEY_PRIMARY 236
#define WLC_SET_SCAN_PASSIVE_TIME 258
#define WLC_GET_VAR 262 /* get value of named variable */
#define WLC_SET_VAR 263 /* set named variable to value */
#define BRCMF_C_IOCTL_SMLEN 256 /* "small" ioctl buffer required */
#define BRCMF_C_IOCTL_MEDLEN 1536 /* "med" ioctl buffer required */
#define BRCMF_C_IOCTL_MAXLEN 8192
#define BRCMF_C_UP 2
#define BRCMF_C_SET_PROMISC 10
#define BRCMF_C_GET_RATE 12
#define BRCMF_C_GET_INFRA 19
#define BRCMF_C_SET_INFRA 20
#define BRCMF_C_GET_AUTH 21
#define BRCMF_C_SET_AUTH 22
#define BRCMF_C_GET_BSSID 23
#define BRCMF_C_GET_SSID 25
#define BRCMF_C_SET_SSID 26
#define BRCMF_C_GET_CHANNEL 29
#define BRCMF_C_GET_SRL 31
#define BRCMF_C_GET_LRL 33
#define BRCMF_C_GET_RADIO 37
#define BRCMF_C_SET_RADIO 38
#define BRCMF_C_GET_PHYTYPE 39
#define BRCMF_C_SET_KEY 45
#define BRCMF_C_SET_PASSIVE_SCAN 49
#define BRCMF_C_SCAN 50
#define BRCMF_C_SCAN_RESULTS 51
#define BRCMF_C_DISASSOC 52
#define BRCMF_C_REASSOC 53
#define BRCMF_C_SET_ROAM_TRIGGER 55
#define BRCMF_C_SET_ROAM_DELTA 57
#define BRCMF_C_GET_DTIMPRD 77
#define BRCMF_C_SET_COUNTRY 84
#define BRCMF_C_GET_PM 85
#define BRCMF_C_SET_PM 86
#define BRCMF_C_GET_AP 117
#define BRCMF_C_SET_AP 118
#define BRCMF_C_GET_RSSI 127
#define BRCMF_C_GET_WSEC 133
#define BRCMF_C_SET_WSEC 134
#define BRCMF_C_GET_PHY_NOISE 135
#define BRCMF_C_GET_BSS_INFO 136
#define BRCMF_C_SET_SCAN_CHANNEL_TIME 185
#define BRCMF_C_SET_SCAN_UNASSOC_TIME 187
#define BRCMF_C_SCB_DEAUTHENTICATE_FOR_REASON 201
#define BRCMF_C_GET_VALID_CHANNELS 217
#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) */
#define WLC_PHY_TYPE_A 0
......@@ -154,10 +158,6 @@ struct dhd_info;
#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 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) */
/* optionally set by a module_param_string() */
......
......@@ -109,7 +109,7 @@ typedef struct dhd_prot {
u32 lastcmd;
u8 bus_header[BUS_HEADER_LEN];
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;
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)
DHD_CTL(("%s: cmd %d len %d\n", __func__, cmd, len));
/* 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")) {
strncpy((char *)buf, "bcm_error",
BCME_STRLEN);
......@@ -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__));
ASSERT(len <= WLC_IOCTL_MAXLEN);
ASSERT(len <= BRCMF_C_IOCTL_MAXLEN);
if (len > WLC_IOCTL_MAXLEN)
if (len > BRCMF_C_IOCTL_MAXLEN)
goto done;
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)
"lastcmd=0x%x (%lu)\n",
ioc->cmd, (unsigned long)ioc->cmd, 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));
goto done;
......@@ -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 */
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;
slen = strlen("wme_dp") + 1;
......@@ -464,8 +466,8 @@ int dhd_prot_attach(dhd_pub_t *dhd)
#ifdef BDC
dhd->hdrlen += BDC_HEADER_LEN;
#endif
dhd->maxctl =
WLC_IOCTL_MAXLEN + sizeof(struct cdc_ioctl) + ROUND_UP_MARGIN;
dhd->maxctl = BRCMF_C_IOCTL_MAXLEN +
sizeof(struct cdc_ioctl) + ROUND_UP_MARGIN;
return 0;
fail:
......@@ -503,7 +505,7 @@ int dhd_prot_init(dhd_pub_t *dhd)
/* Get the device MAC address */
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) {
dhd_os_proto_unblock(dhd);
return ret;
......
......@@ -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));
/* 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;
if (rc)
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,
/* Contorl the master mode */
brcmu_mkiovar("pkt_filter_mode", (char *)&master_mode, 4, 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;
if (rc)
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)
&pkt_filter,
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;
if (rc)
......@@ -1162,8 +1162,8 @@ void brcmf_c_arp_offload_set(dhd_pub_t *dhd, int arp_mode)
int retcode;
brcmu_mkiovar("arp_ol", (char *)&arp_mode, 4, iovbuf, sizeof(iovbuf));
retcode = dhdcdc_set_ioctl(dhd, 0, WLC_SET_VAR, iovbuf,
sizeof(iovbuf));
retcode = dhdcdc_set_ioctl(dhd, 0, BRCMF_C_SET_VAR,
iovbuf, sizeof(iovbuf));
retcode = retcode >= 0 ? 0 : retcode;
if (retcode)
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)
int retcode;
brcmu_mkiovar("arpoe", (char *)&arp_enable, 4, iovbuf, sizeof(iovbuf));
retcode = dhdcdc_set_ioctl(dhd, 0, WLC_SET_VAR, iovbuf,
sizeof(iovbuf));
retcode = dhdcdc_set_ioctl(dhd, 0, BRCMF_C_SET_VAR,
iovbuf, sizeof(iovbuf));
retcode = retcode >= 0 ? 0 : retcode;
if (retcode)
DHD_TRACE(("%s: failed to enabe ARP offload to %d, "
......@@ -1220,8 +1220,8 @@ int brcmf_c_preinit_ioctls(dhd_pub_t *dhd)
if (!ret) {
brcmu_mkiovar("cur_etheraddr", (void *)ea_addr, ETH_ALEN,
buf, sizeof(buf));
ret = dhdcdc_set_ioctl(dhd, 0, WLC_SET_VAR, buf,
sizeof(buf));
ret = dhdcdc_set_ioctl(dhd, 0, BRCMF_C_SET_VAR,
buf, sizeof(buf));
if (ret < 0) {
DHD_ERROR(("%s: can't set MAC address , error=%d\n",
__func__, ret));
......@@ -1233,7 +1233,7 @@ int brcmf_c_preinit_ioctls(dhd_pub_t *dhd)
/* Set Country code */
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,
sizeof(dhd->country_code)) < 0) {
DHD_ERROR(("%s: country code setting failed\n",
......@@ -1245,47 +1245,47 @@ int brcmf_c_preinit_ioctls(dhd_pub_t *dhd)
memset(buf, 0, sizeof(buf));
ptr = 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");
/* Print fw version info */
DHD_ERROR(("Firmware version = %s\n", buf));
/* 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));
/* Match Host and Dongle rx alignment */
brcmu_mkiovar("bus:txglomalign", (char *)&dongle_align, 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));
/* disable glom option per default */
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
link down */
brcmu_mkiovar("bcn_timeout", (char *)&bcn_timeout, 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));
/* Enable/Disable build-in roaming to allowed ext supplicant to take
of romaing */
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 */
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 */
brcmu_mkiovar("event_msgs", dhd->eventmask, WL_EVENTING_MASK_LEN,
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));
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));
#ifdef ARP_OFFLOAD_SUPPORT
......@@ -1626,7 +1626,7 @@ int dhd_iscan_request(void *dhdp, u16 action)
int rc;
wl_iscan_params_t params;
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));
memcpy(&params.params.bssid, &ether_bcast, ETH_ALEN);
......@@ -1645,8 +1645,8 @@ int dhd_iscan_request(void *dhdp, u16 action)
params.scan_duration = 0;
brcmu_mkiovar("iscan", (char *)&params, sizeof(wl_iscan_params_t), buf,
WLC_IOCTL_SMLEN);
rc = dhd_wl_ioctl(dhdp, WLC_SET_VAR, buf, WLC_IOCTL_SMLEN);
BRCMF_C_IOCTL_SMLEN);
rc = dhd_wl_ioctl(dhdp, BRCMF_C_SET_VAR, buf, BRCMF_C_IOCTL_SMLEN);
return rc;
}
......@@ -1683,7 +1683,7 @@ static int dhd_iscan_get_partial_result(void *dhdp, uint *scan_count)
brcmu_mkiovar("iscanresults", (char *)&list,
WL_ISCAN_RESULTS_FIXED_SIZE,
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);
results->buflen = results->buflen;
......@@ -1714,13 +1714,13 @@ int dhd_pno_clean(dhd_pub_t *dhd)
/* Disable pfn */
iov_len = brcmu_mkiovar("pfn", (char *)&pfn_enabled, 4, 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) {
/* clear pfn */
iov_len = brcmu_mkiovar("pfnclear", 0, 0, iovbuf,
sizeof(iovbuf));
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);
if (ret < 0) {
DHD_ERROR(("%s failed code %d\n", __func__,
......@@ -1750,7 +1750,7 @@ int dhd_pno_enable(dhd_pub_t *dhd, int pfn_enabled)
ret = brcmu_mkiovar("pfn", (char *)&pfn_enabled, 4, iovbuf,
sizeof(iovbuf));
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));
if (ret < 0) {
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
brcmu_mkiovar("pfn_set", (char *)&pfn_param, sizeof(pfn_param), 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 */
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
err = brcmu_mkiovar("pfn_add", (char *)&pfn_element,
sizeof(pfn_element), iovbuf, sizeof(iovbuf));
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));
if (err < 0) {
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)
DHD_TRACE(("%s: force extra Suspend setting\n",
__func__));
dhdcdc_set_ioctl(dhd, 0, WLC_SET_PM,
dhdcdc_set_ioctl(dhd, 0, BRCMF_C_SET_PM,
(char *)&power_mode,
sizeof(power_mode));
......@@ -437,7 +437,7 @@ static int dhd_set_suspend(int value, dhd_pub_t *dhd)
bcn_li_dtim = dhd->dtim_skip;
brcmu_mkiovar("bcn_li_dtim", (char *)&bcn_li_dtim,
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));
#ifdef CUSTOMER_HW2
/* Disable build-in roaming to allowed \
......@@ -445,7 +445,7 @@ static int dhd_set_suspend(int value, dhd_pub_t *dhd)
*/
brcmu_mkiovar("roam_off", (char *)&roamvar, 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));
#endif /* CUSTOMER_HW2 */
} else {
......@@ -455,7 +455,7 @@ static int dhd_set_suspend(int value, dhd_pub_t *dhd)
__func__));
power_mode = PM_FAST;
dhdcdc_set_ioctl(dhd, 0, WLC_SET_PM,
dhdcdc_set_ioctl(dhd, 0, BRCMF_C_SET_PM,
(char *)&power_mode,
sizeof(power_mode));
......@@ -466,13 +466,13 @@ static int dhd_set_suspend(int value, dhd_pub_t *dhd)
brcmu_mkiovar("bcn_li_dtim", (char *)&dhd->dtim_skip,
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));
#ifdef CUSTOMER_HW2
roamvar = 0;
brcmu_mkiovar("roam_off", (char *)&roamvar, 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));
#endif /* CUSTOMER_HW2 */
}
......@@ -672,7 +672,7 @@ static void _dhd_set_multicast_list(dhd_info_t *dhd, int ifidx)
}
memset(&ioc, 0, sizeof(ioc));
ioc.cmd = WLC_SET_VAR;
ioc.cmd = BRCMF_C_SET_VAR;
ioc.buf = buf;
ioc.len = buflen;
ioc.set = true;
......@@ -710,7 +710,7 @@ static void _dhd_set_multicast_list(dhd_info_t *dhd, int ifidx)
}
memset(&ioc, 0, sizeof(ioc));
ioc.cmd = WLC_SET_VAR;
ioc.cmd = BRCMF_C_SET_VAR;
ioc.buf = buf;
ioc.len = buflen;
ioc.set = true;
......@@ -731,7 +731,7 @@ static void _dhd_set_multicast_list(dhd_info_t *dhd, int ifidx)
allmulti = cpu_to_le32(allmulti);
memset(&ioc, 0, sizeof(ioc));
ioc.cmd = WLC_SET_PROMISC;
ioc.cmd = BRCMF_C_SET_PROMISC;
ioc.buf = &allmulti;
ioc.len = sizeof(allmulti);
ioc.set = true;
......@@ -759,7 +759,7 @@ _dhd_set_mac_address(dhd_info_t *dhd, int ifidx, u8 *addr)
return -1;
}
memset(&ioc, 0, sizeof(ioc));
ioc.cmd = WLC_SET_VAR;
ioc.cmd = BRCMF_C_SET_VAR;
ioc.buf = buf;
ioc.len = 32;
ioc.set = true;
......@@ -1368,7 +1368,7 @@ static int dhd_toe_get(dhd_info_t *dhd, int ifidx, u32 *toe_ol)
memset(&ioc, 0, sizeof(ioc));
ioc.cmd = WLC_GET_VAR;
ioc.cmd = BRCMF_C_GET_VAR;
ioc.buf = buf;
ioc.len = (uint) sizeof(buf);
ioc.set = false;
......@@ -1402,7 +1402,7 @@ static int dhd_toe_set(dhd_info_t *dhd, int ifidx, u32 toe_ol)
memset(&ioc, 0, sizeof(ioc));
ioc.cmd = WLC_SET_VAR;
ioc.cmd = BRCMF_C_SET_VAR;
ioc.buf = buf;
ioc.len = (uint) sizeof(buf);
ioc.set = true;
......@@ -1652,13 +1652,14 @@ static int dhd_ioctl_entry(struct net_device *net, struct ifreq *ifr, int cmd)
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) ||
((ioc.cmd == WLC_SET_VAR) &&
is_set_key_cmd = ((ioc.cmd == BRCMF_C_SET_KEY) ||
((ioc.cmd == BRCMF_C_SET_VAR) &&
!(strncmp("wsec_key", ioc.buf, 9))) ||
((ioc.cmd == WLC_SET_VAR) &&
((ioc.cmd == BRCMF_C_SET_VAR) &&
!(strncmp("bsscfg:wsec_key", ioc.buf, 15))));
if (is_set_key_cmd)
dhd_wait_pend8021x(net);
......@@ -2023,7 +2024,7 @@ int dhd_bus_start(dhd_pub_t *dhdp)
#ifdef EMBEDDED_PLATFORM
brcmu_mkiovar("event_msgs", dhdp->eventmask, WL_EVENTING_MASK_LEN,
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);
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,
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.len = len;
ioc.set = set;
......
......@@ -108,7 +108,7 @@ do { \
#define WL_IOCTL_LEN_MAX 1024
#define WL_EXTRA_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
*/
#define WL_ISCAN_TIMER_INTERVAL_MS 3000
......@@ -276,7 +276,7 @@ struct wl_iscan_ctrl {
struct semaphore sync;
struct wl_iscan_eloop el;
void *data;
s8 ioctl_buf[WLC_IOCTL_SMLEN];
s8 ioctl_buf[BRCMF_C_IOCTL_SMLEN];
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