Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit be88a1ad authored by Liad Kaufman's avatar Liad Kaufman Committed by Emmanuel Grumbach
Browse files

iwlwifi: nvm: remove mac address byte swapping in 8000 family



This fixes the byte order copying in the MAO (Mac Override
Section) section from the PNVM, as the byte swapping is not
required anymore in the 8000 family. Due to the byte
swapping, the driver was reporting an incorrect MAC
adddress.

CC: <stable@vger.kernel.org> [4.1]
Signed-off-by: default avatarLiad Kaufman <liad.kaufman@intel.com>
Signed-off-by: default avatarEmmanuel Grumbach <emmanuel.grumbach@intel.com>
parent 255ba065
Loading
Loading
Loading
Loading
+5 −7
Original line number Original line Diff line number Diff line
@@ -540,13 +540,11 @@ static void iwl_set_hw_address_family_8000(struct device *dev,
		hw_addr = (const u8 *)(mac_override +
		hw_addr = (const u8 *)(mac_override +
				 MAC_ADDRESS_OVERRIDE_FAMILY_8000);
				 MAC_ADDRESS_OVERRIDE_FAMILY_8000);


		/* The byte order is little endian 16 bit, meaning 214365 */
		/*
		data->hw_addr[0] = hw_addr[1];
		 * Store the MAC address from MAO section.
		data->hw_addr[1] = hw_addr[0];
		 * No byte swapping is required in MAO section
		data->hw_addr[2] = hw_addr[3];
		 */
		data->hw_addr[3] = hw_addr[2];
		memcpy(data->hw_addr, hw_addr, ETH_ALEN);
		data->hw_addr[4] = hw_addr[5];
		data->hw_addr[5] = hw_addr[4];


		/*
		/*
		 * Force the use of the OTP MAC address in case of reserved MAC
		 * Force the use of the OTP MAC address in case of reserved MAC