| /* |
| * Custom OID/ioctl related helper functions. |
| * |
| * Copyright 1999-2016, Broadcom Corporation |
| * All rights reserved, |
| * |
| * Redistribution and use in source and binary forms, with or without modification, |
| * are permitted provided that the following conditions are met: |
| * 1. Redistributions of source code must retain the above copyright notice, |
| * this list of conditions and the following disclaimer. |
| * 2. Redistributions in binary form must reproduce the above copyright notice, |
| * this list of conditions and the following disclaimer in the documentation |
| * and/or other materials provided with the distribution. |
| * |
| * This software is provided by the copyright holder "as is" and any express or |
| * implied warranties, including, but not limited to, the implied warranties of |
| * merchantability and fitness for a particular purpose are disclaimed. In no event |
| * shall copyright holder be liable for any direct, indirect, incidental, special, |
| * exemplary, or consequential damages (including, but not limited to, procurement |
| * of substitute goods or services; loss of use, data, or profits; or business |
| * interruption) however caused and on any theory of liability, whether in |
| * contract, strict liability, or tort (including negligence or otherwise) arising |
| * in any way out of the use of this software, even if advised of the possibility |
| * of such damage |
| * <<Broadcom-WL-IPTag/Open:>> |
| * |
| * $Id: wlioctl_utils.h 555740 2015-05-11 10:16:23Z $ |
| */ |
| |
| #ifndef _wlioctl_utils_h_ |
| #define _wlioctl_utils_h_ |
| |
| #include <wlioctl.h> |
| |
| #ifndef BCMDRIVER |
| #define CCA_THRESH_MILLI 14 |
| #define CCA_THRESH_INTERFERE 6 |
| |
| extern cca_congest_channel_req_t * cca_per_chan_summary(cca_congest_channel_req_t *input, |
| cca_congest_channel_req_t *avg, bool percent); |
| |
| extern int cca_analyze(cca_congest_channel_req_t *input[], int num_chans, |
| uint flags, chanspec_t *answer); |
| #endif /* BCMDRIVER */ |
| |
| extern int wl_cntbuf_to_xtlv_format(void *ctx, void *cntbuf, |
| int buflen, uint32 corerev); |
| |
| /* Get data pointer of wlc layer counters tuple from xtlv formatted counters IOVar buffer. */ |
| #define GET_WLCCNT_FROM_CNTBUF(cntbuf) \ |
| bcm_get_data_from_xtlv_buf(((wl_cnt_info_t *)cntbuf)->data, \ |
| ((wl_cnt_info_t *)cntbuf)->datalen, WL_CNT_XTLV_WLC, \ |
| NULL, BCM_XTLV_OPTION_ALIGN32) |
| |
| #endif /* _wlioctl_utils_h_ */ |