P2P: Add mechanism for updating P2P channel list based on driver events
This allows P2P channel list to be updated whenever the driver changes its list of allowed channels, e.g., based on country code from scan results.
This commit is contained in:
parent
ac8d1011b7
commit
b5c9da8db3
6 changed files with 43 additions and 1 deletions
|
@ -2203,7 +2203,16 @@ enum wpa_event_type {
|
|||
* This event is used to indicate that the interface was disabled,
|
||||
* e.g., due to rfkill.
|
||||
*/
|
||||
EVENT_INTERFACE_DISABLED
|
||||
EVENT_INTERFACE_DISABLED,
|
||||
|
||||
/**
|
||||
* EVENT_CHANNEL_LIST_CHANGED - Channel list changed
|
||||
*
|
||||
* This event is used to indicate that the channel list has changed,
|
||||
* e.g., because of a regulatory domain change triggered by scan
|
||||
* results including an AP advertising a country code.
|
||||
*/
|
||||
EVENT_CHANNEL_LIST_CHANGED
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -3036,3 +3036,10 @@ void p2p_set_intra_bss_dist(struct p2p_data *p2p, int enabled)
|
|||
enabled ? "enabled" : "disabled");
|
||||
p2p->cfg->p2p_intra_bss = enabled;
|
||||
}
|
||||
|
||||
|
||||
void p2p_update_channel_list(struct p2p_data *p2p, struct p2p_channels *chan)
|
||||
{
|
||||
wpa_msg(p2p->cfg->msg_ctx, MSG_DEBUG, "P2P: Update channel list");
|
||||
os_memcpy(&p2p->cfg->channels, chan, sizeof(struct p2p_channels));
|
||||
}
|
||||
|
|
|
@ -1263,4 +1263,6 @@ void p2p_set_intra_bss_dist(struct p2p_data *p2p, int enabled);
|
|||
*/
|
||||
int p2p_supported_freq(struct p2p_data *p2p, unsigned int freq);
|
||||
|
||||
void p2p_update_channel_list(struct p2p_data *p2p, struct p2p_channels *chan);
|
||||
|
||||
#endif /* P2P_H */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue