MCPcopy Create free account
hub / github.com/F-Stack/f-stack / getcurchan

Function getcurchan

tools/ifconfig/ifieee80211.c:389–404  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

387}
388
389static const struct ieee80211_channel *
390getcurchan(int s)
391{
392 if (gotcurchan)
393 return &curchan;
394 if (get80211(s, IEEE80211_IOC_CURCHAN, &curchan, sizeof(curchan)) < 0) {
395 int val;
396 /* fall back to legacy ioctl */
397 if (get80211val(s, IEEE80211_IOC_CHANNEL, &val) < 0)
398 err(-1, "cannot figure out current channel");
399 getchaninfo(s);
400 mapchan(&curchan, val, 0);
401 }
402 gotcurchan = 1;
403 return &curchan;
404}
405
406static enum ieee80211_phymode
407chan2mode(const struct ieee80211_channel *c)

Callers 2

ifieee80211.cFile · 0.85
ieee80211_statusFunction · 0.85

Calls 4

get80211Function · 0.85
get80211valFunction · 0.85
getchaninfoFunction · 0.85
mapchanFunction · 0.85

Tested by

no test coverage detected