Lines Matching defs:wif

78 static int	wlan_config_get_dchannel(struct wlan_iface *wif);
79 static int wlan_config_set_dchannel(struct wlan_iface *wif, uint32_t);
210 wlan_get_opmode(struct wlan_iface *wif)
215 strlcpy(ifmr.ifm_name, wif->wname, sizeof(ifmr.ifm_name));
220 wif->mode = WlanIfaceOperatingModeType_station;
226 wif->mode = WlanIfaceOperatingModeType_adhocDemo;
228 wif->mode = WlanIfaceOperatingModeType_ibss;
230 wif->mode = WlanIfaceOperatingModeType_hostAp;
232 wif->mode = WlanIfaceOperatingModeType_monitor;
234 wif->mode = WlanIfaceOperatingModeType_meshPoint;
236 wif->mode = WlanIfaceOperatingModeType_wds;
242 wlan_config_state(struct wlan_iface *wif, uint8_t set)
248 strcpy(ifr.ifr_name, wif->wname);
252 "failed: %s", wif->wname, strerror(errno));
258 wif->state = wlanIfaceState_up;
260 wif->state = wlanIfaceState_down;
266 if (wif->state == wlanIfaceState_up)
275 wif->wname, wif->state == wlanIfaceState_up?"up":"down",
284 wlan_get_local_addr(struct wlan_iface *wif)
307 if (strcmp(wif->wname, ifname) == 0)
316 wlan_get_parent(struct wlan_iface *wif __unused)
486 wlan_get_driver_caps(struct wlan_iface *wif)
495 if (wlan_ioctl(wif->wname, IEEE80211_IOC_DEVCAPS, &val, &dc,
499 wif->drivercaps = wlan_drivercaps_to_snmp(dc.dc_drivercaps);
500 wif->cryptocaps = wlan_cryptocaps_to_snmp(dc.dc_cryptocaps);
501 wif->htcaps = wlan_htcaps_to_snmp(dc.dc_htcaps);
503 WLAN_SET_TDMA_OPMODE(wif);
506 wif->chanlist = (struct ieee80211_channel *)malloc(argsize);
507 if (wif->chanlist == NULL)
510 memcpy(wif->chanlist, dc.dc_chaninfo.ic_chans, argsize);
511 wif->nchannels = dc.dc_chaninfo.ic_nchans;
585 wlan_get_channel_list(struct wlan_iface *wif)
600 if (wlan_ioctl(wif->wname, IEEE80211_IOC_CHANINFO, &val, chaninfo,
605 if (wlan_ioctl(wif->wname, IEEE80211_IOC_CHANLIST, &val, &active,
615 wif->chanlist = (struct ieee80211_channel *)reallocf(wif->chanlist,
617 if (wif->chanlist == NULL)
619 wif->nchannels = nchans;
624 memcpy(wif->chanlist + nchans, c, sizeof (*c));
631 wif->nchannels = 0;
666 wlan_get_roam_params(struct wlan_iface *wif)
672 if (wlan_ioctl(wif->wname, IEEE80211_IOC_ROAM, &val,
673 &wif->roamparams, &argsize, 0) < 0)
680 wlan_get_tx_params(struct wlan_iface *wif)
690 if (wlan_ioctl(wif->wname, IEEE80211_IOC_TXPARAMS, &val,
691 &wif->txparams, &argsize, 0) < 0)
698 wlan_set_tx_params(struct wlan_iface *wif, int32_t pmode __unused)
708 if (wlan_ioctl(wif->wname, IEEE80211_IOC_TXPARAMS, &val,
709 &wif->txparams, &argsize, 1) < 0)
716 wlan_clone_create(struct wlan_iface *wif)
726 if (wif == NULL || wif->pname[0] == '\0' || wif->mode > WLAN_IFMODE_MAX)
729 if (wif->mode == WlanIfaceOperatingModeType_wds &&
730 memcmp(wif->dbssid, zerobssid, IEEE80211_ADDR_LEN) == 0)
733 strlcpy(wcp.icp_parent, wif->pname, IFNAMSIZ);
734 if ((wif->flags & WlanIfaceFlagsType_uniqueBssid) != 0)
736 if ((wif->flags & WlanIfaceFlagsType_noBeacons) != 0)
738 if (wif->mode == WlanIfaceOperatingModeType_wds &&
739 (wif->flags & WlanIfaceFlagsType_wdsLegacy) != 0)
742 switch (wif->mode) {
770 memcpy(wcp.icp_bssid, wif->dbssid, IEEE80211_ADDR_LEN);
771 if (memcmp(wif->dlmac, zerobssid, IEEE80211_ADDR_LEN) != 0) {
772 memcpy(wcp.icp_macaddr, wif->dlmac, IEEE80211_ADDR_LEN);
776 strlcpy(ifr.ifr_name, wif->wname, IFNAMSIZ);
789 wlan_clone_destroy(struct wlan_iface *wif)
793 if (wif == NULL)
797 strcpy(ifr.ifr_name, wif->wname);
1092 wlan_config_get_country(struct wlan_iface *wif)
1101 if (wlan_ioctl(wif->wname, IEEE80211_IOC_REGDOMAIN, &val, &regdomain,
1105 wif->reg_domain = wlan_regdomain_to_snmp(regdomain.regdomain);
1106 wif->country_code[0] = regdomain.isocc[0];
1107 wif->country_code[1] = regdomain.isocc[1];
1108 wif->country_code[2] = regdomain.location;
1114 wlan_config_set_country(struct wlan_iface *wif, char *ccode, int rdomain)
1121 if (wlan_get_channel_list(wif) < 0)
1124 if (wif->nchannels == 0) {
1125 syslog(LOG_ERR, "iface %s - set regdomain failed", wif->wname);
1129 if (wlan_ioctl(wif->wname, IEEE80211_IOC_TXPOWMAX, &txpowermax, 0,
1133 regdomain = malloc(IEEE80211_REGDOMAIN_SIZE(wif->nchannels));
1136 memset(regdomain, 0, IEEE80211_REGDOMAIN_SIZE(wif->nchannels));
1137 argsize = IEEE80211_REGDOMAIN_SIZE(wif->nchannels);
1146 regdomain->chaninfo.ic_nchans = wif->nchannels;
1147 memcpy(regdomain->chaninfo.ic_chans, wif->chanlist,
1148 wif->nchannels * sizeof(struct ieee80211_channel));
1149 for (i = 0; i < wif->nchannels; i++)
1152 wif->state = wlanIfaceState_down;
1153 if (wlan_config_state(wif, 1) < 0 ||
1154 wlan_ioctl(wif->wname, IEEE80211_IOC_REGDOMAIN, &val, regdomain,
1160 wif->state = wlanIfaceState_up;
1161 (void)wlan_config_state(wif, 1);
1162 wif->reg_domain = wlan_regdomain_to_snmp(regdomain->rd.regdomain);
1163 wif->country_code[0] = regdomain->rd.isocc[0];
1164 wif->country_code[1] = regdomain->rd.isocc[1];
1165 wif->country_code[2] = regdomain->rd.location;
1172 wlan_config_get_dssid(struct wlan_iface *wif)
1180 if (wlan_ioctl(wif->wname,
1181 (wif->mode == WlanIfaceOperatingModeType_meshPoint) ?
1188 memcpy(wif->desired_ssid, ssid, argsize);
1189 wif->desired_ssid[argsize] = '\0';
1195 wlan_config_set_dssid(struct wlan_iface *wif, char *ssid, int slen)
1200 if (wlan_ioctl(wif->wname,
1201 (wif->mode == WlanIfaceOperatingModeType_meshPoint) ?
1208 memcpy(wif->desired_ssid, ssid, argsize);
1209 wif->desired_ssid[argsize] = '\0';
1215 wlan_config_get_dchannel(struct wlan_iface *wif)
1222 if (wlan_get_channel_list(wif) < 0)
1226 if (wlan_ioctl(wif->wname, IEEE80211_IOC_CURCHAN, &val, &chan,
1230 for (i = 0; i < wif->nchannels; i++)
1231 if (chan.ic_ieee == wif->chanlist[i].ic_ieee &&
1232 chan.ic_flags == wif->chanlist[i].ic_flags) {
1233 wif->desired_channel = i + 1;
1241 wlan_config_set_dchannel(struct wlan_iface *wif, uint32_t dchannel)
1247 if (wlan_get_channel_list(wif) < 0)
1250 if (dchannel > wif->nchannels)
1253 memcpy(&chan, wif->chanlist + dchannel - 1, sizeof(chan));
1254 if (wlan_ioctl(wif->wname, IEEE80211_IOC_CURCHAN, &val, &chan,
1258 wif->desired_channel = dchannel;
1264 wlan_config_get_bssid(struct wlan_iface *wif)
1272 if (wlan_ioctl(wif->wname, IEEE80211_IOC_BSSID, &val, bssid,
1276 memcpy(wif->desired_bssid, bssid, IEEE80211_ADDR_LEN);
1282 wlan_config_set_bssid(struct wlan_iface *wif, uint8_t *bssid)
1287 if (wlan_ioctl(wif->wname, IEEE80211_IOC_BSSID, &val, bssid,
1291 memcpy(wif->desired_bssid, bssid, IEEE80211_ADDR_LEN);
1301 wlan_config_set_snmp_intval(struct wlan_iface *wif, int op, int val)
1306 wif->packet_burst = TruthValue_false;
1308 wif->packet_burst = TruthValue_true;
1312 wif->dyn_frequency = TruthValue_false;
1314 wif->dyn_frequency = TruthValue_true;
1318 wif->fast_frames = TruthValue_false;
1320 wif->fast_frames = TruthValue_true;
1324 wif->dturbo = TruthValue_false;
1326 wif->dturbo = TruthValue_true;
1329 wif->tx_power = val / 2;
1332 wif->frag_threshold = val;
1335 wif->rts_threshold = val;
1339 wif->priv_subscribe = TruthValue_false;
1341 wif->priv_subscribe = TruthValue_true;
1345 wif->bg_scan = TruthValue_false;
1347 wif->bg_scan = TruthValue_true;
1350 wif->bg_scan_idle = val;
1353 wif->bg_scan_interval = val;
1356 wif->beacons_missed = val;
1361 wif->roam_mode = wlanIfaceRoamingMode_device;
1364 wif->roam_mode = wlanIfaceRoamingMode_manual;
1369 wif->roam_mode = wlanIfaceRoamingMode_auto;
1375 wif->dot11d = TruthValue_false;
1377 wif->dot11d = TruthValue_true;
1381 wif->dot11h = TruthValue_false;
1383 wif->dot11h = TruthValue_true;
1387 wif->dynamic_wds = TruthValue_false;
1389 wif->dynamic_wds = TruthValue_true;
1393 wif->power_save = TruthValue_false;
1395 wif->power_save = TruthValue_true;
1399 wif->ap_bridge = TruthValue_false;
1401 wif->ap_bridge = TruthValue_true;
1404 wif->beacon_interval = val;
1407 wif->dtim_period = val;
1411 wif->hide_ssid = TruthValue_false;
1413 wif->hide_ssid = TruthValue_true;
1417 wif->inact_process = TruthValue_false;
1419 wif->inact_process = TruthValue_true;
1424 wif->do11g_protect = wlanIfaceDot11gProtMode_cts;
1427 wif->do11g_protect = wlanIfaceDot11gProtMode_rtscts;
1432 wif->do11g_protect = wlanIfaceDot11gProtMode_off;
1438 wif->dot11g_pure = TruthValue_false;
1440 wif->dot11g_pure = TruthValue_true;
1444 wif->dot11n_pure = TruthValue_false;
1446 wif->dot11n_pure = TruthValue_true;
1451 wif->ampdu = WlanIfaceDot11nPduType_disabled;
1454 wif->ampdu = WlanIfaceDot11nPduType_txOnly;
1457 wif->ampdu = WlanIfaceDot11nPduType_rxOnly;
1462 wif->ampdu = WlanIfaceDot11nPduType_txAndRx;
1469 wif->ampdu_density = 25;
1472 wif->ampdu_density = 50;
1475 wif->ampdu_density = 100;
1478 wif->ampdu_density = 200;
1481 wif->ampdu_density = 400;
1484 wif->ampdu_density = 800;
1487 wif->ampdu_density = 1600;
1491 wif->ampdu_density = 0;
1498 wif->ampdu_limit = 8192;
1501 wif->ampdu_limit = 16384;
1504 wif->ampdu_limit = 32768;
1508 wif->ampdu_limit = 65536;
1515 wif->amsdu = WlanIfaceDot11nPduType_disabled;
1518 wif->amsdu = WlanIfaceDot11nPduType_txOnly;
1521 wif->amsdu = WlanIfaceDot11nPduType_txAndRx;
1526 wif->amsdu = WlanIfaceDot11nPduType_rxOnly;
1531 wif->amsdu_limit = val;
1535 wif->ht_enabled = TruthValue_false;
1537 wif->ht_enabled = TruthValue_true;
1541 wif->ht_compatible = TruthValue_false;
1543 wif->ht_compatible = TruthValue_true;
1547 wif->ht_prot_mode = wlanIfaceDot11nHTProtMode_rts;
1549 wif->ht_prot_mode = wlanIfaceDot11nHTProtMode_off;
1553 wif->rifs = TruthValue_false;
1555 wif->rifs = TruthValue_true;
1559 wif->short_gi = TruthValue_false;
1561 wif->short_gi = TruthValue_true;
1566 wif->smps_mode = wlanIfaceDot11nSMPSMode_dynamic;
1569 wif->smps_mode = wlanIfaceDot11nSMPSMode_static;
1574 wif->smps_mode = wlanIfaceDot11nSMPSMode_disabled;
1579 wif->tdma_slot = val;
1582 wif->tdma_slot_count = val;
1585 wif->tdma_slot_length = val;
1588 wif->tdma_binterval = val;
1858 wlan_config_check(struct wlan_iface *wif, int op)
1862 if ((wif->drivercaps & (0x1 << WlanDriverCaps_burst)) == 0) {
1863 wif->packet_burst = TruthValue_false;
1868 if ((wif->drivercaps & (0x1 << WlanDriverCaps_dfs)) == 0) {
1869 wif->dyn_frequency = TruthValue_false;
1874 if ((wif->drivercaps & (0x1 << WlanDriverCaps_athFastFrames))
1876 wif->fast_frames = TruthValue_false;
1881 if ((wif->drivercaps & (0x1 << WlanDriverCaps_athTurbo)) == 0) {
1882 wif->dturbo = TruthValue_false;
1887 if ((wif->drivercaps & (0x1 << WlanDriverCaps_txPmgt)) == 0) {
1888 wif->tx_power = 0;
1893 if ((wif->drivercaps & (0x1 << WlanDriverCaps_txFrag)) == 0) {
1894 wif->frag_threshold = IEEE80211_FRAG_MAX;
1899 if ((wif->drivercaps & (0x1 << WlanDriverCaps_wds)) == 0) {
1900 wif->dynamic_wds = TruthValue_false;
1905 if ((wif->drivercaps & (0x1 << WlanDriverCaps_pmgt)) == 0) {
1906 wif->power_save = TruthValue_false;
1911 if (wif->mode != WlanIfaceOperatingModeType_hostAp &&
1912 wif->mode != WlanIfaceOperatingModeType_meshPoint &&
1913 wif->mode != WlanIfaceOperatingModeType_ibss) {
1914 wif->beacon_interval = 100; /* XXX */
1919 if (wif->mode != WlanIfaceOperatingModeType_hostAp &&
1920 wif->mode != WlanIfaceOperatingModeType_meshPoint &&
1921 wif->mode != WlanIfaceOperatingModeType_ibss) {
1922 wif->dtim_period = 1; /* XXX */
1927 if ((wif->htcaps & (0x1 << WlanHTCaps_htcHt)) == 0) {
1928 wif->dot11n_pure = TruthValue_false;
1933 if ((wif->htcaps & (0x1 << WlanHTCaps_htcAmpdu)) == 0) {
1934 wif->ampdu = WlanIfaceDot11nPduType_disabled;
1939 if ((wif->htcaps & (0x1 << WlanHTCaps_htcAmsdu)) == 0) {
1940 wif->amsdu = WlanIfaceDot11nPduType_disabled;
1945 if ((wif->htcaps & (0x1 << WlanHTCaps_htcRifs)) == 0) {
1946 wif->rifs = TruthValue_false;
1951 if ((wif->htcaps & (0x1 << WlanHTCaps_shortGi20 |
1953 wif->short_gi = TruthValue_false;
1958 if ((wif->htcaps & (0x1 << WlanHTCaps_htcSmps)) == 0) {
1959 wif->smps_mode = wlanIfaceDot11nSMPSMode_disabled;
1964 if ((wif->drivercaps & (0x1 << WlanDriverCaps_tdma)) == 0) {
1965 wif->tdma_slot = 0;
1970 if ((wif->drivercaps & (0x1 << WlanDriverCaps_tdma)) == 0) {
1971 wif->tdma_slot_count = 0;
1976 if ((wif->drivercaps & (0x1 << WlanDriverCaps_tdma)) == 0) {
1977 wif->tdma_slot_length = 0;
1982 if ((wif->drivercaps & (0x1 << WlanDriverCaps_tdma)) == 0) {
1983 wif->tdma_binterval = 0;
1995 wlan_config_get_intval(struct wlan_iface *wif, int op)
2000 if (wlan_config_check(wif, op) < 0)
2002 if (wlan_ioctl(wif->wname, op, &val, NULL, &argsize, 0) < 0)
2004 wlan_config_set_snmp_intval(wif, op, val);
2010 wlan_config_set_intval(struct wlan_iface *wif, int op, int sval)
2015 if (wlan_config_check(wif, op) < 0)
2019 if (wlan_ioctl(wif->wname, op, &val, NULL, &argsize, 1) < 0)
2021 wlan_config_set_snmp_intval(wif, op, val);
2027 wlan_config_get_ioctl(struct wlan_iface *wif, int which)
2035 return (wlan_config_get_country(wif));
2037 return (wlan_config_get_dssid(wif));
2039 return (wlan_config_get_dchannel(wif));
2041 return (wlan_config_get_bssid(wif));
2044 return (wlan_config_get_intval(wif, op));
2051 wlan_config_set_ioctl(struct wlan_iface *wif, int which, int val,
2058 return (wlan_config_set_country(wif, strval,
2059 wif->reg_domain));
2061 return (wlan_config_set_country(wif, wif->country_code,
2064 return (wlan_config_set_dssid(wif, strval, len));
2066 return (wlan_config_set_dchannel(wif, val));
2068 return (wlan_config_set_bssid(wif, strval));
2071 return (wlan_config_set_intval(wif, op, val));
2105 wlan_set_scan_config(struct wlan_iface *wif)
2114 sr.sr_flags = wlan_snmp_to_scan_flags(wif->scan_flags);
2116 sr.sr_duration = wif->scan_duration;
2117 sr.sr_mindwell = wif->scan_mindwell;
2118 sr.sr_maxdwell = wif->scan_maxdwell;
2121 if (wlan_ioctl(wif->wname, IEEE80211_IOC_SCAN_REQ,
2125 wif->scan_status = wlanScanConfigStatus_running;
2161 wlan_add_new_scan_result(struct wlan_iface *wif,
2176 if (wlan_scan_add_result(wif, sr) < 0) {
2185 wlan_get_scan_results(struct wlan_iface *wif)
2195 if (wlan_ioctl(wif->wname, IEEE80211_IOC_SCAN_RESULTS, &val, &buf,
2218 (void)wlan_add_new_scan_result(wif, &isr, ssid);
2227 wlan_get_stats(struct wlan_iface *wif)
2232 strlcpy(ifr.ifr_name, wif->wname, IFNAMSIZ);
2234 ifr.ifr_data = (caddr_t) &wif->stats;
2238 wif->wname, strerror(errno));
2246 wlan_get_wepmode(struct wlan_iface *wif)
2251 if (wlan_ioctl(wif->wname, IEEE80211_IOC_WEP, &val, NULL,
2253 wif->wepsupported = 0; /* XXX */
2254 wif->wepmode = wlanWepMode_off;
2255 wif->weptxkey = 0;
2259 wif->wepsupported = 1;
2263 wif->wepmode = wlanWepMode_on;
2266 wif->wepmode = wlanWepMode_mixed;
2271 wif->wepmode = wlanWepMode_off;
2279 wlan_set_wepmode(struct wlan_iface *wif)
2284 if (!wif->wepsupported)
2287 switch (wif->wepmode) {
2301 if (wlan_ioctl(wif->wname, IEEE80211_IOC_WEP, &val, NULL,
2309 wlan_get_weptxkey(struct wlan_iface *wif)
2314 if (!wif->wepsupported)
2317 if (wlan_ioctl(wif->wname, IEEE80211_IOC_WEPTXKEY, &val, NULL,
2322 wif->weptxkey = 0;
2324 wif->weptxkey = val + 1;
2330 wlan_set_weptxkey(struct wlan_iface *wif)
2335 if (!wif->wepsupported)
2338 if (wif->weptxkey >= IEEE80211_WEP_NKID)
2341 if (wif->weptxkey == 0)
2344 val = wif->weptxkey - 1;
2345 if (wlan_ioctl(wif->wname, IEEE80211_IOC_WEPTXKEY, &val, NULL,
2353 wlan_get_wepkeys(struct wlan_iface *wif __unused)
2360 wlan_set_wepkeys(struct wlan_iface *wif __unused)
2367 wlan_get_mac_policy(struct wlan_iface *wif)
2374 strlcpy(ireq.i_name, wif->wname, IFNAMSIZ);
2381 "failed: %s", wif->wname, ireq.i_type,
2383 wif->macsupported = 0;
2386 wif->macsupported = 1;
2387 wif->mac_policy = wlanMACAccessControlPolicy_open;
2393 wif->macsupported = 1;
2397 wif->mac_policy = wlanMACAccessControlPolicy_allow;
2400 wif->mac_policy = wlanMACAccessControlPolicy_deny;
2403 wif->mac_policy = wlanMACAccessControlPolicy_radius;
2408 wif->mac_policy = wlanMACAccessControlPolicy_open;
2414 if (wlan_ioctl(wif->wname, IEEE80211_IOC_MACCMD, &val, NULL,
2418 wif->mac_nacls = argsize / sizeof(struct ieee80211req_maclist *);
2423 wlan_set_mac_policy(struct wlan_iface *wif)
2428 if (!wif->macsupported)
2431 switch (wif->mac_policy) {
2448 if (wlan_ioctl(wif->wname, IEEE80211_IOC_MACCMD, &val, NULL,
2456 wlan_flush_mac_mac(struct wlan_iface *wif)
2461 if (wlan_ioctl(wif->wname, IEEE80211_IOC_MACCMD, &val, NULL,
2469 wlan_add_mac_macinfo(struct wlan_iface *wif,
2478 if (wlan_mac_add_mac(wif, mmac) < 0) {
2487 wlan_get_mac_acl_macs(struct wlan_iface *wif)
2495 if (wif->mac_policy == wlanMACAccessControlPolicy_radius) {
2496 wif->mac_nacls = 0;
2501 strlcpy(ireq.i_name, wif->wname, IFNAMSIZ);
2509 "failed: %s", wif->wname, ireq.i_type,
2511 wif->macsupported = 0;
2517 wif->mac_nacls = 0;
2524 if (wlan_ioctl(wif->wname, IEEE80211_IOC_MACCMD, &val, data,
2531 (void)wlan_add_mac_macinfo(wif, acllist + i);
2533 wif->mac_nacls = nacls;
2538 wlan_add_mac_acl_mac(struct wlan_iface *wif, struct wlan_mac_mac *mmac)
2544 if (wlan_ioctl(wif->wname, IEEE80211_IOC_ADDMAC, &val,
2551 if (wif->mac_policy != wlanMACAccessControlPolicy_deny)
2560 if (wlan_ioctl(wif->wname, IEEE80211_IOC_MLME, &val, &mlme,
2568 wlan_del_mac_acl_mac(struct wlan_iface *wif, struct wlan_mac_mac *mmac)
2574 if (wlan_ioctl(wif->wname, IEEE80211_IOC_DELMAC, &val,
2581 if (wif->mac_policy != wlanMACAccessControlPolicy_allow)
2590 if (wlan_ioctl(wif->wname, IEEE80211_IOC_MLME, &val, &mlme,
2598 wlan_peer_set_vlan(struct wlan_iface *wif, struct wlan_peer *wip, int vlan)
2608 if (wlan_ioctl(wif->wname, IEEE80211_IOC_STA_VLAN,
2712 wlan_get_peerinfo(struct wlan_iface *wif)
2728 if (wlan_ioctl(wif->wname, IEEE80211_IOC_STA_INFO,
2739 wlan_add_peer(wif, wip) < 0)
2871 wlan_mesh_config_get(struct wlan_iface *wif, int which)
2903 if (wlan_ioctl(wif->wname, op, &val, pd, &argsize, 0) < 0)
2908 wif->mesh_ttl = val;
2912 wif->mesh_peering = wlanMeshPeeringEnabled_true;
2914 wif->mesh_peering = wlanMeshPeeringEnabled_false;
2918 wif->mesh_forwarding = wlanMeshForwardingEnabled_true;
2920 wif->mesh_forwarding = wlanMeshForwardingEnabled_false;
2925 wif->mesh_metric = wlanMeshMetric_airtime;
2927 wif->mesh_metric = wlanMeshMetric_unknown;
2932 wif->mesh_path = wlanMeshPath_hwmp;
2934 wif->mesh_path = wlanMeshPath_unknown;
2941 wlan_mesh_config_set(struct wlan_iface *wif, int which)
2950 val = wif->mesh_ttl;
2954 if (wif->mesh_peering == wlanMeshPeeringEnabled_true)
2958 if (wif->mesh_forwarding == wlanMeshForwardingEnabled_true)
2964 if (wif->mesh_metric == wlanMeshMetric_airtime)
2973 if (wif->mesh_path == wlanMeshPath_hwmp)
2984 if (wlan_ioctl(wif->wname, op, &val, pd, &argsize, 1) < 0)
2991 wlan_mesh_flush_routes(struct wlan_iface *wif)
2996 if (wlan_ioctl(wif->wname, IEEE80211_IOC_MESH_RTCMD, &val, NULL,
3004 wlan_mesh_add_route(struct wlan_iface *wif, struct wlan_mesh_route *wmr)
3009 if (wlan_ioctl(wif->wname, IEEE80211_IOC_MESH_RTCMD, &val,
3019 wlan_mesh_del_route(struct wlan_iface *wif, struct wlan_mesh_route *wmr)
3024 if (wlan_ioctl(wif->wname, IEEE80211_IOC_MESH_RTCMD, &val,
3034 wlan_mesh_get_routelist(struct wlan_iface *wif)
3043 if (wlan_ioctl(wif->wname, IEEE80211_IOC_MESH_RTCMD, &val, routes,
3054 if (wlan_mesh_add_rtentry(wif, wmr) < 0)
3062 wlan_hwmp_config_get(struct wlan_iface *wif, int which)
3078 if (wlan_ioctl(wif->wname, op, &val, NULL, &argsize, 0) < 0)
3085 wif->hwmp_root_mode = wlanHWMPRootMode_normal;
3088 wif->hwmp_root_mode = wlanHWMPRootMode_proactive;
3091 wif->hwmp_root_mode = wlanHWMPRootMode_rann;
3095 wif->hwmp_root_mode = wlanHWMPRootMode_disabled;
3100 wif->hwmp_max_hops = val;
3108 wlan_hwmp_config_set(struct wlan_iface *wif, int which)
3116 switch (wif->hwmp_root_mode) {
3135 val = wif->hwmp_max_hops;
3141 if (wlan_ioctl(wif->wname, op, &val, NULL, &argsize, 1) < 0)