mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-12-23 06:02:37 +01:00
util: Add util_bit_field
This commit is contained in:
parent
c8fb0b21f1
commit
56f1ccf7f2
@ -28,4 +28,9 @@
|
|||||||
|
|
||||||
const char *util_ssid_to_utf8(size_t len, const uint8_t *ssid);
|
const char *util_ssid_to_utf8(size_t len, const uint8_t *ssid);
|
||||||
|
|
||||||
|
static inline uint8_t util_bit_field(const uint8_t oct, int start, int num)
|
||||||
|
{
|
||||||
|
unsigned char mask = (1 << num) - 1;
|
||||||
|
return (oct >> start) & mask;
|
||||||
|
}
|
||||||
#endif /* __UTIL_H */
|
#endif /* __UTIL_H */
|
||||||
|
Loading…
Reference in New Issue
Block a user