Commit e020a83d authored by Hante Meuleman's avatar Hante Meuleman Committed by John W. Linville

brcmfmac: Fix big endian host configuration data.

Fixes big endian host configuration parameters.

Cc: stable <stable@vger.kernel.org>
Reviewed-by: default avatarArend Van Spriel <arend@broadcom.com>
Signed-off-by: default avatarHante Meuleman <meuleman@broadcom.com>
Signed-off-by: default avatarArend van Spriel <arend@broadcom.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent ed205b36
...@@ -764,8 +764,11 @@ static void brcmf_c_arp_offload_set(struct brcmf_pub *drvr, int arp_mode) ...@@ -764,8 +764,11 @@ static void brcmf_c_arp_offload_set(struct brcmf_pub *drvr, int arp_mode)
{ {
char iovbuf[32]; char iovbuf[32];
int retcode; int retcode;
__le32 arp_mode_le;
brcmf_c_mkiovar("arp_ol", (char *)&arp_mode, 4, iovbuf, sizeof(iovbuf)); arp_mode_le = cpu_to_le32(arp_mode);
brcmf_c_mkiovar("arp_ol", (char *)&arp_mode_le, 4, iovbuf,
sizeof(iovbuf));
retcode = brcmf_proto_cdc_set_dcmd(drvr, 0, BRCMF_C_SET_VAR, retcode = brcmf_proto_cdc_set_dcmd(drvr, 0, BRCMF_C_SET_VAR,
iovbuf, sizeof(iovbuf)); iovbuf, sizeof(iovbuf));
retcode = retcode >= 0 ? 0 : retcode; retcode = retcode >= 0 ? 0 : retcode;
...@@ -781,8 +784,11 @@ static void brcmf_c_arp_offload_enable(struct brcmf_pub *drvr, int arp_enable) ...@@ -781,8 +784,11 @@ static void brcmf_c_arp_offload_enable(struct brcmf_pub *drvr, int arp_enable)
{ {
char iovbuf[32]; char iovbuf[32];
int retcode; int retcode;
__le32 arp_enable_le;
brcmf_c_mkiovar("arpoe", (char *)&arp_enable, 4, arp_enable_le = cpu_to_le32(arp_enable);
brcmf_c_mkiovar("arpoe", (char *)&arp_enable_le, 4,
iovbuf, sizeof(iovbuf)); iovbuf, sizeof(iovbuf));
retcode = brcmf_proto_cdc_set_dcmd(drvr, 0, BRCMF_C_SET_VAR, retcode = brcmf_proto_cdc_set_dcmd(drvr, 0, BRCMF_C_SET_VAR,
iovbuf, sizeof(iovbuf)); iovbuf, sizeof(iovbuf));
...@@ -800,10 +806,10 @@ int brcmf_c_preinit_dcmds(struct brcmf_pub *drvr) ...@@ -800,10 +806,10 @@ int brcmf_c_preinit_dcmds(struct brcmf_pub *drvr)
char iovbuf[BRCMF_EVENTING_MASK_LEN + 12]; /* Room for char iovbuf[BRCMF_EVENTING_MASK_LEN + 12]; /* Room for
"event_msgs" + '\0' + bitvec */ "event_msgs" + '\0' + bitvec */
char buf[128], *ptr; char buf[128], *ptr;
u32 roaming = 1; __le32 roaming_le = cpu_to_le32(1);
uint bcn_timeout = 3; __le32 bcn_timeout_le = cpu_to_le32(3);
int scan_assoc_time = 40; __le32 scan_assoc_time_le = cpu_to_le32(40);
int scan_unassoc_time = 40; __le32 scan_unassoc_time_le = cpu_to_le32(40);
int i; int i;
struct brcmf_bus_dcmd *cmdlst; struct brcmf_bus_dcmd *cmdlst;
struct list_head *cur, *q; struct list_head *cur, *q;
...@@ -829,14 +835,14 @@ int brcmf_c_preinit_dcmds(struct brcmf_pub *drvr) ...@@ -829,14 +835,14 @@ int brcmf_c_preinit_dcmds(struct brcmf_pub *drvr)
/* 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 */
brcmf_c_mkiovar("bcn_timeout", (char *)&bcn_timeout, 4, iovbuf, brcmf_c_mkiovar("bcn_timeout", (char *)&bcn_timeout_le, 4, iovbuf,
sizeof(iovbuf)); sizeof(iovbuf));
brcmf_proto_cdc_set_dcmd(drvr, 0, BRCMF_C_SET_VAR, iovbuf, brcmf_proto_cdc_set_dcmd(drvr, 0, BRCMF_C_SET_VAR, iovbuf,
sizeof(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 */
brcmf_c_mkiovar("roam_off", (char *)&roaming, 4, brcmf_c_mkiovar("roam_off", (char *)&roaming_le, 4,
iovbuf, sizeof(iovbuf)); iovbuf, sizeof(iovbuf));
brcmf_proto_cdc_set_dcmd(drvr, 0, BRCMF_C_SET_VAR, iovbuf, brcmf_proto_cdc_set_dcmd(drvr, 0, BRCMF_C_SET_VAR, iovbuf,
sizeof(iovbuf)); sizeof(iovbuf));
...@@ -848,9 +854,9 @@ int brcmf_c_preinit_dcmds(struct brcmf_pub *drvr) ...@@ -848,9 +854,9 @@ int brcmf_c_preinit_dcmds(struct brcmf_pub *drvr)
sizeof(iovbuf)); sizeof(iovbuf));
brcmf_proto_cdc_set_dcmd(drvr, 0, BRCMF_C_SET_SCAN_CHANNEL_TIME, brcmf_proto_cdc_set_dcmd(drvr, 0, BRCMF_C_SET_SCAN_CHANNEL_TIME,
(char *)&scan_assoc_time, sizeof(scan_assoc_time)); (char *)&scan_assoc_time_le, sizeof(scan_assoc_time_le));
brcmf_proto_cdc_set_dcmd(drvr, 0, BRCMF_C_SET_SCAN_UNASSOC_TIME, brcmf_proto_cdc_set_dcmd(drvr, 0, BRCMF_C_SET_SCAN_UNASSOC_TIME,
(char *)&scan_unassoc_time, sizeof(scan_unassoc_time)); (char *)&scan_unassoc_time_le, sizeof(scan_unassoc_time_le));
/* Set and enable ARP offload feature */ /* Set and enable ARP offload feature */
brcmf_c_arp_offload_set(drvr, BRCMF_ARPOL_MODE); brcmf_c_arp_offload_set(drvr, BRCMF_ARPOL_MODE);
......
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