diff --git a/modules/wifi_show.go b/modules/wifi_show.go index 30ce411d..973bbe8b 100644 --- a/modules/wifi_show.go +++ b/modules/wifi_show.go @@ -159,7 +159,9 @@ func (w *WiFiModule) Show(by string) error { } w.Session.Queue.Stats.RLock() - fmt.Printf("\n%s %s / %s %s / %d pkts / %d errs\n\n", + fmt.Printf("\n%s (ch. %d) / %s %s / %s %s / %d pkts / %d errs\n\n", + w.Session.Interface.Name(), + network.GetInterfaceChannel(w.Session.Interface.Name()), tui.Red("↑"), humanize.Bytes(w.Session.Queue.Stats.Sent), tui.Green("↓"), diff --git a/network/net_linux.go b/network/net_linux.go index 68c758a1..13fa5b82 100644 --- a/network/net_linux.go +++ b/network/net_linux.go @@ -38,6 +38,16 @@ func getInterfaceName(iface net.Interface) string { return iface.Name } +func GetInterfaceChannel(iface string) int { + currChannelLock.Lock() + defer currChannelLock.Unlock() + + if curr, found := currChannels[iface]; found { + return curr + } + return 0 +} + func SetInterfaceChannel(iface string, channel int) error { currChannelLock.Lock() defer currChannelLock.Unlock()