mirror of
https://review.haiku-os.org/haiku
synced 2025-01-19 13:01:29 +01:00
44fa45df3a
This was introduced into the main API in 2010 (d72ede75fb252c24c8a5fcc39395f9ae1c202322), but was actually only fully used for the past month (c2a9a890f3ac7795602d11c0edaa20ac2db48202) when SIOCGIFMEDIA was supported for all *BSD drivers and not just WiFi. Most userland consumers of this structure did not use it correctly, as was the case in #17770, and only worked because in the fallback case the network stack just treated it as if it were an ifreq. Nothing actually used the ifm_count/ifm_ulist (though tentative APIs were exposed for it) as noted by previous commits; and the fact that Haiku's IFM_* declarations are so spartan makes most of the returned values unintelligible to userland without using FreeBSD compat headers. If, in the future, we decide to implement ifmedia listing and selection properly, that should likely be done with separate ioctls instead of having multi-function ones like this. This is technically an ABI break, but in practice it should not matter: ifmediareq::ifm_current aligns with ifreq::ifr_media, so the things that used this structure like our in-tree code did will continue to work. Until this past May, the only other field that was usually set was ifm_active, but in the absence of setting ifm_status all non-Haiku consumers should ignore it completely. The only consumer of this ioctl that I know of out of the tree, wpa_supplicant, still works after these changes.