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