projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dc641b7
)
i40e: Fix MAC format in Write MAC address AQ cmd
author
Kamil Krawczyk
<
[email protected]
>
Wed, 18 Dec 2013 13:45:52 +0000
(13:45 +0000)
committer
Jeff Kirsher
<
[email protected]
>
Thu, 9 Jan 2014 10:12:46 +0000
(
02:12
-0800)
The MAC address format expected by the hardware is in a very specific
format, and the driver was filling in the data incorrectly.
Change-ID: I7bc66505ef459ee347dd3bda68051004c141c689
Signed-off-by: Kamil Krawczyk <
[email protected]
>
Signed-off-by: Jesse Brandeburg <
[email protected]
>
Tested-by: Kavindya Deegala <
[email protected]
>
Signed-off-by: Jeff Kirsher <
[email protected]
>
drivers/net/ethernet/intel/i40e/i40e_common.c
patch
|
blob
|
history
diff --git
a/drivers/net/ethernet/intel/i40e/i40e_common.c
b/drivers/net/ethernet/intel/i40e/i40e_common.c
index 8f28aee6bbc031e6f1ce62fb1f0854a83d98aa17..807312bb62a2d963a544f18f18884ff8f775b69e 100644
(file)
--- a/
drivers/net/ethernet/intel/i40e/i40e_common.c
+++ b/
drivers/net/ethernet/intel/i40e/i40e_common.c
@@
-254,8
+254,11
@@
i40e_status i40e_aq_mac_address_write(struct i40e_hw *hw,
i40e_fill_default_direct_cmd_desc(&desc,
i40e_aqc_opc_mac_address_write);
cmd_data->command_flags = cpu_to_le16(flags);
- memcpy(&cmd_data->mac_sal, &mac_addr[0], 4);
- memcpy(&cmd_data->mac_sah, &mac_addr[4], 2);
+ cmd_data->mac_sah = cpu_to_le16((u16)mac_addr[0] << 8 | mac_addr[1]);
+ cmd_data->mac_sal = cpu_to_le32(((u32)mac_addr[2] << 24) |
+ ((u32)mac_addr[3] << 16) |
+ ((u32)mac_addr[4] << 8) |
+ mac_addr[5]);
status = i40e_asq_send_command(hw, &desc, NULL, 0, cmd_details);