diff options
author | Sucheta Chakraborty <sucheta.chakraborty@qlogic.com> | 2010-10-04 00:20:12 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-10-05 01:46:50 -0400 |
commit | b501595cbb8afeaa9aaa870b3d29ef051403511a (patch) | |
tree | 9799fa45f8b839eacc5ff113397377c55f3b898e /drivers/net/qlcnic/qlcnic_hw.c | |
parent | c265eb6ecb63e4b3a6b86b617fa7fd955a0e0980 (diff) |
qlcnic: fix endianess for lro
ipaddress in ifa->ifa_address field are in big endian format.
Also device requires ip address in big endian only.
Signed-off-by: Sucheta Chakraborty <sucheta.chakraborty@qlogic.com>
Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/qlcnic/qlcnic_hw.c')
-rw-r--r-- | drivers/net/qlcnic/qlcnic_hw.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/qlcnic/qlcnic_hw.c b/drivers/net/qlcnic/qlcnic_hw.c index c198df90ff3c..68d56939a8d9 100644 --- a/drivers/net/qlcnic/qlcnic_hw.c +++ b/drivers/net/qlcnic/qlcnic_hw.c | |||
@@ -676,9 +676,10 @@ int qlcnic_config_rss(struct qlcnic_adapter *adapter, int enable) | |||
676 | return rv; | 676 | return rv; |
677 | } | 677 | } |
678 | 678 | ||
679 | int qlcnic_config_ipaddr(struct qlcnic_adapter *adapter, u32 ip, int cmd) | 679 | int qlcnic_config_ipaddr(struct qlcnic_adapter *adapter, __be32 ip, int cmd) |
680 | { | 680 | { |
681 | struct qlcnic_nic_req req; | 681 | struct qlcnic_nic_req req; |
682 | struct qlcnic_ipaddr *ipa; | ||
682 | u64 word; | 683 | u64 word; |
683 | int rv; | 684 | int rv; |
684 | 685 | ||
@@ -689,7 +690,8 @@ int qlcnic_config_ipaddr(struct qlcnic_adapter *adapter, u32 ip, int cmd) | |||
689 | req.req_hdr = cpu_to_le64(word); | 690 | req.req_hdr = cpu_to_le64(word); |
690 | 691 | ||
691 | req.words[0] = cpu_to_le64(cmd); | 692 | req.words[0] = cpu_to_le64(cmd); |
692 | req.words[1] = cpu_to_le64(ip); | 693 | ipa = (struct qlcnic_ipaddr *)&req.words[1]; |
694 | ipa->ipv4 = ip; | ||
693 | 695 | ||
694 | rv = qlcnic_send_cmd_descs(adapter, (struct cmd_desc_type0 *)&req, 1); | 696 | rv = qlcnic_send_cmd_descs(adapter, (struct cmd_desc_type0 *)&req, 1); |
695 | if (rv != 0) | 697 | if (rv != 0) |