Commit 04bbbbf1 authored by Ismael Asensio's avatar Ismael Asensio
Browse files

wifi: Show frequency and bssid in the connection details

This is useful to know which access point are we connected to when
using a dual band (2,4/5GHz) wireless network on the same SSID.

BUG: 357354
FIXED-IN: 5.25
parent 1db60ab6
Pipeline #164768 passed with stage
in 1 minute and 54 seconds
......@@ -450,6 +450,11 @@ QString UiUtils::wirelessBandToString(NetworkManager::WirelessSetting::Frequency
return {};
}
QString UiUtils::wirelessFrequencyToString(uint frequency)
{
return i18nc("Wireless connection frequency", "%1 GHz", frequency / 1000.0);
}
#if WITH_MODEMMANAGER_SUPPORT
QString UiUtils::convertAllowedModeToString(ModemManager::Modem::ModemModes modes)
{
......
......@@ -110,6 +110,12 @@ public:
*/
static QString wirelessBandToString(NetworkManager::WirelessSetting::FrequencyBand band);
/**
* @param frequency The frequency of a wireless network access point in MHz
* @return A string representation
*/
static QString wirelessFrequencyToString(uint frequency);
#if WITH_MODEMMANAGER_SUPPORT
static QString convertAllowedModeToString(ModemManager::Modem::ModemModes mode);
static QString convertAccessTechnologyToString(ModemManager::Modem::AccessTechnologies tech);
......
......@@ -595,6 +595,11 @@ void NetworkModelItem::updateDetails() const
if (m_connectionState == NetworkManager::ActiveConnection::Activated) {
m_details << i18n("Connection speed") << UiUtils::connectionSpeed(wirelessDevice->bitRate());
}
const NetworkManager::AccessPoint::Ptr accessPoint = wirelessDevice->findAccessPoint(m_specificPath);
if (accessPoint) {
m_details << i18n("Frequency") << UiUtils::wirelessFrequencyToString(accessPoint->frequency());
m_details << i18n("BSSID") << accessPoint->hardwareAddress();
}
m_details << i18n("MAC Address") << wirelessDevice->permanentHardwareAddress();
}
} else if (m_type == NetworkManager::ConnectionSettings::Gsm || m_type == NetworkManager::ConnectionSettings::Cdma) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment