nRF WiFi
Loading...
Searching...
No Matches
util.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2024 Nordic Semiconductor ASA
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
12#ifndef __UTIL_H__
13#define __UTIL_H__
14
15#include "osal_api.h"
16
17#include "host_rpu_umac_if.h"
18
19#ifndef ARRAY_SIZE
20#define ARRAY_SIZE(array) (sizeof(array) / sizeof((array)[0]))
21#endif
22
23/* Convert power from mBm to dBm */
24#define MBM_TO_DBM(gain) ((gain) / 100)
25
26int nrf_wifi_utils_hex_str_to_val(unsigned char *hex_arr,
27 unsigned int hex_arr_sz,
28 unsigned char *str);
29
31
33 unsigned short chan);
34#endif /* __UTIL_H__ */
nrf_wifi_band
Represents the values that can be used to specify the frequency band.
Definition host_rpu_umac_if.h:257
unsigned char mac_addr[6]
Definition host_rpu_data_if.h:7
struct chan_params chan
Definition host_rpu_sys_if.h:5
signed int band
Definition host_rpu_umac_if.h:3
int nrf_wifi_utils_hex_str_to_val(unsigned char *hex_arr, unsigned int hex_arr_sz, unsigned char *str)
bool nrf_wifi_utils_is_mac_addr_valid(const char *mac_addr)
int nrf_wifi_utils_chan_to_freq(enum nrf_wifi_band band, unsigned short chan)