Skip to content

Commit

Permalink
ath10k: use the right length of "background"
Browse files Browse the repository at this point in the history
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: 855aed1 ("ath10k: add spectral scan feature")
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
  • Loading branch information
Nicolas Iooss authored and Kalle Valo committed Nov 15, 2016
1 parent f004e53 commit 31b2398
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/wireless/ath/ath10k/spectral.c
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ static ssize_t write_file_spec_scan_ctl(struct file *file,
} else {
res = -EINVAL;
}
} else if (strncmp("background", buf, 9) == 0) {
} else if (strncmp("background", buf, 10) == 0) {
res = ath10k_spectral_scan_config(ar, SPECTRAL_BACKGROUND);
} else if (strncmp("manual", buf, 6) == 0) {
res = ath10k_spectral_scan_config(ar, SPECTRAL_MANUAL);
Expand Down

0 comments on commit 31b2398

Please sign in to comment.