diff options
author | Sucheta Chakraborty <sucheta.chakraborty@qlogic.com> | 2010-10-04 04:20:13 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-10-04 22:46:50 -0700 |
commit | 7e56cac4b68805470849ba373dd313ba0e7cdb81 (patch) | |
tree | ac25d1e2bd40838b37e9e51a2c6ab8afc321b982 /drivers/net/qlcnic/qlcnic_hw.c | |
parent | b501595cbb8afeaa9aaa870b3d29ef051403511a (diff) | |
download | lwn-7e56cac4b68805470849ba373dd313ba0e7cdb81.tar.gz lwn-7e56cac4b68805470849ba373dd313ba0e7cdb81.zip |
qlcnic: fix vlan TSO on big endian machine
o desc->vlan_tci is in __le16 format. Doing htons and
cpu_to_le64 again on vlan_tci, result in invalid value on ppc.
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 68d56939a8d9..712cfabc2825 100644 --- a/drivers/net/qlcnic/qlcnic_hw.c +++ b/drivers/net/qlcnic/qlcnic_hw.c @@ -375,10 +375,11 @@ qlcnic_send_cmd_descs(struct qlcnic_adapter *adapter, static int qlcnic_sre_macaddr_change(struct qlcnic_adapter *adapter, u8 *addr, - u16 vlan_id, unsigned op) + __le16 vlan_id, unsigned op) { struct qlcnic_nic_req req; struct qlcnic_mac_req *mac_req; + struct qlcnic_vlan_req *vlan_req; u64 word; memset(&req, 0, sizeof(struct qlcnic_nic_req)); @@ -391,7 +392,8 @@ qlcnic_sre_macaddr_change(struct qlcnic_adapter *adapter, u8 *addr, mac_req->op = op; memcpy(mac_req->mac_addr, addr, 6); - req.words[1] = cpu_to_le64(vlan_id); + vlan_req = (struct qlcnic_vlan_req *)&req.words[1]; + vlan_req->vlan_id = vlan_id; return qlcnic_send_cmd_descs(adapter, (struct cmd_desc_type0 *)&req, 1); } |