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

Function mapchan

tools/ifconfig/ifieee80211.c:369–387  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

367}
368
369static void
370mapchan(struct ieee80211_channel *chan, int ieee, int flags)
371{
372 u_int i;
373
374 for (i = 0; i < chaninfo->ic_nchans; i++) {
375 const struct ieee80211_channel *c = &chaninfo->ic_chans[i];
376
377 if (c->ic_ieee == ieee && (c->ic_flags & flags) == flags) {
378 if (flags == 0) {
379 /* when ambiguous promote to ``best'' */
380 c = &chaninfo->ic_chans[promote(i)];
381 }
382 *chan = *c;
383 return;
384 }
385 }
386 errx(1, "unknown/undefined channel number %d flags 0x%x", ieee, flags);
387}
388
389static const struct ieee80211_channel *
390getcurchan(int s)

Callers 3

getcurchanFunction · 0.85
getchannelflagsFunction · 0.85
getchannelFunction · 0.85

Calls 1

promoteFunction · 0.85

Tested by

no test coverage detected