wpa_supplicant: Fix updating GO beacons on WFD subelements change

When WFD Subelements are set, the IE in the Beacon frames of already
existing groups are not updated. This patch fixes this issue by setting
beacon_update to be 1 on WFD IE update.

Signed-hostap: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
This commit is contained in:
Andrei Otcheretianski 2013-11-03 15:24:13 +02:00 committed by Jouni Malinen
parent 72c12c1d30
commit 3342c2636c
3 changed files with 9 additions and 1 deletions

View file

@ -4192,7 +4192,7 @@ static void p2p_update_wfd_ie_groups(struct p2p_data *p2p)
for (g = 0; g < p2p->num_groups; g++) {
group = p2p->groups[g];
p2p_group_update_ies(group);
p2p_group_force_beacon_update_ies(group);
}
}

View file

@ -980,3 +980,10 @@ int p2p_group_is_group_id_match(struct p2p_group *group, const u8 *group_id,
return os_memcmp(group_id + ETH_ALEN, group->cfg->ssid,
group->cfg->ssid_len) == 0;
}
void p2p_group_force_beacon_update_ies(struct p2p_group *group)
{
group->beacon_update = 1;
p2p_group_update_ies(group);
}

View file

@ -608,6 +608,7 @@ u8 p2p_group_presence_req(struct p2p_group *group,
int p2p_group_is_group_id_match(struct p2p_group *group, const u8 *group_id,
size_t group_id_len);
void p2p_group_update_ies(struct p2p_group *group);
void p2p_group_force_beacon_update_ies(struct p2p_group *group);
struct wpabuf * p2p_group_get_wfd_ie(struct p2p_group *g);