* num_filter_ssids - Number of entries in filter_ssids array
*/
size_t num_filter_ssids;
+
+ /**
+ * p2p_probe - Used to disable CCK (802.11b) rates for P2P probes
+ *
+ * When set, the driver is expected to remove rates 1, 2, 5.5, and 11
+ * Mbps from the support rates element(s) in the Probe Request frames
+ * and not to transmit the frames at any of those rates.
+ */
+ u8 p2p_probe;
};
/**
struct i802_bss *bss = priv;
struct wpa_driver_nl80211_data *drv = bss->drv;
int ret = 0, timeout;
- struct nl_msg *msg, *ssids, *freqs;
+ struct nl_msg *msg, *ssids, *freqs, *rates;
size_t i;
msg = nlmsg_alloc();
ssids = nlmsg_alloc();
freqs = nlmsg_alloc();
- if (!msg || !ssids || !freqs) {
+ rates = nlmsg_alloc();
+ if (!msg || !ssids || !freqs || !rates) {
nlmsg_free(msg);
nlmsg_free(ssids);
nlmsg_free(freqs);
+ nlmsg_free(rates);
return -1;
}
nla_put_nested(msg, NL80211_ATTR_SCAN_FREQUENCIES, freqs);
}
+ if (params->p2p_probe) {
+ /*
+ * Remove 2.4 GHz rates 1, 2, 5.5, 11 Mbps from supported rates
+ * by masking out everything else apart from the OFDM rates 6,
+ * 9, 12, 18, 24, 36, 48, 54 Mbps from non-MCS rates. All 5 GHz
+ * rates are left enabled.
+ */
+ NLA_PUT(rates, NL80211_BAND_2GHZ, 8,
+ "\x0c\x12\x18\x24\x30\x48\x60\x6c");
+ nla_put_nested(msg, NL80211_ATTR_SCAN_SUPP_RATES, rates);
+ }
+
ret = send_and_recv_msgs(drv, msg, NULL, NULL);
msg = NULL;
if (ret) {
nlmsg_free(ssids);
nlmsg_free(msg);
nlmsg_free(freqs);
+ nlmsg_free(rates);
return ret;
}
p2p_scan_ie(wpa_s->global->p2p, ies);
+ params.p2p_probe = 1;
params.extra_ies = wpabuf_head(ies);
params.extra_ies_len = wpabuf_len(ies);
p2p_scan_ie(wpa_s->global->p2p, ies);
+ params.p2p_probe = 1;
params.extra_ies = wpabuf_head(ies);
params.extra_ies_len = wpabuf_len(ies);