P2P: Helper functions to check for WFD capability of a P2P device
P2P operation on the 6 GHz band is supported in the WFD use case. Introduce helper functions to check for Wi-Fi Display capability of the local device and a peer device. Signed-off-by: Sreeramya Soratkal <ssramya@codeaurora.org>
This commit is contained in:
parent
eaf850867b
commit
a06c7d50f9
2 changed files with 25 additions and 0 deletions
|
@ -5605,3 +5605,26 @@ bool is_p2p_6ghz_capable(struct p2p_data *p2p)
|
||||||
{
|
{
|
||||||
return p2p->p2p_6ghz_capable;
|
return p2p->p2p_6ghz_capable;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool p2p_wfd_enabled(struct p2p_data *p2p)
|
||||||
|
{
|
||||||
|
#ifdef CONFIG_WIFI_DISPLAY
|
||||||
|
return p2p->wfd_ie_probe_req != NULL;
|
||||||
|
#else /* CONFIG_WIFI_DISPLAY */
|
||||||
|
return false;
|
||||||
|
#endif /* CONFIG_WIFI_DISPLAY */
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool p2p_peer_wfd_enabled(struct p2p_data *p2p, const u8 *peer_addr)
|
||||||
|
{
|
||||||
|
#ifdef CONFIG_WIFI_DISPLAY
|
||||||
|
struct p2p_device *dev;
|
||||||
|
|
||||||
|
dev = p2p_get_device(p2p, peer_addr);
|
||||||
|
return dev && dev->info.wfd_subelems != NULL;
|
||||||
|
#else /* CONFIG_WIFI_DISPLAY */
|
||||||
|
return false;
|
||||||
|
#endif /* CONFIG_WIFI_DISPLAY */
|
||||||
|
}
|
||||||
|
|
|
@ -2414,5 +2414,7 @@ struct wpabuf * p2p_build_probe_resp_template(struct p2p_data *p2p,
|
||||||
void p2p_set_6ghz_dev_capab(struct p2p_data *p2p, bool allow_6ghz);
|
void p2p_set_6ghz_dev_capab(struct p2p_data *p2p, bool allow_6ghz);
|
||||||
bool is_p2p_6ghz_capable(struct p2p_data *p2p);
|
bool is_p2p_6ghz_capable(struct p2p_data *p2p);
|
||||||
bool p2p_is_peer_6ghz_capab(struct p2p_data *p2p, const u8 *addr);
|
bool p2p_is_peer_6ghz_capab(struct p2p_data *p2p, const u8 *addr);
|
||||||
|
bool p2p_peer_wfd_enabled(struct p2p_data *p2p, const u8 *peer_addr);
|
||||||
|
bool p2p_wfd_enabled(struct p2p_data *p2p);
|
||||||
|
|
||||||
#endif /* P2P_H */
|
#endif /* P2P_H */
|
||||||
|
|
Loading…
Reference in a new issue