GNOME Bugzilla – Bug 723295
[review] dcbw/5ghz-caps: indicate 2ghz and 5ghz wifi device capabilities
Last modified: 2015-04-09 15:00:37 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.
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?
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.
(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
Created attachment 300872 [details] [review] [PATCH v2] wifi: indicate 2ghz and 5ghz wifi device capabilities
(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.
(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
LGTM
Merged to master by Beniamino: aabc6fc57b252604b52648b819dd937aabba7805 wifi: indicate 2ghz and 5ghz wifi device capabilities I think we should also backport it to 1.0...
Cherry-picked to 1.0 too: d2e5e648d468fe3a9296669ccd62605fbd4b1a9a