P2P: Send response frame on channel where the request is received
The rx_freq of Public Action frame was not maintained by the GO and the
GO always sent the response on the operating channel. This causes
provision discovery failure when a P2P Device is sending a PD Request on
a 2.4 GHz social channel and the GO is responding on a 5 GHz operating
channel.
Save the rx_freq and use it for GO to sent the response. This extends
commit c5cc7a59ac
("Report offchannel RX frame frequency to hostapd")
to cover additional frame types.
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
This commit is contained in:
parent
b678a3aa32
commit
f32f99df11
2 changed files with 5 additions and 7 deletions
|
@ -6098,19 +6098,17 @@ static int handle_action(struct hostapd_data *hapd,
|
||||||
end = ((const u8 *) mgmt) + len;
|
end = ((const u8 *) mgmt) + len;
|
||||||
gas_query_ap_rx(hapd->gas, mgmt->sa,
|
gas_query_ap_rx(hapd->gas, mgmt->sa,
|
||||||
mgmt->u.action.category,
|
mgmt->u.action.category,
|
||||||
pos, end - pos, hapd->iface->freq);
|
pos, end - pos, freq);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_DPP */
|
#endif /* CONFIG_DPP */
|
||||||
if (hapd->public_action_cb) {
|
if (hapd->public_action_cb) {
|
||||||
hapd->public_action_cb(hapd->public_action_cb_ctx,
|
hapd->public_action_cb(hapd->public_action_cb_ctx,
|
||||||
(u8 *) mgmt, len,
|
(u8 *) mgmt, len, freq);
|
||||||
hapd->iface->freq);
|
|
||||||
}
|
}
|
||||||
if (hapd->public_action_cb2) {
|
if (hapd->public_action_cb2) {
|
||||||
hapd->public_action_cb2(hapd->public_action_cb2_ctx,
|
hapd->public_action_cb2(hapd->public_action_cb2_ctx,
|
||||||
(u8 *) mgmt, len,
|
(u8 *) mgmt, len, freq);
|
||||||
hapd->iface->freq);
|
|
||||||
}
|
}
|
||||||
if (hapd->public_action_cb || hapd->public_action_cb2)
|
if (hapd->public_action_cb || hapd->public_action_cb2)
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -6118,8 +6116,7 @@ static int handle_action(struct hostapd_data *hapd,
|
||||||
case WLAN_ACTION_VENDOR_SPECIFIC:
|
case WLAN_ACTION_VENDOR_SPECIFIC:
|
||||||
if (hapd->vendor_action_cb) {
|
if (hapd->vendor_action_cb) {
|
||||||
if (hapd->vendor_action_cb(hapd->vendor_action_cb_ctx,
|
if (hapd->vendor_action_cb(hapd->vendor_action_cb_ctx,
|
||||||
(u8 *) mgmt, len,
|
(u8 *) mgmt, len, freq) == 0)
|
||||||
hapd->iface->freq) == 0)
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -1203,6 +1203,7 @@ void ap_mgmt_rx(void *ctx, struct rx_mgmt *rx_mgmt)
|
||||||
struct wpa_supplicant *wpa_s = ctx;
|
struct wpa_supplicant *wpa_s = ctx;
|
||||||
struct hostapd_frame_info fi;
|
struct hostapd_frame_info fi;
|
||||||
os_memset(&fi, 0, sizeof(fi));
|
os_memset(&fi, 0, sizeof(fi));
|
||||||
|
fi.freq = rx_mgmt->freq;
|
||||||
fi.datarate = rx_mgmt->datarate;
|
fi.datarate = rx_mgmt->datarate;
|
||||||
fi.ssi_signal = rx_mgmt->ssi_signal;
|
fi.ssi_signal = rx_mgmt->ssi_signal;
|
||||||
ieee802_11_mgmt(wpa_s->ap_iface->bss[0], rx_mgmt->frame,
|
ieee802_11_mgmt(wpa_s->ap_iface->bss[0], rx_mgmt->frame,
|
||||||
|
|
Loading…
Reference in a new issue