1*4882a593Smuzhiyun /* 2*4882a593Smuzhiyun * Band Steering logic 3*4882a593Smuzhiyun * 4*4882a593Smuzhiyun * Feature by which dualband capable PEERs will be 5*4882a593Smuzhiyun * forced move on 5GHz interface 6*4882a593Smuzhiyun * 7*4882a593Smuzhiyun * Portions of this code are copyright (c) 2021 Cypress Semiconductor Corporation 8*4882a593Smuzhiyun * 9*4882a593Smuzhiyun * Copyright (C) 1999-2017, Broadcom Corporation 10*4882a593Smuzhiyun * 11*4882a593Smuzhiyun * Unless you and Broadcom execute a separate written software license 12*4882a593Smuzhiyun * agreement governing use of this software, this software is licensed to you 13*4882a593Smuzhiyun * under the terms of the GNU General Public License version 2 (the "GPL"), 14*4882a593Smuzhiyun * available at http://www.broadcom.com/licenses/GPLv2.php, with the 15*4882a593Smuzhiyun * following added to such license: 16*4882a593Smuzhiyun * 17*4882a593Smuzhiyun * As a special exception, the copyright holders of this software give you 18*4882a593Smuzhiyun * permission to link this software with independent modules, and to copy and 19*4882a593Smuzhiyun * distribute the resulting executable under terms of your choice, provided that 20*4882a593Smuzhiyun * you also meet, for each linked independent module, the terms and conditions of 21*4882a593Smuzhiyun * the license of that module. An independent module is a module which is not 22*4882a593Smuzhiyun * derived from this software. The special exception does not apply to any 23*4882a593Smuzhiyun * modifications of the software. 24*4882a593Smuzhiyun * 25*4882a593Smuzhiyun * Notwithstanding the above, under no circumstances may you combine this 26*4882a593Smuzhiyun * software in any way with any other Broadcom software provided under a license 27*4882a593Smuzhiyun * other than the GPL, without Broadcom's express prior written consent. 28*4882a593Smuzhiyun * 29*4882a593Smuzhiyun * <<Broadcom-WL-IPTag/Open:>> 30*4882a593Smuzhiyun * 31*4882a593Smuzhiyun * $ Copyright Cypress Semiconductor $ 32*4882a593Smuzhiyun * 33*4882a593Smuzhiyun * $Id: dhd_bandsteer.h 710124 2019-02-20 13:15:23Z $ 34*4882a593Smuzhiyun */ 35*4882a593Smuzhiyun 36*4882a593Smuzhiyun #ifndef _dhd_bandsteer_h_ 37*4882a593Smuzhiyun #define _dhd_bandsteer_h_ 38*4882a593Smuzhiyun 39*4882a593Smuzhiyun /* Local Types */ 40*4882a593Smuzhiyun typedef struct dhd_bandsteer_context dhd_bandsteer_context_t; 41*4882a593Smuzhiyun 42*4882a593Smuzhiyun typedef struct dhd_bandsteer_iface_info { 43*4882a593Smuzhiyun s32 bssidx; 44*4882a593Smuzhiyun s32 channel; 45*4882a593Smuzhiyun struct ether_addr macaddr; 46*4882a593Smuzhiyun struct net_device *ndev; 47*4882a593Smuzhiyun } dhd_bandsteer_iface_info_t; 48*4882a593Smuzhiyun 49*4882a593Smuzhiyun typedef struct dhd_bandsteer_mac_entry { 50*4882a593Smuzhiyun struct list_head list; // Pointer to head of the list 51*4882a593Smuzhiyun uint32 dhd_bandsteer_status; // Usefull in timer call back 52*4882a593Smuzhiyun dhd_bandsteer_context_t *dhd_bandsteer_cntx; 53*4882a593Smuzhiyun timer_list_compat_t dhd_bandsteer_timer; // Callback to Advance BS STATEMACHINE 54*4882a593Smuzhiyun uint8 wnm_frame_counter; 55*4882a593Smuzhiyun struct ether_addr mac_addr; 56*4882a593Smuzhiyun } dhd_bandsteer_mac_entry_t; 57*4882a593Smuzhiyun 58*4882a593Smuzhiyun struct dhd_bandsteer_context { 59*4882a593Smuzhiyun struct list_head dhd_bandsteer_monitor_list; 60*4882a593Smuzhiyun uint8 ifidx_5g; 61*4882a593Smuzhiyun dhd_bandsteer_iface_info_t bsd_ifaces[2]; /* idx 0 5G, 1 2G */ 62*4882a593Smuzhiyun void *dhd_pub; 63*4882a593Smuzhiyun }; 64*4882a593Smuzhiyun 65*4882a593Smuzhiyun /* Local Types ends */ 66*4882a593Smuzhiyun 67*4882a593Smuzhiyun /* ********************** Function declaration *********************** */ 68*4882a593Smuzhiyun void dhd_bandsteer_process_disassoc(dhd_bandsteer_context_t *dhd_bandsteer_cntx, 69*4882a593Smuzhiyun const wl_event_msg_t *e); 70*4882a593Smuzhiyun s32 dhd_bandsteer_module_init(struct net_device *ndev, bool ap, bool p2p); 71*4882a593Smuzhiyun s32 dhd_bandsteer_module_deinit(struct net_device *ndev, bool ap, bool p2p); 72*4882a593Smuzhiyun void dhd_bandsteer_schedule_work_on_timeout(dhd_bandsteer_mac_entry_t *dhd_bandsteer_mac); 73*4882a593Smuzhiyun void dhd_bandsteer_workqueue_wrapper(void *handle, void *event_info, u8 event); 74*4882a593Smuzhiyun s32 dhd_bandsteer_get_ifaces(void *pub, void *ifaces); 75*4882a593Smuzhiyun s32 dhd_bandsteer_trigger_bandsteer(struct net_device *, uint8 *); 76*4882a593Smuzhiyun /* ********************** Function declartion ends ****************** */ 77*4882a593Smuzhiyun #endif /* _dhd_bandsteer_h_ */ 78