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

Function mapfreq

tools/ifconfig/ifieee80211.c:349–367  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

347}
348
349static void
350mapfreq(struct ieee80211_channel *chan, int freq, int flags)
351{
352 u_int i;
353
354 for (i = 0; i < chaninfo->ic_nchans; i++) {
355 const struct ieee80211_channel *c = &chaninfo->ic_chans[i];
356
357 if (c->ic_freq == freq && (c->ic_flags & flags) == flags) {
358 if (flags == 0) {
359 /* when ambiguous promote to ``best'' */
360 c = &chaninfo->ic_chans[promote(i)];
361 }
362 *chan = *c;
363 return;
364 }
365 }
366 errx(1, "unknown/undefined frequency %u/0x%x", freq, flags);
367}
368
369static void
370mapchan(struct ieee80211_channel *chan, int ieee, int flags)

Callers 3

ieee80211_mhz2ieeeFunction · 0.85
getchannelflagsFunction · 0.85
getchannelFunction · 0.85

Calls 1

promoteFunction · 0.85

Tested by

no test coverage detected