ifconfig: Place generic options at the end of the media types list.
Otherwise we will get "Auto-select" even if something more specific applies, e.g. in the case of IFM_IEEE80211 at least. Fixes media type detection for OpenBSD drivers.
This commit is contained in:
@@ -39,23 +39,6 @@ struct media_type {
|
||||
|
||||
|
||||
const media_type kMediaTypes[] = {
|
||||
{
|
||||
0, // for generic options
|
||||
"all",
|
||||
"All",
|
||||
IFM_TMASK,
|
||||
{
|
||||
{ IFM_AUTO, "auto", "Auto-select" },
|
||||
{ -1, NULL, NULL }
|
||||
},
|
||||
{
|
||||
{ IFM_FDX, true, "fullduplex", "Full Duplex" },
|
||||
{ IFM_HDX, true, "halfduplex", "Half Duplex" },
|
||||
{ IFM_LOOP, true, "loop", "Loop" },
|
||||
//{ IFM_ACTIVE, false, "active", "Active" },
|
||||
{ -1, false, NULL, NULL }
|
||||
}
|
||||
},
|
||||
{
|
||||
IFM_ETHER,
|
||||
"ether",
|
||||
@@ -99,6 +82,23 @@ const media_type kMediaTypes[] = {
|
||||
{ -1, false, NULL, NULL }
|
||||
}
|
||||
},
|
||||
{
|
||||
0, // for generic options
|
||||
"all",
|
||||
"All",
|
||||
IFM_TMASK,
|
||||
{
|
||||
{ IFM_AUTO, "auto", "Auto-select" },
|
||||
{ -1, NULL, NULL }
|
||||
},
|
||||
{
|
||||
{ IFM_FDX, true, "fullduplex", "Full Duplex" },
|
||||
{ IFM_HDX, true, "halfduplex", "Half Duplex" },
|
||||
{ IFM_LOOP, true, "loop", "Loop" },
|
||||
//{ IFM_ACTIVE, false, "active", "Active" },
|
||||
{ -1, false, NULL, NULL }
|
||||
}
|
||||
},
|
||||
{ -1, NULL, NULL, -1, {{ -1, NULL, NULL }}, {{ -1, false, NULL, NULL }} }
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user