The source code works fine and API is not suggest to change especially Wlan for better performance. You should debug your code that changed the source code.
i suggest you to have another function under your example, instead of changing the Wlan API. The “callback” functions should not be changed.
you mean is function signature ? or others ?