Home | History | Annotate | Download | only in wpa_supplicant

Lines Matching refs:anqp

55  * wpa_bss_anqp_alloc - Allocate ANQP data structure for a BSS entry
56 * Returns: Allocated ANQP data structure or %NULL on failure
58 * The allocated ANQP data structure has its users count set to 1. It may be
64 struct wpa_bss_anqp *anqp;
65 anqp = os_zalloc(sizeof(*anqp));
66 if (anqp == NULL)
68 anqp->users = 1;
69 return anqp;
74 * wpa_bss_anqp_clone - Clone an ANQP data structure
75 * @anqp: ANQP data structure from wpa_bss_anqp_alloc()
76 * Returns: Cloned ANQP data structure or %NULL on failure
78 static struct wpa_bss_anqp * wpa_bss_anqp_clone(struct wpa_bss_anqp *anqp)
86 #define ANQP_DUP(f) if (anqp->f) n->f = wpabuf_dup(anqp->f)
109 * wpa_bss_anqp_unshare_alloc - Unshare ANQP data (if shared) in a BSS entry
113 * This function ensures the specific BSS entry has an ANQP data structure that
118 struct wpa_bss_anqp *anqp;
120 if (bss->anqp && bss->anqp->users > 1) {
122 anqp = wpa_bss_anqp_clone(bss->anqp);
123 if (anqp == NULL)
125 anqp->users = 1;
126 bss->anqp->users--;
127 bss->anqp = anqp;
131 if (bss->anqp)
135 bss->anqp = wpa_bss_anqp_alloc();
136 return bss->anqp ? 0 : -1;
141 * wpa_bss_anqp_free - Free an ANQP data structure
142 * @anqp: ANQP data structure from wpa_bss_anqp_alloc() or wpa_bss_anqp_clone()
144 static void wpa_bss_anqp_free(struct wpa_bss_anqp *anqp)
146 if (anqp == NULL)
149 anqp->users--;
150 if (anqp->users > 0) {
151 /* Another BSS entry holds a pointer to this ANQP info */
156 wpabuf_free(anqp->venue_name);
157 wpabuf_free(anqp->network_auth_type);
158 wpabuf_free(anqp->roaming_consortium);
159 wpabuf_free(anqp->ip_addr_type_availability);
160 wpabuf_free(anqp->nai_realm);
161 wpabuf_free(anqp->anqp_3gpp);
162 wpabuf_free(anqp->domain_name);
165 wpabuf_free(anqp->hs20_operator_friendly_name);
166 wpabuf_free(anqp->hs20_wan_metrics);
167 wpabuf_free(anqp->hs20_connection_capability);
168 wpabuf_free(anqp->hs20_operating_class);
171 os_free(anqp);
198 wpa_bss_anqp_free(bss->anqp);