mirror of
https://github.com/torvalds/linux.git
synced 2026-05-22 06:01:53 +02:00
staging: rtl8192e: Use standard api to calculate frequency to channel
Use ieee80211_freq_khz_to_channel() to calculate frequency to channel to omit proprietary code. Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> Message-ID: <fc332e81f6677965e9e51f1fcef9815997effcb5.1686166624.git.philipp.g.hortmann@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
d88b46ce5a
commit
4e9e2c8026
|
|
@ -42,15 +42,8 @@ int rtllib_wx_set_freq(struct rtllib_device *ieee, struct iw_request_info *a,
|
|||
if (fwrq->e == 1) {
|
||||
if ((fwrq->m >= (int)2.412e8 &&
|
||||
fwrq->m <= (int)2.487e8)) {
|
||||
int f = fwrq->m / 100000;
|
||||
int c = 0;
|
||||
|
||||
while ((c < 14) && (f != rtllib_wlan_frequencies[c]))
|
||||
c++;
|
||||
|
||||
/* hack to fall through */
|
||||
fwrq->m = ieee80211_freq_khz_to_channel(fwrq->m / 100);
|
||||
fwrq->e = 0;
|
||||
fwrq->m = c + 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user