* [PATCH] staging: r8188eu: remove 5 GHz code
@ 2021-08-23 19:30 Michael Straube
2021-08-23 19:50 ` Martin Kaiser
2021-08-23 21:30 ` Phillip Potter
0 siblings, 2 replies; 3+ messages in thread
From: Michael Straube @ 2021-08-23 19:30 UTC (permalink / raw)
To: gregkh
Cc: Larry.Finger, phil, martin, fmdefrancesco, linux-staging,
linux-kernel, Michael Straube
The driver is for chips that do not operate in the 5 GHz band.
Remove some 5 GHz related code.
Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
drivers/staging/r8188eu/os_dep/ioctl_linux.c | 30 ++++++--------------
1 file changed, 8 insertions(+), 22 deletions(-)
diff --git a/drivers/staging/r8188eu/os_dep/ioctl_linux.c b/drivers/staging/r8188eu/os_dep/ioctl_linux.c
index ab4a9200f079..81d4255d1785 100644
--- a/drivers/staging/r8188eu/os_dep/ioctl_linux.c
+++ b/drivers/staging/r8188eu/os_dep/ioctl_linux.c
@@ -208,17 +208,10 @@ static char *translate_scan(struct adapter *padapter,
else
snprintf(iwe.u.name, IFNAMSIZ, "IEEE 802.11bg");
} else {
- if (pnetwork->network.Configuration.DSConfig > 14) {
- if (ht_cap)
- snprintf(iwe.u.name, IFNAMSIZ, "IEEE 802.11an");
- else
- snprintf(iwe.u.name, IFNAMSIZ, "IEEE 802.11a");
- } else {
- if (ht_cap)
- snprintf(iwe.u.name, IFNAMSIZ, "IEEE 802.11gn");
- else
- snprintf(iwe.u.name, IFNAMSIZ, "IEEE 802.11g");
- }
+ if (ht_cap)
+ snprintf(iwe.u.name, IFNAMSIZ, "IEEE 802.11gn");
+ else
+ snprintf(iwe.u.name, IFNAMSIZ, "IEEE 802.11g");
}
start = iwe_stream_add_event(info, start, stop, &iwe, IW_EV_CHAR_LEN);
@@ -737,17 +730,10 @@ static int rtw_wx_get_name(struct net_device *dev,
else
snprintf(wrqu->name, IFNAMSIZ, "IEEE 802.11bg");
} else {
- if (pcur_bss->Configuration.DSConfig > 14) {
- if (ht_cap)
- snprintf(wrqu->name, IFNAMSIZ, "IEEE 802.11an");
- else
- snprintf(wrqu->name, IFNAMSIZ, "IEEE 802.11a");
- } else {
- if (ht_cap)
- snprintf(wrqu->name, IFNAMSIZ, "IEEE 802.11gn");
- else
- snprintf(wrqu->name, IFNAMSIZ, "IEEE 802.11g");
- }
+ if (ht_cap)
+ snprintf(wrqu->name, IFNAMSIZ, "IEEE 802.11gn");
+ else
+ snprintf(wrqu->name, IFNAMSIZ, "IEEE 802.11g");
}
} else {
snprintf(wrqu->name, IFNAMSIZ, "unassociated");
--
2.32.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] staging: r8188eu: remove 5 GHz code
2021-08-23 19:30 [PATCH] staging: r8188eu: remove 5 GHz code Michael Straube
@ 2021-08-23 19:50 ` Martin Kaiser
2021-08-23 21:30 ` Phillip Potter
1 sibling, 0 replies; 3+ messages in thread
From: Martin Kaiser @ 2021-08-23 19:50 UTC (permalink / raw)
To: Michael Straube
Cc: gregkh, Larry.Finger, phil, fmdefrancesco, linux-staging, linux-kernel
Thus wrote Michael Straube (straube.linux@gmail.com):
> The driver is for chips that do not operate in the 5 GHz band.
> Remove some 5 GHz related code.
> Signed-off-by: Michael Straube <straube.linux@gmail.com>
> ---
> drivers/staging/r8188eu/os_dep/ioctl_linux.c | 30 ++++++--------------
> 1 file changed, 8 insertions(+), 22 deletions(-)
> diff --git a/drivers/staging/r8188eu/os_dep/ioctl_linux.c b/drivers/staging/r8188eu/os_dep/ioctl_linux.c
> index ab4a9200f079..81d4255d1785 100644
> --- a/drivers/staging/r8188eu/os_dep/ioctl_linux.c
> +++ b/drivers/staging/r8188eu/os_dep/ioctl_linux.c
> @@ -208,17 +208,10 @@ static char *translate_scan(struct adapter *padapter,
> else
> snprintf(iwe.u.name, IFNAMSIZ, "IEEE 802.11bg");
> } else {
> - if (pnetwork->network.Configuration.DSConfig > 14) {
> - if (ht_cap)
> - snprintf(iwe.u.name, IFNAMSIZ, "IEEE 802.11an");
> - else
> - snprintf(iwe.u.name, IFNAMSIZ, "IEEE 802.11a");
> - } else {
> - if (ht_cap)
> - snprintf(iwe.u.name, IFNAMSIZ, "IEEE 802.11gn");
> - else
> - snprintf(iwe.u.name, IFNAMSIZ, "IEEE 802.11g");
> - }
> + if (ht_cap)
> + snprintf(iwe.u.name, IFNAMSIZ, "IEEE 802.11gn");
> + else
> + snprintf(iwe.u.name, IFNAMSIZ, "IEEE 802.11g");
> }
> start = iwe_stream_add_event(info, start, stop, &iwe, IW_EV_CHAR_LEN);
> @@ -737,17 +730,10 @@ static int rtw_wx_get_name(struct net_device *dev,
> else
> snprintf(wrqu->name, IFNAMSIZ, "IEEE 802.11bg");
> } else {
> - if (pcur_bss->Configuration.DSConfig > 14) {
> - if (ht_cap)
> - snprintf(wrqu->name, IFNAMSIZ, "IEEE 802.11an");
> - else
> - snprintf(wrqu->name, IFNAMSIZ, "IEEE 802.11a");
> - } else {
> - if (ht_cap)
> - snprintf(wrqu->name, IFNAMSIZ, "IEEE 802.11gn");
> - else
> - snprintf(wrqu->name, IFNAMSIZ, "IEEE 802.11g");
> - }
> + if (ht_cap)
> + snprintf(wrqu->name, IFNAMSIZ, "IEEE 802.11gn");
> + else
> + snprintf(wrqu->name, IFNAMSIZ, "IEEE 802.11g");
> }
> } else {
> snprintf(wrqu->name, IFNAMSIZ, "unassociated");
> --
> 2.32.0
Hi Michael and all,
looks good.
Acked-by: Martin Kaiser <martin@kaiser.cx>
Two comments unrelated to your patch: I guess that DSConfig is the
channel number, those two drivers have a misleading comment:
3 F m DSConfig
drivers/staging/r8188eu/include/wlan_bssdef.h
struct:ndis_802_11_config
u32 DSConfig; /* Frequency, units are kHz */
4 F m DSConfig drivers/staging/rtl8712/wlan_bssdef.h
struct:NDIS_802_11_CONFIGURATION
u32 DSConfig; /* Frequency, units are kHz */
The rtw_wx_get_name function has a similar check
if (pcur_bss->Configuration.DSConfig > 14).
But when Larry adds cfg80211 support, I guess all IW_HANDLER()s will
become obsolete...
Best regards,
Martin
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] staging: r8188eu: remove 5 GHz code
2021-08-23 19:30 [PATCH] staging: r8188eu: remove 5 GHz code Michael Straube
2021-08-23 19:50 ` Martin Kaiser
@ 2021-08-23 21:30 ` Phillip Potter
1 sibling, 0 replies; 3+ messages in thread
From: Phillip Potter @ 2021-08-23 21:30 UTC (permalink / raw)
To: Michael Straube
Cc: Greg KH, Larry Finger, Martin Kaiser, Fabio M. De Francesco,
open list:STAGING SUBSYSTEM, Linux Kernel Mailing List
On Mon, 23 Aug 2021 at 20:31, Michael Straube <straube.linux@gmail.com> wrote:
>
> The driver is for chips that do not operate in the 5 GHz band.
> Remove some 5 GHz related code.
>
> Signed-off-by: Michael Straube <straube.linux@gmail.com>
> ---
> drivers/staging/r8188eu/os_dep/ioctl_linux.c | 30 ++++++--------------
> 1 file changed, 8 insertions(+), 22 deletions(-)
>
> diff --git a/drivers/staging/r8188eu/os_dep/ioctl_linux.c b/drivers/staging/r8188eu/os_dep/ioctl_linux.c
> index ab4a9200f079..81d4255d1785 100644
> --- a/drivers/staging/r8188eu/os_dep/ioctl_linux.c
> +++ b/drivers/staging/r8188eu/os_dep/ioctl_linux.c
> @@ -208,17 +208,10 @@ static char *translate_scan(struct adapter *padapter,
> else
> snprintf(iwe.u.name, IFNAMSIZ, "IEEE 802.11bg");
> } else {
> - if (pnetwork->network.Configuration.DSConfig > 14) {
> - if (ht_cap)
> - snprintf(iwe.u.name, IFNAMSIZ, "IEEE 802.11an");
> - else
> - snprintf(iwe.u.name, IFNAMSIZ, "IEEE 802.11a");
> - } else {
> - if (ht_cap)
> - snprintf(iwe.u.name, IFNAMSIZ, "IEEE 802.11gn");
> - else
> - snprintf(iwe.u.name, IFNAMSIZ, "IEEE 802.11g");
> - }
> + if (ht_cap)
> + snprintf(iwe.u.name, IFNAMSIZ, "IEEE 802.11gn");
> + else
> + snprintf(iwe.u.name, IFNAMSIZ, "IEEE 802.11g");
> }
>
> start = iwe_stream_add_event(info, start, stop, &iwe, IW_EV_CHAR_LEN);
> @@ -737,17 +730,10 @@ static int rtw_wx_get_name(struct net_device *dev,
> else
> snprintf(wrqu->name, IFNAMSIZ, "IEEE 802.11bg");
> } else {
> - if (pcur_bss->Configuration.DSConfig > 14) {
> - if (ht_cap)
> - snprintf(wrqu->name, IFNAMSIZ, "IEEE 802.11an");
> - else
> - snprintf(wrqu->name, IFNAMSIZ, "IEEE 802.11a");
> - } else {
> - if (ht_cap)
> - snprintf(wrqu->name, IFNAMSIZ, "IEEE 802.11gn");
> - else
> - snprintf(wrqu->name, IFNAMSIZ, "IEEE 802.11g");
> - }
> + if (ht_cap)
> + snprintf(wrqu->name, IFNAMSIZ, "IEEE 802.11gn");
> + else
> + snprintf(wrqu->name, IFNAMSIZ, "IEEE 802.11g");
> }
> } else {
> snprintf(wrqu->name, IFNAMSIZ, "unassociated");
> --
> 2.32.0
>
Dear Michael,
Looks good to me. Thanks.
Acked-by: Phillip Potter <phil@philpotter.co.uk>
Regards,
Phil
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-08-23 21:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-23 19:30 [PATCH] staging: r8188eu: remove 5 GHz code Michael Straube
2021-08-23 19:50 ` Martin Kaiser
2021-08-23 21:30 ` Phillip Potter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).