diff options
Diffstat (limited to 'drivers/net/wireless/brcm80211/brcmfmac/dhd_common.c')
-rw-r--r-- | drivers/net/wireless/brcm80211/brcmfmac/dhd_common.c | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/dhd_common.c b/drivers/net/wireless/brcm80211/brcmfmac/dhd_common.c index 2621dd3d7dcd..6f70953f0bad 100644 --- a/drivers/net/wireless/brcm80211/brcmfmac/dhd_common.c +++ b/drivers/net/wireless/brcm80211/brcmfmac/dhd_common.c | |||
@@ -764,8 +764,11 @@ static void brcmf_c_arp_offload_set(struct brcmf_pub *drvr, int arp_mode) | |||
764 | { | 764 | { |
765 | char iovbuf[32]; | 765 | char iovbuf[32]; |
766 | int retcode; | 766 | int retcode; |
767 | __le32 arp_mode_le; | ||
767 | 768 | ||
768 | brcmf_c_mkiovar("arp_ol", (char *)&arp_mode, 4, iovbuf, sizeof(iovbuf)); | 769 | arp_mode_le = cpu_to_le32(arp_mode); |
770 | brcmf_c_mkiovar("arp_ol", (char *)&arp_mode_le, 4, iovbuf, | ||
771 | sizeof(iovbuf)); | ||
769 | retcode = brcmf_proto_cdc_set_dcmd(drvr, 0, BRCMF_C_SET_VAR, | 772 | retcode = brcmf_proto_cdc_set_dcmd(drvr, 0, BRCMF_C_SET_VAR, |
770 | iovbuf, sizeof(iovbuf)); | 773 | iovbuf, sizeof(iovbuf)); |
771 | retcode = retcode >= 0 ? 0 : retcode; | 774 | retcode = retcode >= 0 ? 0 : retcode; |
@@ -781,8 +784,11 @@ static void brcmf_c_arp_offload_enable(struct brcmf_pub *drvr, int arp_enable) | |||
781 | { | 784 | { |
782 | char iovbuf[32]; | 785 | char iovbuf[32]; |
783 | int retcode; | 786 | int retcode; |
787 | __le32 arp_enable_le; | ||
784 | 788 | ||
785 | brcmf_c_mkiovar("arpoe", (char *)&arp_enable, 4, | 789 | arp_enable_le = cpu_to_le32(arp_enable); |
790 | |||
791 | brcmf_c_mkiovar("arpoe", (char *)&arp_enable_le, 4, | ||
786 | iovbuf, sizeof(iovbuf)); | 792 | iovbuf, sizeof(iovbuf)); |
787 | retcode = brcmf_proto_cdc_set_dcmd(drvr, 0, BRCMF_C_SET_VAR, | 793 | retcode = brcmf_proto_cdc_set_dcmd(drvr, 0, BRCMF_C_SET_VAR, |
788 | iovbuf, sizeof(iovbuf)); | 794 | iovbuf, sizeof(iovbuf)); |
@@ -800,10 +806,10 @@ int brcmf_c_preinit_dcmds(struct brcmf_pub *drvr) | |||
800 | char iovbuf[BRCMF_EVENTING_MASK_LEN + 12]; /* Room for | 806 | char iovbuf[BRCMF_EVENTING_MASK_LEN + 12]; /* Room for |
801 | "event_msgs" + '\0' + bitvec */ | 807 | "event_msgs" + '\0' + bitvec */ |
802 | char buf[128], *ptr; | 808 | char buf[128], *ptr; |
803 | u32 roaming = 1; | 809 | __le32 roaming_le = cpu_to_le32(1); |
804 | uint bcn_timeout = 3; | 810 | __le32 bcn_timeout_le = cpu_to_le32(3); |
805 | int scan_assoc_time = 40; | 811 | __le32 scan_assoc_time_le = cpu_to_le32(40); |
806 | int scan_unassoc_time = 40; | 812 | __le32 scan_unassoc_time_le = cpu_to_le32(40); |
807 | int i; | 813 | int i; |
808 | struct brcmf_bus_dcmd *cmdlst; | 814 | struct brcmf_bus_dcmd *cmdlst; |
809 | struct list_head *cur, *q; | 815 | struct list_head *cur, *q; |
@@ -829,14 +835,14 @@ int brcmf_c_preinit_dcmds(struct brcmf_pub *drvr) | |||
829 | 835 | ||
830 | /* Setup timeout if Beacons are lost and roam is off to report | 836 | /* Setup timeout if Beacons are lost and roam is off to report |
831 | link down */ | 837 | link down */ |
832 | brcmf_c_mkiovar("bcn_timeout", (char *)&bcn_timeout, 4, iovbuf, | 838 | brcmf_c_mkiovar("bcn_timeout", (char *)&bcn_timeout_le, 4, iovbuf, |
833 | sizeof(iovbuf)); | 839 | sizeof(iovbuf)); |
834 | brcmf_proto_cdc_set_dcmd(drvr, 0, BRCMF_C_SET_VAR, iovbuf, | 840 | brcmf_proto_cdc_set_dcmd(drvr, 0, BRCMF_C_SET_VAR, iovbuf, |
835 | sizeof(iovbuf)); | 841 | sizeof(iovbuf)); |
836 | 842 | ||
837 | /* Enable/Disable build-in roaming to allowed ext supplicant to take | 843 | /* Enable/Disable build-in roaming to allowed ext supplicant to take |
838 | of romaing */ | 844 | of romaing */ |
839 | brcmf_c_mkiovar("roam_off", (char *)&roaming, 4, | 845 | brcmf_c_mkiovar("roam_off", (char *)&roaming_le, 4, |
840 | iovbuf, sizeof(iovbuf)); | 846 | iovbuf, sizeof(iovbuf)); |
841 | brcmf_proto_cdc_set_dcmd(drvr, 0, BRCMF_C_SET_VAR, iovbuf, | 847 | brcmf_proto_cdc_set_dcmd(drvr, 0, BRCMF_C_SET_VAR, iovbuf, |
842 | sizeof(iovbuf)); | 848 | sizeof(iovbuf)); |
@@ -848,9 +854,9 @@ int brcmf_c_preinit_dcmds(struct brcmf_pub *drvr) | |||
848 | sizeof(iovbuf)); | 854 | sizeof(iovbuf)); |
849 | 855 | ||
850 | brcmf_proto_cdc_set_dcmd(drvr, 0, BRCMF_C_SET_SCAN_CHANNEL_TIME, | 856 | brcmf_proto_cdc_set_dcmd(drvr, 0, BRCMF_C_SET_SCAN_CHANNEL_TIME, |
851 | (char *)&scan_assoc_time, sizeof(scan_assoc_time)); | 857 | (char *)&scan_assoc_time_le, sizeof(scan_assoc_time_le)); |
852 | brcmf_proto_cdc_set_dcmd(drvr, 0, BRCMF_C_SET_SCAN_UNASSOC_TIME, | 858 | brcmf_proto_cdc_set_dcmd(drvr, 0, BRCMF_C_SET_SCAN_UNASSOC_TIME, |
853 | (char *)&scan_unassoc_time, sizeof(scan_unassoc_time)); | 859 | (char *)&scan_unassoc_time_le, sizeof(scan_unassoc_time_le)); |
854 | 860 | ||
855 | /* Set and enable ARP offload feature */ | 861 | /* Set and enable ARP offload feature */ |
856 | brcmf_c_arp_offload_set(drvr, BRCMF_ARPOL_MODE); | 862 | brcmf_c_arp_offload_set(drvr, BRCMF_ARPOL_MODE); |