Skip to content

Commit

Permalink
wifi: mwl8k: initialize cmd->addr[] properly
Browse files Browse the repository at this point in the history
This loop is supposed to copy the mac address to cmd->addr but the
i++ increment is missing so it copies everything to cmd->addr[0] and
only the last address is recorded.

Fixes: 22bedad ("net: convert multicast list to list_head")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://msgid.link/b788be9a-15f5-4cca-a3fe-79df4c8ce7b2@moroto.mountain
  • Loading branch information
Dan Carpenter authored and Kalle Valo committed May 7, 2024
1 parent 9875b54 commit 1d60eab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/wireless/marvell/mwl8k.c
Original file line number Diff line number Diff line change
Expand Up @@ -2720,7 +2720,7 @@ __mwl8k_cmd_mac_multicast_adr(struct ieee80211_hw *hw, int allmulti,
cmd->action |= cpu_to_le16(MWL8K_ENABLE_RX_MULTICAST);
cmd->numaddr = cpu_to_le16(mc_count);
netdev_hw_addr_list_for_each(ha, mc_list) {
memcpy(cmd->addr[i], ha->addr, ETH_ALEN);
memcpy(cmd->addr[i++], ha->addr, ETH_ALEN);
}
}

Expand Down

0 comments on commit 1d60eab

Please sign in to comment.