Skip to content

Commit 6d2c360

Browse files
AviSternjmberg-intel
authored andcommitted
wifi: iwlmei: don't send nic info with invalid mac address
In case the SAP connection is established before the interface is added, the mac address is still not set. Don't send the nic info SAP message in this case since it will result in sending an invalid mac address. The nic info message will be sent with a valid mac address when the interface is added. Signed-off-by: Avraham Stern <[email protected]> Signed-off-by: Gregory Greenman <[email protected]> Link: https://lore.kernel.org/r/20230822103048.a49436bed387.I0ca88d72456e6e9f939bbc2e0c52ffb173fbc97e@changeid Signed-off-by: Johannes Berg <[email protected]>
1 parent a7d9ac4 commit 6d2c360

File tree

1 file changed

+7
-3
lines changed
  • drivers/net/wireless/intel/iwlwifi/mei

1 file changed

+7
-3
lines changed

drivers/net/wireless/intel/iwlwifi/mei/main.c

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -774,9 +774,13 @@ static void iwl_mei_set_init_conf(struct iwl_mei *mei)
774774
iwl_mei_send_sap_msg_payload(mei->cldev, &sar_msg.hdr);
775775
}
776776

777-
ether_addr_copy(nic_info_msg.mac_address, iwl_mei_cache.mac_address);
778-
ether_addr_copy(nic_info_msg.nvm_address, iwl_mei_cache.nvm_address);
779-
iwl_mei_send_sap_msg_payload(mei->cldev, &nic_info_msg.hdr);
777+
if (is_valid_ether_addr(iwl_mei_cache.mac_address)) {
778+
ether_addr_copy(nic_info_msg.mac_address,
779+
iwl_mei_cache.mac_address);
780+
ether_addr_copy(nic_info_msg.nvm_address,
781+
iwl_mei_cache.nvm_address);
782+
iwl_mei_send_sap_msg_payload(mei->cldev, &nic_info_msg.hdr);
783+
}
780784

781785
iwl_mei_send_sap_msg_payload(mei->cldev, &rfkill_msg.hdr);
782786
}

0 commit comments

Comments
 (0)