From fcc36be423a46f6dc2dcaa9f46aa47526f3e7d82 Mon Sep 17 00:00:00 2001 From: Kalle Valo Date: Fri, 15 Jul 2022 13:35:16 +0300 Subject: wifi: ath11k: mac: fix long line Recent mac80211 API changes introduced a long line warning in ath11k: drivers/net/wireless/ath/ath11k/mac.c:1404: line length of 92 exceeds 90 columns Compile tested only. Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220708170052.28615-1-kvalo@kernel.org --- drivers/net/wireless/ath/ath11k/mac.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'drivers/net') diff --git a/drivers/net/wireless/ath/ath11k/mac.c b/drivers/net/wireless/ath/ath11k/mac.c index 92e17d3c634e..d83d3c944594 100644 --- a/drivers/net/wireless/ath/ath11k/mac.c +++ b/drivers/net/wireless/ath/ath11k/mac.c @@ -1401,7 +1401,8 @@ void ath11k_mac_bcn_tx_event(struct ath11k_vif *arvif) if (!vif->bss_conf.color_change_active && !arvif->bcca_zero_sent) return; - if (vif->bss_conf.color_change_active && ieee80211_beacon_cntdwn_is_complete(vif)) { + if (vif->bss_conf.color_change_active && + ieee80211_beacon_cntdwn_is_complete(vif)) { arvif->bcca_zero_sent = true; ieee80211_color_change_finish(vif); return; -- cgit v1.2.3 From eaedf62f7aaa4e2efd69c0fbd32ee774456ce361 Mon Sep 17 00:00:00 2001 From: Jilin Yuan Date: Fri, 15 Jul 2022 13:35:18 +0300 Subject: wifi: ath5k: fix repeated words in comments Delete the redundant word 'don't' and 'but'. Signed-off-by: Jilin Yuan Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220708154929.19199-1-yuanjilin@cdjrlc.com --- drivers/net/wireless/ath/ath5k/base.c | 2 +- drivers/net/wireless/ath/ath5k/mac80211-ops.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/net') diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c index 85c982e0a1cd..c59c14483177 100644 --- a/drivers/net/wireless/ath/ath5k/base.c +++ b/drivers/net/wireless/ath/ath5k/base.c @@ -1982,7 +1982,7 @@ ath5k_beacon_send(struct ath5k_hw *ah) /* * Check if the previous beacon has gone out. If - * not, don't don't try to post another: skip this + * not, don't try to post another: skip this * period and wait for the next. Missed beacons * indicate a problem and should not occur. If we * miss too many consecutive beacons reset the device. diff --git a/drivers/net/wireless/ath/ath5k/mac80211-ops.c b/drivers/net/wireless/ath/ath5k/mac80211-ops.c index acd0e1dafb7f..ed5d2160a72a 100644 --- a/drivers/net/wireless/ath/ath5k/mac80211-ops.c +++ b/drivers/net/wireless/ath/ath5k/mac80211-ops.c @@ -410,7 +410,7 @@ ath5k_configure_filter(struct ieee80211_hw *hw, unsigned int changed_flags, /* FIF_CONTROL doc says we should only pass on control frames for this * station. This needs testing. I believe right now this * enables *all* control frames, which is OK.. but - * but we should see if we can improve on granularity */ + * we should see if we can improve on granularity */ if (*new_flags & FIF_CONTROL) rfilt |= AR5K_RX_FILTER_CONTROL; -- cgit v1.2.3 From 7a4836560a6198d245d5732e26f94898b12eb760 Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Fri, 15 Jul 2022 13:35:18 +0300 Subject: wifi: wil6210: debugfs: fix info leak in wil_write_file_wmi() The simple_write_to_buffer() function will succeed if even a single byte is initialized. However, we need to initialize the whole buffer to prevent information leaks. Just use memdup_user(). Fixes: ff974e408334 ("wil6210: debugfs interface to send raw WMI command") Signed-off-by: Dan Carpenter Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/Ysg14NdKAZF/hcNG@kili --- drivers/net/wireless/ath/wil6210/debugfs.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'drivers/net') diff --git a/drivers/net/wireless/ath/wil6210/debugfs.c b/drivers/net/wireless/ath/wil6210/debugfs.c index 64d6c98174c8..fe84362718de 100644 --- a/drivers/net/wireless/ath/wil6210/debugfs.c +++ b/drivers/net/wireless/ath/wil6210/debugfs.c @@ -1012,18 +1012,12 @@ static ssize_t wil_write_file_wmi(struct file *file, const char __user *buf, u16 cmdid; int rc, rc1; - if (cmdlen < 0) + if (cmdlen < 0 || *ppos != 0) return -EINVAL; - wmi = kmalloc(len, GFP_KERNEL); - if (!wmi) - return -ENOMEM; - - rc = simple_write_to_buffer(wmi, len, ppos, buf, len); - if (rc < 0) { - kfree(wmi); - return rc; - } + wmi = memdup_user(buf, len); + if (IS_ERR(wmi)) + return PTR_ERR(wmi); cmd = (cmdlen > 0) ? &wmi[1] : NULL; cmdid = le16_to_cpu(wmi->command_id); -- cgit v1.2.3 From 6456741f6427265396d3b7a0e83bf9319334b696 Mon Sep 17 00:00:00 2001 From: Jilin Yuan Date: Sat, 9 Jul 2022 20:32:08 +0800 Subject: wifi: ath6kl: fix repeated words in comments Delete the redundant words 'the' and 'of'. Signed-off-by: Jilin Yuan Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220709123208.41736-1-yuanjilin@cdjrlc.com --- drivers/net/wireless/ath/ath6kl/hif.h | 2 +- drivers/net/wireless/ath/ath6kl/sdio.c | 2 +- drivers/net/wireless/ath/ath6kl/wmi.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'drivers/net') diff --git a/drivers/net/wireless/ath/ath6kl/hif.h b/drivers/net/wireless/ath/ath6kl/hif.h index f9d3f3a5edfe..ba16b98c872d 100644 --- a/drivers/net/wireless/ath/ath6kl/hif.h +++ b/drivers/net/wireless/ath/ath6kl/hif.h @@ -92,7 +92,7 @@ struct bus_request { * emode - This indicates the whether the command is to be executed in a * blocking or non-blocking fashion (HIF_SYNCHRONOUS/ * HIF_ASYNCHRONOUS). The read/write data paths in HTC have been - * implemented using the asynchronous mode allowing the the bus + * implemented using the asynchronous mode allowing the bus * driver to indicate the completion of operation through the * registered callback routine. The requirement primarily comes * from the contexts these operations get called from (a driver's diff --git a/drivers/net/wireless/ath/ath6kl/sdio.c b/drivers/net/wireless/ath/ath6kl/sdio.c index 6b51a2dceadc..8a43c48ec1cf 100644 --- a/drivers/net/wireless/ath/ath6kl/sdio.c +++ b/drivers/net/wireless/ath/ath6kl/sdio.c @@ -1185,7 +1185,7 @@ static int ath6kl_sdio_bmi_read(struct ath6kl *ar, u8 *buf, u32 len) * Wait for first 4 bytes to be in FIFO * If CONSERVATIVE_BMI_READ is enabled, also wait for * a BMI command credit, which indicates that the ENTIRE - * response is available in the the FIFO + * response is available in the FIFO * * CASE 3: length > 128 * Wait for the first 4 bytes to be in FIFO diff --git a/drivers/net/wireless/ath/ath6kl/wmi.h b/drivers/net/wireless/ath/ath6kl/wmi.h index 0d99f754b7e7..b4fcfb72991c 100644 --- a/drivers/net/wireless/ath/ath6kl/wmi.h +++ b/drivers/net/wireless/ath/ath6kl/wmi.h @@ -698,7 +698,7 @@ enum auth_mode { /* * NB: these values are ordered carefully; there are lots of - * of implications in any reordering. In particular beware + * implications in any reordering. In particular beware * that 4 is not used to avoid conflicting with IEEE80211_F_PRIVACY. */ #define ATH6KL_CIPHER_WEP 0 -- cgit v1.2.3 From 88e67a4f0bf88711359ee5498baf0a6e4ea8e414 Mon Sep 17 00:00:00 2001 From: Jilin Yuan Date: Sat, 9 Jul 2022 20:40:36 +0800 Subject: wifi: ath: fix repeated words in comments Delete the redundant word 'have'. Signed-off-by: Jilin Yuan Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220709124036.49674-1-yuanjilin@cdjrlc.com --- drivers/net/wireless/ath/hw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/net') diff --git a/drivers/net/wireless/ath/hw.c b/drivers/net/wireless/ath/hw.c index b53ebb3ac9a2..85955572a705 100644 --- a/drivers/net/wireless/ath/hw.c +++ b/drivers/net/wireless/ath/hw.c @@ -48,7 +48,7 @@ * the MAC address to obtain the relevant bits and compare the result with * (frame's BSSID & mask) to see if they match. * - * Simple example: on your card you have have two BSSes you have created with + * Simple example: on your card you have two BSSes you have created with * BSSID-01 and BSSID-02. Lets assume BSSID-01 will not use the MAC address. * There is another BSSID-03 but you are not part of it. For simplicity's sake, * assuming only 4 bits for a mac address and for BSSIDs you can then have: -- cgit v1.2.3 From aa6f2be484d764b0221e5732da1a088b1f1cdcd5 Mon Sep 17 00:00:00 2001 From: Jilin Yuan Date: Sat, 9 Jul 2022 21:21:37 +0800 Subject: wifi: wil6210: fix repeated words in comments Delete the redundant word 'for'. Signed-off-by: Jilin Yuan Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220709132137.12442-1-yuanjilin@cdjrlc.com --- drivers/net/wireless/ath/wil6210/txrx.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/net') diff --git a/drivers/net/wireless/ath/wil6210/txrx.h b/drivers/net/wireless/ath/wil6210/txrx.h index 1f4c8ec75be8..1ae1bec1b97f 100644 --- a/drivers/net/wireless/ath/wil6210/txrx.h +++ b/drivers/net/wireless/ath/wil6210/txrx.h @@ -356,7 +356,7 @@ struct vring_rx_mac { * bit 10 : cmd_dma_it:1 immediate interrupt * bit 11..15 : reserved:5 * bit 16..29 : phy_info_length:14 It is valid when the PII is set. - * When the FFM bit is set bits 29-27 are used for for + * When the FFM bit is set bits 29-27 are used for * Flex Filter Match. Matching Index to one of the L2 * EtherType Flex Filter * bit 30..31 : l4_type:2 valid if the L4I bit is set in the status field -- cgit v1.2.3 From ec65e0e9acf758585249e43a51abf082ba1af582 Mon Sep 17 00:00:00 2001 From: Jilin Yuan Date: Sat, 9 Jul 2022 20:43:56 +0800 Subject: wifi: wcn36xx: fix repeated words in comments Delete the redundant word 'the'. Signed-off-by: Jilin Yuan Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220709124356.52543-1-yuanjilin@cdjrlc.com --- drivers/net/wireless/ath/wcn36xx/hal.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/net') diff --git a/drivers/net/wireless/ath/wcn36xx/hal.h b/drivers/net/wireless/ath/wcn36xx/hal.h index 874746b5993c..a1afe1f85f0e 100644 --- a/drivers/net/wireless/ath/wcn36xx/hal.h +++ b/drivers/net/wireless/ath/wcn36xx/hal.h @@ -4142,7 +4142,7 @@ struct wcn36xx_hal_dump_cmd_rsp_msg { /* Length of the responce message */ u32 rsp_length; - /* FIXME: Currently considering the the responce will be less than + /* FIXME: Currently considering the responce will be less than * 100bytes */ u8 rsp_buffer[DUMPCMD_RSP_BUFFER]; } __packed; -- cgit v1.2.3