Browse Source

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>
Andrei Otcheretianski 11 years ago
parent
commit
3342c2636c
3 changed files with 9 additions and 1 deletions
  1. 1 1
      src/p2p/p2p.c
  2. 7 0
      src/p2p/p2p_group.c
  3. 1 0
      src/p2p/p2p_i.h

+ 1 - 1
src/p2p/p2p.c

@@ -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);
 	}
 }
 

+ 7 - 0
src/p2p/p2p_group.c

@@ -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);
+}

+ 1 - 0
src/p2p/p2p_i.h

@@ -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);