What is the best way to implement wifi ap scan of esp8266

Hello!
I have a project where I want to connect to wifi runtime. I discovered some sources and I’m shocked that in OS for IoT missed this very important functional. Where should I start and how to deal with already written drivers? Some advice?

@fabian18 implemented this for atwinc15x0 and provided a generic interface (#19387).

So you’d have to hook up that interdace in the esp-wifi driver.