Wifi: fix code smells

This commit is contained in:
李通洲
2025-04-01 10:48:04 +08:00
parent abe78823b6
commit 3d7c631abd
2 changed files with 5 additions and 1 deletions
+1 -1
View File
@@ -38,7 +38,7 @@ static bool getWifiInfoByIpconfig(FFstrbuf* ipconfig, const char* prefix, FFstrb
const char* end = strchr(start, '\n');
if (!end) return false;
ffStrbufSetNS(result, (uint32_t) (end - start), start);
return false;
return true;
}
const char* ffDetectWifi(FFlist* result)
+4
View File
@@ -98,6 +98,10 @@ const char* ffDetectWifi(FFlist* result)
ffStrbufSetStatic(&item->conn.protocol, "802.11n (Wi-Fi 4)");
if (IEEE80211_IS_CHAN_VHT(&curchan))
ffStrbufSetStatic(&item->conn.protocol, "802.11ac (Wi-Fi 5)");
#ifdef IEEE80211_IS_CHAN_HE // for future use
if (IEEE80211_IS_CHAN_HE(&curchan))
ffStrbufSetStatic(&item->conn.protocol, "802.11ax (Wi-Fi 6)");
#endif
}
union {