How can I get the last Wi-Fi disconnection reason ?

I want to know the reason for last Wi-Fi disconnection. It would be helpful to that I can get the reason-code received from the access point.

How can I get the last Wi-Fi disconnection reason ?
 
 
Q