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

Function getchaninfo

tools/ifconfig/ifieee80211.c:231–245  ·  view source on GitHub ↗

* Collect channel info from the kernel. We use this (mostly) * to handle mapping between frequency and IEEE channel number. */

Source from the content-addressed store, hash-verified

229 * to handle mapping between frequency and IEEE channel number.
230 */
231static void
232getchaninfo(int s)
233{
234 if (chaninfo != NULL)
235 return;
236 chaninfo = malloc(IEEE80211_CHANINFO_SIZE(MAXCHAN));
237 if (chaninfo == NULL)
238 errx(1, "no space for channel list");
239 if (get80211(s, IEEE80211_IOC_CHANINFO, chaninfo,
240 IEEE80211_CHANINFO_SIZE(MAXCHAN)) < 0)
241 err(1, "unable to get channel information");
242 ifmr = ifmedia_getstate(s);
243 gethtconf(s);
244 getvhtconf(s);
245}
246
247static struct regdata *
248getregdata(void)

Callers 7

getcurchanFunction · 0.85
getchannelFunction · 0.85
list_scanFunction · 0.85
list_stationsFunction · 0.85
list_channelsFunction · 0.85
list_txpowFunction · 0.85
list_regdomainFunction · 0.85

Calls 5

mallocFunction · 0.85
get80211Function · 0.85
ifmedia_getstateFunction · 0.85
gethtconfFunction · 0.85
getvhtconfFunction · 0.85

Tested by

no test coverage detected