Explorar o código

ath10k: use the right length of "background"

The word "background" contains 10 characters so the third argument of
strncmp() need to be 10 in order to match this prefix correctly.

Signed-off-by: Nicolas Iooss <nicolas.iooss_linux@m4x.org>
Fixes: 855aed1220d2 ("ath10k: add spectral scan feature")
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Nicolas Iooss %!s(int64=8) %!d(string=hai) anos
pai
achega
31b239824e
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      drivers/net/wireless/ath/ath10k/spectral.c

+ 1 - 1
drivers/net/wireless/ath/ath10k/spectral.c

@@ -338,7 +338,7 @@ static ssize_t write_file_spec_scan_ctl(struct file *file,
 		} else {
 		} else {
 			res = -EINVAL;
 			res = -EINVAL;
 		}
 		}
-	} else if (strncmp("background", buf, 9) == 0) {
+	} else if (strncmp("background", buf, 10) == 0) {
 		res = ath10k_spectral_scan_config(ar, SPECTRAL_BACKGROUND);
 		res = ath10k_spectral_scan_config(ar, SPECTRAL_BACKGROUND);
 	} else if (strncmp("manual", buf, 6) == 0) {
 	} else if (strncmp("manual", buf, 6) == 0) {
 		res = ath10k_spectral_scan_config(ar, SPECTRAL_MANUAL);
 		res = ath10k_spectral_scan_config(ar, SPECTRAL_MANUAL);