Skip to content

Commit

Permalink
fix: remove unstable const fn
Browse files Browse the repository at this point in the history
  • Loading branch information
Brijeshkrishna committed Nov 9, 2023
1 parent 545a602 commit 100873f
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 30 deletions.
2 changes: 0 additions & 2 deletions libc-test/semver/linux.txt
Expand Up @@ -2700,8 +2700,6 @@ IW_ENC_CAPA_4WAY_HANDSHAKE
IW_EVENT_CAPA_BASE
IW_EVENT_CAPA_INDEX
IW_EVENT_CAPA_MASK
IW_EVENT_CAPA_K_0
IW_EVENT_CAPA_K_1
IW_PMKSA_ADD
IW_PMKSA_REMOVE
IW_PMKSA_FLUSH
Expand Down
28 changes: 0 additions & 28 deletions src/unix/linux_like/linux/mod.rs
Expand Up @@ -2927,15 +2927,6 @@ pub const SIOCIWLASTPRIV: ::c_ulong = 0x8BFF;

pub const SIOCIWFIRST: ::c_ulong = 0x8B00;
pub const SIOCIWLAST: ::c_ulong = SIOCIWLASTPRIV;
pub const fn IW_IOCTL_IDX(cmd: ::c_ulong) -> ::c_ulong {
cmd - SIOCIWFIRST
}
pub const fn IW_IS_SET(cmd: ::c_ulong) -> ::c_ulong {
!(cmd & 0x1)
}
pub const fn IW_IS_GET(cmd: ::c_ulong) -> ::c_ulong {
cmd & 0x1
}

pub const IWEVTXDROP: ::c_ulong = 0x8C00;
pub const IWEVQUAL: ::c_ulong = 0x8C01;
Expand All @@ -2948,9 +2939,6 @@ pub const IWEVASSOCREQIE: ::c_ulong = 0x8C07;
pub const IWEVASSOCRESPIE: ::c_ulong = 0x8C08;
pub const IWEVPMKIDCAND: ::c_ulong = 0x8C09;
pub const IWEVFIRST: ::c_ulong = 0x8C00;
pub const fn IW_EVENT_IDX(cmd: ::c_ulong) -> ::c_ulong {
cmd - IWEVFIRST
}

pub const IW_PRIV_TYPE_MASK: ::c_ulong = 0x7000;
pub const IW_PRIV_TYPE_NONE: ::c_ulong = 0x0000;
Expand Down Expand Up @@ -3140,22 +3128,6 @@ pub const IW_ENC_CAPA_CIPHER_TKIP: ::c_ulong = 0x00000004;
pub const IW_ENC_CAPA_CIPHER_CCMP: ::c_ulong = 0x00000008;
pub const IW_ENC_CAPA_4WAY_HANDSHAKE: ::c_ulong = 0x00000010;

pub const fn IW_EVENT_CAPA_BASE(cmd: ::c_ulong) -> ::c_ulong {
if cmd >= SIOCIWFIRSTPRIV {
cmd - SIOCIWFIRSTPRIV + 0x60
} else {
cmd - SIOCIWFIRST
}
}
pub const fn IW_EVENT_CAPA_INDEX(cmd: ::c_ulong) -> ::c_ulong {
IW_EVENT_CAPA_BASE(cmd) >> 5
}
pub const fn IW_EVENT_CAPA_MASK(cmd: ::c_ulong) -> ::c_ulong {
1 << (IW_EVENT_CAPA_BASE(cmd) & 0x1F)
}
pub const IW_EVENT_CAPA_K_0: ::c_ulong =
IW_EVENT_CAPA_MASK(0x8B04) | IW_EVENT_CAPA_MASK(0x8B06) | IW_EVENT_CAPA_MASK(0x8B1A);
pub const IW_EVENT_CAPA_K_1: ::c_ulong = IW_EVENT_CAPA_MASK(0x8B2A);

pub const IW_PMKSA_ADD: usize = 1;
pub const IW_PMKSA_REMOVE: usize = 2;
Expand Down

0 comments on commit 100873f

Please sign in to comment.