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)
committerKalle Valo <kvalo@codeaurora.org>
Wed, 24 Jul 2019 11:53:40 +0000 (14:53 +0300)
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>
drivers/net/wireless/marvell/libertas_tf/cmd.c

index 1eacca0..a0b4c9d 100644 (file)
@@ -65,7 +65,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;
 }