Home | History | Annotate | Download | only in wpa_supplicant

Lines Matching refs:icon

60 	struct osu_icon icon[OSU_MAX_ITEMS];
286 struct icon_entry *icon;
288 dl_list_for_each(icon, &wpa_s->icon_head, struct icon_entry, list) {
289 if (os_memcmp(icon->bssid, bssid, ETH_ALEN) == 0 &&
290 os_strcmp(icon->file_name, file_name) == 0 && icon->image)
291 return icon;
302 struct icon_entry *icon;
308 wpa_printf(MSG_DEBUG, "HS20: Get icon " MACSTR " %s @ %u +%u (%u)",
312 icon = hs20_find_icon(wpa_s, bssid, file_name);
313 if (!icon || !icon->image || offset >= icon->image_len)
315 if (size > icon->image_len - offset)
316 size = icon->image_len - offset;
323 b64 = base64_encode(&icon->image[offset], size, &b64_size);
335 static void hs20_free_icon_entry(struct icon_entry *icon)
337 wpa_printf(MSG_DEBUG, "HS20: Free stored icon from " MACSTR
339 MAC2STR(icon->bssid), icon->dialog_token,
340 icon->file_name ? icon->file_name : "N/A",
341 (unsigned int) icon->image_len);
342 os_free(icon->file_name);
343 os_free(icon->image);
344 os_free(icon);
351 struct icon_entry *icon, *tmp;
363 dl_list_for_each_safe(icon, tmp, &wpa_s->icon_head, struct icon_entry,
365 if ((!bssid || os_memcmp(icon->bssid, bssid, ETH_ALEN) == 0) &&
367 os_strcmp(icon->file_name, file_name) == 0)) {
368 dl_list_del(&icon->list);
369 hs20_free_icon_entry(icon);
405 struct icon_entry *icon, *tmp;
407 dl_list_for_each_safe(icon, tmp, &wpa_s->icon_head, struct icon_entry,
409 if (icon == new_icon)
411 if (os_memcmp(icon->bssid, new_icon->bssid, ETH_ALEN) == 0 &&
412 os_strcmp(icon->file_name, new_icon->file_name) == 0) {
413 dl_list_del(&icon->list);
414 hs20_free_icon_entry(icon);
428 struct icon_entry *icon;
430 dl_list_for_each(icon, &wpa_s->icon_head, struct icon_entry, list) {
431 if (icon->dialog_token == dialog_token && !icon->image &&
432 os_memcmp(icon->bssid, sa, ETH_ALEN) == 0) {
433 icon->image = os_malloc(slen);
434 if (!icon->image)
436 os_memcpy(icon->image, pos, slen);
437 icon->image_len = slen;
438 hs20_remove_duplicate_icons(wpa_s, icon);
441 MAC2STR(sa), icon->file_name,
442 (unsigned int) icon->image_len);
444 icon->file_name,
445 icon->image,
446 icon->image_len);
451 wpa_msg(wpa_s, MSG_INFO, RX_HS20_ANQP MACSTR " Icon Binary File",
455 wpa_dbg(wpa_s, MSG_DEBUG, "HS 2.0: Too short Icon Binary File "
467 wpa_dbg(wpa_s, MSG_DEBUG, "HS 2.0: Too short Icon Binary File "
471 wpa_hexdump_ascii(MSG_DEBUG, "Icon Type", pos + 1, pos[0]);
477 wpa_dbg(wpa_s, MSG_DEBUG, "HS 2.0: Too short Icon Binary File "
486 wpa_dbg(wpa_s, MSG_DEBUG, "HS 2.0: Too short Icon Binary File "
491 wpa_printf(MSG_DEBUG, "Icon Binary Data: %u bytes", data_len);
498 snprintf(fname, sizeof(fname), "%s/osu-icon-%u.%s",
500 png ? "png" : "icon");
536 wpa_printf(MSG_DEBUG, "HS 2.0: Icon fetch dur=%d ms res=%d",
542 struct osu_icon *icon = &osu->icon[j];
543 if (icon->id || icon->failed)
546 icon->failed = 1;
548 icon->id = wpa_s->osu_icon_id;
668 * We are going through icon fetch, but no icon response was received.
746 struct osu_icon *icon = &osu->icon[j];
747 if (icon->failed)
748 continue; /* could not fetch icon */
749 fprintf(f, "icon=%u:%u:%u:%s:%s:%s\n",
750 icon->id, icon->width, icon->height, icon->lang,
751 icon->icon_type, icon->filename);
766 wpa_printf(MSG_DEBUG, "HS 2.0: Ready to fetch next icon");
771 struct osu_icon *icon = &osu->icon[j];
772 if (icon->id || icon->failed)
775 wpa_printf(MSG_DEBUG, "HS 2.0: Try to fetch icon '%s' "
776 "from " MACSTR, icon->filename,
781 (u8 *) icon->filename,
782 os_strlen(icon->filename),
784 icon->failed = 1;
902 struct osu_icon *icon = &prov->icon[prov->icon_count];
906 wpa_printf(MSG_DEBUG, "HS 2.0: Invalid Icon Metadata");
910 icon->width = WPA_GET_LE16(pos2);
912 icon->height = WPA_GET_LE16(pos2);
914 os_memcpy(icon->lang, pos2, 3);
919 wpa_printf(MSG_DEBUG, "HS 2.0: Not room for Icon Type");
922 os_memcpy(icon->icon_type, pos2, flen);
926 wpa_printf(MSG_DEBUG, "HS 2.0: Not room for Icon "
932 wpa_printf(MSG_DEBUG, "HS 2.0: Not room for Icon "
936 os_memcpy(icon->filename, pos2, flen);