]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
libertas_tf: Use correct channel range in lbtf_geo_init
authorYueHaibing <yuehaibing@huawei.com>
Tue, 16 Jul 2019 14:42:18 +0000 (22:42 +0800)
committerBen Hutchings <ben@decadent.org.uk>
Tue, 10 Dec 2019 18:01:10 +0000 (18:01 +0000)
commit 2ec4ad49b98e4a14147d04f914717135eca7c8b1 upstream.

It seems we should use 'range' instead of 'priv->range'
in lbtf_geo_init(), because 'range' is the corret one
related to current regioncode.

Reported-by: Hulk Robot <hulkci@huawei.com>
Fixes: 691cdb49388b ("libertas_tf: command helper functions for libertas_tf")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/net/wireless/libertas_tf/cmd.c

index 909ac3685010f116d160063a5e95ebcb2f34f358..2b193f1257a5ac6271af561573dba23449d26863 100644 (file)
@@ -69,7 +69,7 @@ static void lbtf_geo_init(struct lbtf_private *priv)
                        break;
                }
 
-       for (ch = priv->range.start; ch < priv->range.end; ch++)
+       for (ch = range->start; ch < range->end; ch++)
                priv->channels[CHAN_TO_IDX(ch)].flags = 0;
 }