After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 723295 - [review] dcbw/5ghz-caps: indicate 2ghz and 5ghz wifi device capabilities
[review] dcbw/5ghz-caps: indicate 2ghz and 5ghz wifi device capabilities
Status: RESOLVED FIXED
Product: NetworkManager
Classification: Platform
Component: Wi-Fi
unspecified
Other All
: Normal normal
: ---
Assigned To: NetworkManager maintainer(s)
NetworkManager maintainer(s)
Depends on:
Blocks: 722550 nm-review
 
 
Reported: 2014-01-30 15:38 UTC by Dan Williams
Modified: 2015-04-09 15:00 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
[PATCH] wifi: indicate 2ghz and 5ghz wifi device capabilities (9.22 KB, patch)
2015-03-19 12:39 UTC, Beniamino Galvani
none Details | Review
[PATCH v2] wifi: indicate 2ghz and 5ghz wifi device capabilities (9.25 KB, patch)
2015-04-03 09:00 UTC, Beniamino Galvani
none Details | Review

Description Dan Williams 2014-01-30 15:38:18 UTC
+++ This bug was initially created as a clone of Bug #722550 +++

It's not possible to know whether the Wi-Fi chip on my card supports 5GHz frequencies.

It would be useful to know what the maximum speed supported is, and whether it supports 5GHz in addition to 2.4GHz.
Comment 1 Dan Williams 2014-01-30 15:38:40 UTC
See dcbw/5ghz-caps...

Or, (for everyone) would it be better to have a completely new
FrequencyCapabilies property on the Wifi device that contains this stuff? 
There may be new bands in the future (60ghz with 802.11ad) but not that many. 
There are also non-public WiFi bands (3.9ghz and 4.9ghz public safety) and
uncommon ones (900Mhz ISM) that we don't care that much about right now.  So, I
think we can get away with frequency caps in the wifi capabilities field.

The other question is on affirmative capabilities.  It's kinda ugly that if
neither 2ghz or 5ghz capabilities are indicated, that means "unknown", which
could be due to an older NetworkManager or a driver which sucks and doesn't
provide any frequency indications.  Should I add a
NM_WIFI_DEVICE_CAP_FREQ_SUPPORTED or something, to indicate that
NM_WIFI_DEVICE_CAP_FREQ_*GHZ caps are valid?
Comment 2 Beniamino Galvani 2015-03-19 12:39:54 UTC
Created attachment 299807 [details] [review]
[PATCH] wifi: indicate 2ghz and 5ghz wifi device capabilities

Rebased patch from Dan Williams dcbw/5ghz-caps branch and added CAP_FREQ_VALID flag.
Comment 3 Thomas Haller 2015-04-02 14:21:12 UTC
(In reply to Beniamino Galvani from comment #2)
> Created attachment 299807 [details] [review] [review]
> [PATCH] wifi: indicate 2ghz and 5ghz wifi device capabilities
> 
> Rebased patch from Dan Williams dcbw/5ghz-caps branch and added
> CAP_FREQ_VALID flag.



+                   set_val_strc (arr, 8, (wcaps & NM_WIFI_DEVICE_CAP_FREQ_VALID) ? _("yes") : _("no"));
+                   set_val_strc (arr, 9, (wcaps & NM_WIFI_DEVICE_CAP_FREQ_2GHZ) ? _("yes") : _("no"));
+                   set_val_strc (arr, 10, (wcaps & NM_WIFI_DEVICE_CAP_FREQ_5GHZ) ? _("yes") : _("no"));

how about:

set_val_strc (arr, 9, 
    (!NM_FLAGS_HAS (wcaps, NM_WIFI_DEVICE_CAP_FREQ_VALID) ? _("unknown") :
    ( (NM_FLAGS_HAS (wcaps, NM_WIFI_DEVICE_CAP_FREQ_2GHZ)) ? _("yes") : _("no"));


otherwise LGTM
Comment 4 Beniamino Galvani 2015-04-03 09:00:40 UTC
Created attachment 300872 [details] [review]
[PATCH v2] wifi: indicate 2ghz and 5ghz wifi device capabilities
Comment 5 Beniamino Galvani 2015-04-03 09:03:43 UTC
(In reply to Thomas Haller from comment #3)
> +                   set_val_strc (arr, 8, (wcaps &
> NM_WIFI_DEVICE_CAP_FREQ_VALID) ? _("yes") : _("no"));
> +                   set_val_strc (arr, 9, (wcaps &
> NM_WIFI_DEVICE_CAP_FREQ_2GHZ) ? _("yes") : _("no"));
> +                   set_val_strc (arr, 10, (wcaps &
> NM_WIFI_DEVICE_CAP_FREQ_5GHZ) ? _("yes") : _("no"));
> 
> how about:
> 
> set_val_strc (arr, 9, 
>     (!NM_FLAGS_HAS (wcaps, NM_WIFI_DEVICE_CAP_FREQ_VALID) ? _("unknown") :
>     ( (NM_FLAGS_HAS (wcaps, NM_WIFI_DEVICE_CAP_FREQ_2GHZ)) ? _("yes") :
> _("no"));
>

yes, looks better. I didn't use flag macros because they're not available in nmcli.
Patch attached.
Comment 6 Thomas Haller 2015-04-07 10:52:48 UTC
(In reply to Beniamino Galvani from comment #5)
> (In reply to Thomas Haller from comment #3)
> > +                   set_val_strc (arr, 8, (wcaps &
> > NM_WIFI_DEVICE_CAP_FREQ_VALID) ? _("yes") : _("no"));
> > +                   set_val_strc (arr, 9, (wcaps &
> > NM_WIFI_DEVICE_CAP_FREQ_2GHZ) ? _("yes") : _("no"));
> > +                   set_val_strc (arr, 10, (wcaps &
> > NM_WIFI_DEVICE_CAP_FREQ_5GHZ) ? _("yes") : _("no"));
> > 
> > how about:
> > 
> > set_val_strc (arr, 9, 
> >     (!NM_FLAGS_HAS (wcaps, NM_WIFI_DEVICE_CAP_FREQ_VALID) ? _("unknown") :
> >     ( (NM_FLAGS_HAS (wcaps, NM_WIFI_DEVICE_CAP_FREQ_2GHZ)) ? _("yes") :
> > _("no"));
> >
> 
> yes, looks better. I didn't use flag macros because they're not available in
> nmcli.
> Patch attached.

Ah right. We better move NM_FLAGS_* to include/nm-utils-internal.h.

Anyway. LGTM
Comment 7 Dan Williams 2015-04-07 14:56:52 UTC
LGTM
Comment 8 Dan Williams 2015-04-09 14:18:27 UTC
Merged to master by Beniamino:

aabc6fc57b252604b52648b819dd937aabba7805
wifi: indicate 2ghz and 5ghz wifi device capabilities

I think we should also backport it to 1.0...
Comment 9 Dan Williams 2015-04-09 15:00:37 UTC
Cherry-picked to 1.0 too: d2e5e648d468fe3a9296669ccd62605fbd4b1a9a