Also code for sdk_cnx_sta_leave, although disabled due to accessing static date, but it shows a reference to the netif->flags and the NETIF_FLAG_DHCP flag removed in lwip v2.
The function sdk_wifi_station_start is one of two paths that allocates a lwip struct netif and also accesses the netif->hwaddr slot so this is required for lwip development.
Also code for sdk_wifi_station_stop and sdk_sta_status_set to better understand the status state.
The function sdk_wifi_softap_start is one of two paths that allocates a struct netif and also accesses the netif->hwaddr so is needed for lwip development. This function depends on static data and functions so a good bit so other code was needed.