| /* |
| * wl ampdu_cmn command module |
| * |
| * Broadcom Proprietary and Confidential. Copyright (C) 2017, |
| * All Rights Reserved. |
| * |
| * This is UNPUBLISHED PROPRIETARY SOURCE CODE of Broadcom; |
| * the contents of this file may not be disclosed to third parties, copied |
| * or duplicated in any form, in whole or in part, without the prior |
| * written permission of Broadcom. |
| * |
| * |
| * <<Broadcom-WL-IPTag/Proprietary:>> |
| * |
| * $Id: wluc_ampdu_cmn.c 458728 2014-02-27 18:15:25Z $ |
| */ |
| |
| #ifdef WIN32 |
| #include <windows.h> |
| #endif |
| |
| #include <wlioctl.h> |
| |
| #if defined(DONGLEBUILD) |
| #include <typedefs.h> |
| #include <osl.h> |
| #endif |
| |
| /* Because IL_BIGENDIAN was removed there are few warnings that need |
| * to be fixed. Windows was not compiled earlier with IL_BIGENDIAN. |
| * Hence these warnings were not seen earlier. |
| * For now ignore the following warnings |
| */ |
| #ifdef WIN32 |
| #pragma warning(push) |
| #pragma warning(disable : 4244) |
| #pragma warning(disable : 4761) |
| #endif |
| |
| #include <bcmutils.h> |
| #include <bcmendian.h> |
| #include "wlu_common.h" |
| #include "wlu.h" |
| |
| static cmd_func_t wl_ampdu_activate_test; |
| |
| static cmd_t wl_ampdu_cmn_cmds[] = { |
| { "ampdu_activate_test", wl_ampdu_activate_test, -1, WLC_SET_VAR, |
| "actiate" }, |
| { "ampdu_clear_dump", wl_var_void, -1, WLC_SET_VAR, |
| "clear ampdu counters"}, |
| { NULL, NULL, 0, 0, NULL } |
| }; |
| |
| static char *buf; |
| |
| /* module initialization */ |
| void |
| wluc_ampdu_cmn_module_init(void) |
| { |
| (void)g_swap; |
| |
| /* get the global buf */ |
| buf = wl_get_buf(); |
| |
| /* register ampdu_cmn commands */ |
| wl_module_cmds_register(wl_ampdu_cmn_cmds); |
| } |
| |
| static int |
| wl_ampdu_activate_test(void *wl, cmd_t *cmd, char **argv) |
| { |
| char *param; |
| const char *cmdname = "ampdu_activate_test"; |
| struct agg { |
| bool val1; |
| bool val2; |
| } x; |
| int err = 0; |
| |
| UNUSED_PARAMETER(cmd); |
| |
| if ((param = *++argv) == NULL) |
| return BCME_USAGE_ERROR; |
| |
| x.val1 = atoi(param); |
| if ((param = *++argv)) { |
| x.val2 = atoi(param); |
| printf("%d %d\n", x.val1, x.val2); |
| err = wlu_var_setbuf(wl, cmdname, &x, sizeof(x)); |
| } |
| return err; |
| } |