Lines Matching refs:idx

74     for (int idx = 0; idx < ITEMS_IN_MAC_TABLE; idx++) {  in get_idx()  local
75 if (s_mac_table[idx].type == type) { in get_idx()
76 return idx; in get_idx()
83 static esp_err_t get_mac_addr_from_mac_table(uint8_t *mac, int idx, bool silent) in get_mac_addr_from_mac_table() argument
85 if (idx == -1) { in get_mac_addr_from_mac_table()
88 if (!(s_mac_table[idx].state & STATE_SET)) { in get_mac_addr_from_mac_table()
89 esp_mac_type_t type = s_mac_table[idx].type; in get_mac_addr_from_mac_table()
97 err = get_efuse_factory_mac(s_mac_table[idx].mac); in get_mac_addr_from_mac_table()
103 err = get_efuse_mac_custom(s_mac_table[idx].mac); in get_mac_addr_from_mac_table()
107 err = get_efuse_mac_ext(s_mac_table[idx].mac); in get_mac_addr_from_mac_table()
113 s_mac_table[idx].state = STATE_SET; in get_mac_addr_from_mac_table()
121 memcpy(mac, s_mac_table[idx].mac, s_mac_table[idx].len); in get_mac_addr_from_mac_table()
127 for (int idx = 0; idx < ITEMS_IN_MAC_TABLE; idx++) { in esp_mac_addr_len_get() local
128 if (s_mac_table[idx].type == type) { in esp_mac_addr_len_get()
129 return s_mac_table[idx].len; in esp_mac_addr_len_get()
141 int idx = get_idx(type); in esp_iface_mac_addr_set() local
142 if (idx == -1) { in esp_iface_mac_addr_set()
158 memcpy(s_mac_table[idx].mac, mac, s_mac_table[idx].len); in esp_iface_mac_addr_set()
159 s_mac_table[idx].state = STATE_SET; in esp_iface_mac_addr_set()
329 int idx = get_idx(type); in esp_read_mac() local
330 if (idx == -1) { in esp_read_mac()
334 if (get_mac_addr_from_mac_table(mac, idx, true) == ESP_OK) { in esp_read_mac()
353 s_mac_table[idx].state = STATE_SET; in esp_read_mac()
354 memcpy(s_mac_table[idx].mac, mac, s_mac_table[idx].len); in esp_read_mac()