diff --git a/tui/menu.cpp b/tui/menu.cpp index 114d370..896c259 100644 --- a/tui/menu.cpp +++ b/tui/menu.cpp @@ -412,9 +412,53 @@ void Menu::wifiInterfaceSelect(WINDOW *window, QString interface) { ++count; } + red(window); + mvwaddstr(window, y2 + 1, 2, "Standards:"); + green(window); + y2 += 3; + + foreach(Wireless::BandInfo band, bands) { + if((band.protocols & Wireless::PROTOCOL_80211_A) == Wireless::PROTOCOL_80211_A) { + mvwaddstr(window, y2, 2, "802.11a"); + ++y2; + } + + if((band.protocols & Wireless::PROTOCOL_80211_B) == Wireless::PROTOCOL_80211_B) { + mvwaddstr(window, y2, 2, "802.11b"); + ++y2; + } + + if((band.protocols & Wireless::PROTOCOL_80211_G) == Wireless::PROTOCOL_80211_G) { + mvwaddstr(window, y2, 2, "802.11g"); + ++y2; + } + + if((band.protocols & Wireless::PROTOCOL_80211_N) == Wireless::PROTOCOL_80211_N) { + QString nStr = "802.11n ("; + + if((band.width & Wireless::WIDTH_20MHZ) == Wireless::WIDTH_20MHZ) { + nStr += "150mbps"; + } + + if((band.width & Wireless::WIDTH_40MHZ) == Wireless::WIDTH_40MHZ) { + nStr += " and 300mbps"; + } + + nStr += ")"; + + QByteArray nArr = nStr.toLatin1(); + const char *nData = nArr.constData(); + + mvwaddstr(window, y2, 2, nData); + ++y2; + } + } + + red(window); + if(count == 1) { mvwaddstr(window, y2, 2, "No supported bands found."); - ++y; + ++y2; } cyan(window);