summaryrefslogtreecommitdiff
path: root/drivers/net/wireless
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r--drivers/net/wireless/ath/ath12k/wow.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/wireless/ath/ath12k/wow.c b/drivers/net/wireless/ath/ath12k/wow.c
index c5cba825a84a..bead19db2c9a 100644
--- a/drivers/net/wireless/ath/ath12k/wow.c
+++ b/drivers/net/wireless/ath/ath12k/wow.c
@@ -186,7 +186,7 @@ ath12k_wow_convert_8023_to_80211(struct ath12k *ar,
if (eth_pkt_ofs < ETH_ALEN) {
pkt_ofs = eth_pkt_ofs + a1_ofs;
- if (eth_pkt_ofs + eth_pat_len < ETH_ALEN) {
+ if (size_add(eth_pkt_ofs, eth_pat_len) < ETH_ALEN) {
memcpy(pat, eth_pat, eth_pat_len);
memcpy(bytemask, eth_bytemask, eth_pat_len);
@@ -228,7 +228,7 @@ ath12k_wow_convert_8023_to_80211(struct ath12k *ar,
} else if (eth_pkt_ofs < prot_ofs) {
pkt_ofs = eth_pkt_ofs - ETH_ALEN + a3_ofs;
- if (eth_pkt_ofs + eth_pat_len < prot_ofs) {
+ if (size_add(eth_pkt_ofs, eth_pat_len) < prot_ofs) {
memcpy(pat, eth_pat, eth_pat_len);
memcpy(bytemask, eth_bytemask, eth_pat_len);