Home | History | Annotate | Download | only in drivers

Lines Matching refs:params

310 			     struct wpa_driver_scan_params *params);
3812 struct wpa_driver_scan_params *params)
3827 if (params->num_ssids) {
3831 for (i = 0; i < params->num_ssids; i++) {
3833 params->ssids[i].ssid,
3834 params->ssids[i].ssid_len);
3835 if (nla_put(ssids, i + 1, params->ssids[i].ssid_len,
3836 params->ssids[i].ssid) < 0) {
3847 if (params->extra_ies) {
3849 params->extra_ies, params->extra_ies_len);
3850 if (nla_put(msg, NL80211_ATTR_IE, params->extra_ies_len,
3851 params->extra_ies) < 0)
3855 if (params->freqs) {
3859 for (i = 0; params->freqs[i]; i++) {
3861 "MHz", params->freqs[i]);
3862 if (nla_put_u32(freqs, i + 1, params->freqs[i]) < 0) {
3875 drv->filter_ssids = params->filter_ssids;
3876 params->filter_ssids = NULL;
3877 drv->num_filter_ssids = params->num_filter_ssids;
3890 * @params: Scan parameters
3894 struct wpa_driver_scan_params *params)
3903 msg = nl80211_scan_common(drv, NL80211_CMD_TRIGGER_SCAN, params);
3907 if (params->p2p_probe) {
3944 if (wpa_driver_nl80211_scan(bss, params)) {
3986 * @params: Scan parameters
3991 struct wpa_driver_scan_params *params,
4006 return android_pno_start(bss, params);
4009 msg = nl80211_scan_common(drv, NL80211_CMD_START_SCHED_SCAN, params);
4017 params->filter_rssi) {
4041 if (params->filter_rssi) {
4047 params->filter_rssi);
4050 params->filter_rssi);
4707 static int nl80211_set_conn_keys(struct wpa_driver_associate_params *params,
4714 if (!params->wep_key[i])
4719 if (params->wps == WPS_MODE_PRIVACY)
4721 if (params->pairwise_suite &&
4722 params->pairwise_suite != WPA_CIPHER_NONE)
4735 if (!params->wep_key[i])
4742 NLA_PUT(msg, NL80211_KEY_DATA, params->wep_key_len[i],
4743 params->wep_key[i]);
4744 if (params->wep_key_len[i] == 5)
4753 if (i == params->wep_tx_keyidx)
4832 struct wpa_driver_auth_params *params)
4836 drv->auth_freq = params->freq;
4837 drv->auth_alg = params->auth_alg;
4838 drv->auth_wep_tx_keyidx = params->wep_tx_keyidx;
4839 drv->auth_local_state_change = params->local_state_change;
4840 drv->auth_p2p = params->p2p;
4842 if (params->bssid)
4843 os_memcpy(drv->auth_bssid_, params->bssid, ETH_ALEN);
4847 if (params->ssid) {
4848 os_memcpy(drv->auth_ssid, params->ssid, params->ssid_len);
4849 drv->auth_ssid_len = params->ssid_len;
4857 if (params->ie) {
4858 drv->auth_ie = os_malloc(params->ie_len);
4860 os_memcpy(drv->auth_ie, params->ie, params->ie_len);
4861 drv->auth_ie_len = params->ie_len;
4866 if (params->wep_key[i] && params->wep_key_len[i] &&
4867 params->wep_key_len[i] <= 16) {
4868 os_memcpy(drv->auth_wep_key[i], params->wep_key[i],
4869 params->wep_key_len[i]);
4870 drv->auth_wep_key_len[i] = params->wep_key_len[i];
4878 struct i802_bss *bss, struct wpa_driver_auth_params *params)
4894 nlmode = params->p2p ?
4911 if (!params->wep_key[i])
4915 i == params->wep_tx_keyidx, NULL, 0,
4916 params->wep_key[i],
4917 params->wep_key_len[i]);
4918 if (params->wep_tx_keyidx != i)
4921 params->wep_key[i], params->wep_key_len[i])) {
4928 if (params->bssid) {
4930 MAC2STR(params->bssid));
4931 NLA_PUT(msg, NL80211_ATTR_MAC, ETH_ALEN, params->bssid);
4933 if (params->freq) {
4934 wpa_printf(MSG_DEBUG, " * freq=%d", params->freq);
4935 NLA_PUT_U32(msg, NL80211_ATTR_WIPHY_FREQ, params->freq);
4937 if (params->ssid) {
4939 params->ssid, params->ssid_len);
4940 NLA_PUT(msg, NL80211_ATTR_SSID, params->ssid_len,
4941 params->ssid);
4943 wpa_hexdump(MSG_DEBUG, " * IEs", params->ie, params->ie_len);
4944 if (params
4945 NLA_PUT(msg, NL80211_ATTR_IE, params->ie_len, params->ie);
4946 if (params->sae_data) {
4947 wpa_hexdump(MSG_DEBUG, " * SAE data", params->sae_data,
4948 params->sae_data_len);
4949 NLA_PUT(msg, NL80211_ATTR_SAE_DATA, params->sae_data_len,
4950 params->sae_data);
4952 if (params->auth_alg & WPA_AUTH_ALG_OPEN)
4954 else if (params->auth_alg & WPA_AUTH_ALG_SHARED)
4956 else if (params->auth_alg & WPA_AUTH_ALG_LEAP)
4958 else if (params->auth_alg & WPA_AUTH_ALG_FT)
4960 else if (params->auth_alg & WPA_AUTH_ALG_SAE)
4966 if (params->local_state_change) {
4978 if (ret == -EALREADY && count == 1 && params->bssid &&
4979 !params->local_state_change) {
4988 bss, params->bssid,
4994 if (ret == -ENOENT && params->freq && !is_retry) {
5006 if (params->ssid) {
5007 scan.ssids[0].ssid = params->ssid;
5008 scan.ssids[0].ssid_len = params->ssid_len;
5010 freqs[0] = params->freq;
5018 nl80211_copy_auth_params(drv, params);
5051 struct wpa_driver_auth_params params;
5057 os_memset(&params, 0, sizeof(params));
5058 params.freq = drv->auth_freq;
5059 params.auth_alg = drv->auth_alg;
5060 params.wep_tx_keyidx = drv->auth_wep_tx_keyidx;
5061 params.local_state_change = drv->auth_local_state_change;
5062 params.p2p = drv->auth_p2p;
5065 params.bssid = drv->auth_bssid_;
5068 params.ssid = drv->auth_ssid;
5069 params.ssid_len = drv->auth_ssid_len;
5072 params.ie = drv->auth_ie;
5073 params.ie_len = drv->auth_ie_len;
5077 params.wep_key[i] = drv->auth_wep_key[i];
5078 params.wep_key_len[i] = drv->auth_wep_key_len[i];
5083 return wpa_driver_nl80211_authenticate(bss, &params);
5811 struct wpa_driver_ap_params *params)
5837 params->head, params->head_len);
5838 NLA_PUT(msg, NL80211_ATTR_BEACON_HEAD, params->head_len, params->head);
5840 params->tail, params->tail_len);
5841 NLA_PUT(msg, NL80211_ATTR_BEACON_TAIL, params->tail_len, params->tail);
5844 wpa_printf(MSG_DEBUG, "nl80211: beacon_int=%d", params->beacon_int);
5845 NLA_PUT_U32(msg, NL80211_ATTR_BEACON_INTERVAL, params->beacon_int);
5846 wpa_printf(MSG_DEBUG, "nl80211: dtim_period=%d", params->dtim_period);
5847 NLA_PUT_U32(msg, NL80211_ATTR_DTIM_PERIOD, params->dtim_period);
5849 params->ssid, params->ssid_len);
5850 NLA_PUT(msg, NL80211_ATTR_SSID, params->ssid_len,
5851 params->ssid);
5852 if (params->proberesp && params->proberesp_len) {
5854 params->proberesp, params->proberesp_len);
5855 NLA_PUT(msg, NL80211_ATTR_PROBE_RESP, params->proberesp_len,
5856 params->proberesp);
5858 switch (params->hide_ssid) {
5875 wpa_printf(MSG_DEBUG, "nl80211: privacy=%d", params->privacy);
5876 if (params->privacy)
5878 wpa_printf(MSG_DEBUG, "nl80211: auth_algs=0x%x", params->auth_algs);
5879 if ((params->auth_algs & (WPA_AUTH_ALG_OPEN | WPA_AUTH_ALG_SHARED)) ==
5882 } else if (params->auth_algs & WPA_AUTH_ALG_SHARED)
5889 wpa_printf(MSG_DEBUG, "nl80211: wpa_version=0x%x", params->wpa_version);
5891 if (params->wpa_version & WPA_PROTO_WPA)
5893 if (params->wpa_version & WPA_PROTO_RSN)
5899 params->key_mgmt_suites);
5901 if (params->key_mgmt_suites & WPA_KEY_MGMT_IEEE8021X)
5903 if (params->key_mgmt_suites & WPA_KEY_MGMT_PSK)
5910 if (params->key_mgmt_suites & WPA_KEY_MGMT_IEEE8021X &&
5911 params->pairwise_ciphers & (WPA_CIPHER_WEP104 | WPA_CIPHER_WEP40))
5915 params->pairwise_ciphers);
5917 if (params->pairwise_ciphers & WPA_CIPHER_CCMP)
5919 if (params->pairwise_ciphers & WPA_CIPHER_GCMP)
5921 if (params->pairwise_ciphers & WPA_CIPHER_TKIP)
5923 if (params->pairwise_ciphers & WPA_CIPHER_WEP104)
5925 if (params->pairwise_ciphers & WPA_CIPHER_WEP40)
5933 params->group_cipher);
5934 switch (params->group_cipher) {
5957 if (params->beacon_ies) {
5959 params->beacon_ies);
5960 NLA_PUT(msg, NL80211_ATTR_IE, wpabuf_len(params->beacon_ies),
5961 wpabuf_head(params->beacon_ies));
5963 if (params->proberesp_ies) {
5965 params->proberesp_ies);
5967 wpabuf_len(params->proberesp_ies),
5968 wpabuf_head(params->proberesp_ies));
5970 if (params->assocresp_ies) {
5972 params->assocresp_ies);
5974 wpabuf_len(params->assocresp_ies),
5975 wpabuf_head(params->assocresp_ies));
5980 params->ap_max_inactivity);
5982 params->ap_max_inactivity);
5991 nl80211_set_bss(bss, params->cts_protect, params->preamble,
5992 params->short_slot_time, params->ht_opmode,
5993 params->isolate, params->basic_rates);
6101 struct hostapd_sta_add_params *params)
6109 if ((params->flags & WPA_STA_TDLS_PEER) &&
6118 params->set ? "Set" : "Add", MAC2STR(params->addr));
6119 nl80211_cmd(drv, msg, 0, params->set ? NL80211_CMD_SET_STATION :
6123 NLA_PUT(msg, NL80211_ATTR_MAC, ETH_ALEN, params->addr);
6124 NLA_PUT(msg, NL80211_ATTR_STA_SUPPORTED_RATES, params->supp_rates_len,
6125 params->supp_rates);
6126 wpa_hexdump(MSG_DEBUG, " * supported rates", params->supp_rates,
6127 params->supp_rates_len);
6128 if (!params->set) {
6129 wpa_printf(MSG_DEBUG, " * aid=%u", params->aid);
6130 NLA_PUT_U16(msg, NL80211_ATTR_STA_AID, params->aid);
6132 params->listen_interval);
6134 params->listen_interval);
6136 if (params->ht_capabilities) {
6138 (u8 *) params->ht_capabilities,
6139 sizeof(*params->ht_capabilities));
6141 sizeof(*params->ht_capabilities),
6142 params->ht_capabilities);
6145 if (params->vht_capabilities) {
6147 (u8 *) params->vht_capabilities,
6148 sizeof(*params->vht_capabilities));
6150 sizeof(*params->vht_capabilities),
6151 params->vht_capabilities);
6154 wpa_printf(MSG_DEBUG, " * capability=0x%x", params->capability);
6155 NLA_PUT_U16(msg, NL80211_ATTR_STA_CAPABILITY, params->capability);
6157 if (params->ext_capab) {
6159 params->ext_capab, params->ext_capab_len);
6161 params->ext_capab_len, params->ext_capab);
6165 upd.mask = sta_flags_nl80211(params->flags);
6171 if (params->flags & WPA_STA_WMM) {
6176 wpa_printf(MSG_DEBUG, " * qosinfo=0x%x", params->qosinfo);
6178 params->qosinfo & WMM_QOSINFO_STA_AC_MASK);
6180 (params->qosinfo >> WMM_QOSINFO_STA_SP_SHIFT) &
6190 "result: %d (%s)", params->set ? "SET" : "NEW", ret,
6999 struct wpa_driver_associate_params *params)
7003 .freq = params->freq,
7006 if (params->p2p) {
7059 struct wpa_driver_associate_params *params)
7082 if (params->ssid == NULL || params->ssid_len > sizeof(drv->ssid))
7086 params->ssid, params->ssid_len);
7087 NLA_PUT(msg, NL80211_ATTR_SSID, params->ssid_len,
7088 params->ssid);
7089 os_memcpy(drv->ssid, params->ssid, params->ssid_len);
7090 drv->ssid_len = params->ssid_len;
7092 wpa_printf(MSG_DEBUG, " * freq=%d", params->freq);
7093 NLA_PUT_U32(msg, NL80211_ATTR_WIPHY_FREQ, params->freq);
7095 ret = nl80211_set_conn_keys(params, msg);
7099 if (params->bssid && params->fixed_bssid) {
7101 MAC2STR(params->bssid));
7102 NLA_PUT(msg, NL80211_ATTR_MAC, ETH_ALEN, params->bssid);
7105 if (params->key_mgmt_suite == KEY_MGMT_802_1X ||
7106 params->key_mgmt_suite == KEY_MGMT_PSK ||
7107 params->key_mgmt_suite == KEY_MGMT_802_1X_SHA256 ||
7108 params->key_mgmt_suite == KEY_MGMT_PSK_SHA256) {
7113 if (params->wpa_ie) {
7116 params->wpa_ie, params->wpa_ie_len);
7117 NLA_PUT(msg, NL80211_ATTR_IE, params->wpa_ie_len,
7118 params->wpa_ie);
7148 struct wpa_driver_associate_params *params)
7163 if (params->bssid) {
7165 MAC2STR(params->bssid));
7166 NLA_PUT(msg, NL80211_ATTR_MAC, ETH_ALEN, params->bssid);
7168 if (params->freq) {
7169 wpa_printf(MSG_DEBUG, " * freq=%d", params->freq);
7170 NLA_PUT_U32(msg, NL80211_ATTR_WIPHY_FREQ, params->freq);
7172 if (params->bg_scan_period >= 0) {
7174 params->bg_scan_period);
7176 params->bg_scan_period);
7178 if (params->ssid) {
7180 params->ssid, params->ssid_len);
7181 NLA_PUT(msg, NL80211_ATTR_SSID, params->ssid_len,
7182 params->ssid);
7183 if (params->ssid_len > sizeof(drv->ssid))
7185 os_memcpy(drv->ssid, params->ssid, params->ssid_len);
7186 drv->ssid_len = params->ssid_len;
7188 wpa_hexdump(MSG_DEBUG, " * IEs", params->wpa_ie, params->wpa_ie_len);
7189 if (params->wpa_ie)
7190 NLA_PUT(msg, NL80211_ATTR_IE, params->wpa_ie_len,
7191 params->wpa_ie);
7194 if (params->auth_alg & WPA_AUTH_ALG_OPEN)
7196 if (params->auth_alg & WPA_AUTH_ALG_SHARED)
7198 if (params->auth_alg & WPA_AUTH_ALG_LEAP)
7206 if (params->auth_alg & WPA_AUTH_ALG_OPEN)
7208 else if (params->auth_alg & WPA_AUTH_ALG_SHARED)
7210 else if (params->auth_alg & WPA_AUTH_ALG_LEAP)
7212 else if (params->auth_alg & WPA_AUTH_ALG_FT)
7221 if (params->wpa_proto) {
7224 if (params->wpa_proto & WPA_PROTO_WPA)
7226 if (params->wpa_proto & WPA_PROTO_RSN)
7233 if (params->pairwise_suite != CIPHER_NONE) {
7236 switch (params->pairwise_suite) {
7260 if (params->group_suite != CIPHER_NONE) {
7263 switch (params->group_suite) {
7287 if (params->key_mgmt_suite == KEY_MGMT_802_1X ||
7288 params->key_mgmt_suite == KEY_MGMT_PSK ||
7289 params->key_mgmt_suite == KEY_MGMT_FT_802_1X ||
7290 params->key_mgmt_suite == KEY_MGMT_FT_PSK ||
7291 params->key_mgmt_suite == KEY_MGMT_CCKM) {
7294 switch (params->key_mgmt_suite) {
7316 if (params->mgmt_frame_protection == MGMT_FRAME_PROTECTION_REQUIRED)
7320 if (params->disable_ht)
7323 if (params->htcaps && params->htcaps_mask) {
7325 NLA_PUT(msg, NL80211_ATTR_HT_CAPABILITY, sz, params->htcaps);
7327 params->htcaps_mask);
7331 if (params->disable_vht) {
7336 if (params->vhtcaps && params->vhtcaps_mask) {
7338 NLA_PUT(msg, NL80211_ATTR_VHT_CAPABILITY, sz, params->vhtcaps);
7340 params->vhtcaps_mask);
7344 ret = nl80211_set_conn_keys(params, msg);
7367 struct wpa_driver_associate_params *params)
7369 int ret = wpa_driver_nl80211_try_connect(drv, params);
7384 ret = wpa_driver_nl80211_try_connect(drv, params);
7391 void *priv, struct wpa_driver_associate_params *params)
7398 if (params->mode == IEEE80211_MODE_AP)
7399 return wpa_driver_nl80211_ap(drv, params);
7401 if (params->mode == IEEE80211_MODE_IBSS)
7402 return wpa_driver_nl80211_ibss(drv, params);
7405 enum nl80211_iftype nlmode = params->p2p ?
7410 return wpa_driver_nl80211_connect(drv, params);
7424 if (params->bssid) {
7426 MAC2STR(params->bssid));
7427 NLA_PUT(msg, NL80211_ATTR_MAC, ETH_ALEN, params->bssid);
7429 if (params->freq) {
7430 wpa_printf(MSG_DEBUG, " * freq=%d", params->freq);
7431 NLA_PUT_U32(msg, NL80211_ATTR_WIPHY_FREQ, params->freq);
7432 drv->assoc_freq = params->freq;
7435 if (params->bg_scan_period >= 0) {
7437 params->bg_scan_period);
7439 params->bg_scan_period);
7441 if (params->ssid) {
7443 params->ssid, params->ssid_len);
7444 NLA_PUT(msg, NL80211_ATTR_SSID, params->ssid_len,
7445 params->ssid);
7446 if (params->ssid_len > sizeof(drv->ssid))
7448 os_memcpy(drv->ssid, params->ssid, params->ssid_len);
7449 drv->ssid_len = params->ssid_len;
7451 wpa_hexdump(MSG_DEBUG, " * IEs", params->wpa_ie, params->wpa_ie_len);
7452 if (params->wpa_ie)
7453 NLA_PUT(msg, NL80211_ATTR_IE, params->wpa_ie_len,
7454 params->wpa_ie);
7456 if (params->pairwise_suite != CIPHER_NONE) {
7459 switch (params->pairwise_suite) {
7481 if (params->group_suite != CIPHER_NONE) {
7484 switch (params->group_suite) {
7507 if (params->mgmt_frame_protection == MGMT_FRAME_PROTECTION_REQUIRED)
7513 if (params->prev_bssid) {
7515 MAC2STR(params->prev_bssid));
7517 params->prev_bssid);
7520 if (params->disable_ht)
7523 if (params->htcaps && params->htcaps_mask) {
7525 NLA_PUT(msg, NL80211_ATTR_HT_CAPABILITY, sz, params->htcaps);
7527 params->htcaps_mask);
7531 if (params->disable_vht) {
7536 if (params->vhtcaps && params->vhtcaps_mask) {
7538 NLA_PUT(msg, NL80211_ATTR_VHT_CAPABILITY, sz, params->vhtcaps);
7540 params->vhtcaps_mask);
7544 if (params->p2p)
8002 struct nlattr *txq, *params;
8017 params = nla_nest_start(msg, 1);
8018 if (!params)
8042 nla_nest_end(msg, params);
8337 struct wpa_init_params *params)
8346 bss = wpa_driver_nl80211_init(hapd, params->ifname,
8347 params->global_priv);
8355 if (linux_br_get(brname, params->ifname) == 0) {
8357 params->ifname, brname);
8366 for (i = 0; i < params->num_bridge; i++) {
8367 if (params->bridge[i]) {
8368 ifindex = if_nametoindex(params->bridge[i]);
8376 (params->num_bridge == 0 || !params->bridge[0]))
8385 if (params->bssid) {
8387 params->bssid))
8397 if (params->num_bridge && params->bridge[0] &&
8398 i802_check_bridge(drv, bss, params->bridge[0], params->ifname) < 0)
8417 params->own_addr))
8420 memcpy(bss->addr, params->own_addr, ETH_ALEN);
9620 struct wpa_driver_scan_params *params)
9635 while (i < WEXT_PNO_AMOUNT && (size_t) i < params->num_ssids) {
9642 params->ssids[i].ssid,
9643 params->ssids[i].ssid_len);
9645 buf[bp++] = params->ssids[i].ssid_len;
9646 os_memcpy(&buf[bp], params->ssids[i].ssid,
9647 params->ssids[i].ssid_len);
9648 bp += params->ssids[i].ssid_len;
9712 struct wpa_driver_scan_params *params)
9715 return wpa_driver_nl80211_scan(bss, params);
9728 struct wpa_driver_auth_params *params)
9731 return wpa_driver_nl80211_authenticate(bss, params);