| 5746 | }; |
| 5747 | |
| 5748 | static void |
| 5749 | wlan_create(int s, struct ifreq *ifr) |
| 5750 | { |
| 5751 | static const uint8_t zerobssid[IEEE80211_ADDR_LEN]; |
| 5752 | char orig_name[IFNAMSIZ]; |
| 5753 | |
| 5754 | if (params.icp_parent[0] == '\0') |
| 5755 | errx(1, "must specify a parent device (wlandev) when creating " |
| 5756 | "a wlan device"); |
| 5757 | if (params.icp_opmode == IEEE80211_M_WDS && |
| 5758 | memcmp(params.icp_bssid, zerobssid, sizeof(zerobssid)) == 0) |
| 5759 | errx(1, "no bssid specified for WDS (use wlanbssid)"); |
| 5760 | ifr->ifr_data = (caddr_t) ¶ms; |
| 5761 | ioctl_ifcreate(s, ifr); |
| 5762 | |
| 5763 | /* XXX preserve original name for ifclonecreate(). */ |
| 5764 | strlcpy(orig_name, name, sizeof(orig_name)); |
| 5765 | strlcpy(name, ifr->ifr_name, sizeof(name)); |
| 5766 | |
| 5767 | setdefregdomain(s); |
| 5768 | |
| 5769 | strlcpy(name, orig_name, sizeof(name)); |
| 5770 | } |
| 5771 | |
| 5772 | static |
| 5773 | DECL_CMD_FUNC(set80211clone_wlandev, arg, d) |
nothing calls this directly
no test coverage detected