I have same problem some times ago but I do following action.
Possible solutions would be:
1) Do nothing. We cannot anticipate for changes in the network API. Instead, we should insist that whoever changes it should also provide an easy way to extract or copy the physical device information.
2) Save the physical device data in MadWifi and get it from there. Don't rely on existence of class_dev. That's the paranoid approach. We would protect MadWifi against breakage that happened just in one -mm kernel and may never happen again.
3) Don't use SET_NETDEV_DEV for VAP.
I prefer to do nothing for now. The responsibility for fixing broken code should be primarily on the shoulders of those making the change. If code changes are needed, drivers/net/wireless/hostap/hostap_main.c has similar code, so we can copy the change from that file.