1*2b27bdccSThomas Gleixner /* SPDX-License-Identifier: GPL-2.0-only */ 2fcab1890SEliad Peller /* 3fcab1890SEliad Peller * This file is part of wl18xx 4fcab1890SEliad Peller * 5fcab1890SEliad Peller * Copyright (C) 2011 Texas Instruments. All rights reserved. 6fcab1890SEliad Peller */ 7fcab1890SEliad Peller 8fcab1890SEliad Peller #ifndef __WL18XX_CMD_H__ 9fcab1890SEliad Peller #define __WL18XX_CMD_H__ 10fcab1890SEliad Peller 11fcab1890SEliad Peller #include "../wlcore/wlcore.h" 12fcab1890SEliad Peller #include "../wlcore/acx.h" 13fcab1890SEliad Peller 14fcab1890SEliad Peller struct wl18xx_cmd_channel_switch { 15fcab1890SEliad Peller struct wl1271_cmd_header header; 16fcab1890SEliad Peller 17fcab1890SEliad Peller u8 role_id; 18fcab1890SEliad Peller 19fcab1890SEliad Peller /* The new serving channel */ 20fcab1890SEliad Peller u8 channel; 21fcab1890SEliad Peller /* Relative time of the serving channel switch in TBTT units */ 22fcab1890SEliad Peller u8 switch_time; 23fcab1890SEliad Peller /* Stop the role TX, should expect it after radar detection */ 24fcab1890SEliad Peller u8 stop_tx; 25fcab1890SEliad Peller 26fcab1890SEliad Peller __le32 local_supported_rates; 27fcab1890SEliad Peller 28fcab1890SEliad Peller u8 channel_type; 29fcab1890SEliad Peller u8 band; 30fcab1890SEliad Peller 31fcab1890SEliad Peller u8 padding[2]; 32fcab1890SEliad Peller } __packed; 33fcab1890SEliad Peller 34936c50ddSEliad Peller struct wl18xx_cmd_smart_config_start { 35936c50ddSEliad Peller struct wl1271_cmd_header header; 36936c50ddSEliad Peller 37936c50ddSEliad Peller __le32 group_id_bitmask; 38936c50ddSEliad Peller } __packed; 39936c50ddSEliad Peller 40936c50ddSEliad Peller struct wl18xx_cmd_smart_config_set_group_key { 41936c50ddSEliad Peller struct wl1271_cmd_header header; 42936c50ddSEliad Peller 43936c50ddSEliad Peller __le32 group_id; 44936c50ddSEliad Peller 45936c50ddSEliad Peller u8 key[16]; 46936c50ddSEliad Peller } __packed; 47936c50ddSEliad Peller 48e7d32324SEliad Peller struct wl18xx_cmd_dfs_radar_debug { 49e7d32324SEliad Peller struct wl1271_cmd_header header; 50e7d32324SEliad Peller 51e7d32324SEliad Peller u8 channel; 52e7d32324SEliad Peller u8 padding[3]; 53e7d32324SEliad Peller } __packed; 54e7d32324SEliad Peller 55830513abSEliad Peller struct wl18xx_cmd_dfs_master_restart { 56830513abSEliad Peller struct wl1271_cmd_header header; 57830513abSEliad Peller 58830513abSEliad Peller u8 role_id; 59830513abSEliad Peller u8 padding[3]; 60830513abSEliad Peller } __packed; 61830513abSEliad Peller 62750e9d15SEliad Peller /* cac_start and cac_stop share the same params */ 63750e9d15SEliad Peller struct wlcore_cmd_cac_start { 64750e9d15SEliad Peller struct wl1271_cmd_header header; 65750e9d15SEliad Peller 66750e9d15SEliad Peller u8 role_id; 67750e9d15SEliad Peller u8 channel; 68750e9d15SEliad Peller u8 band; 69750e9d15SEliad Peller u8 bandwidth; 70750e9d15SEliad Peller } __packed; 71750e9d15SEliad Peller 72fcab1890SEliad Peller int wl18xx_cmd_channel_switch(struct wl1271 *wl, 73fcab1890SEliad Peller struct wl12xx_vif *wlvif, 74fcab1890SEliad Peller struct ieee80211_channel_switch *ch_switch); 75ccb1df94SEliad Peller int wl18xx_cmd_smart_config_start(struct wl1271 *wl, u32 group_bitmap); 76ccb1df94SEliad Peller int wl18xx_cmd_smart_config_stop(struct wl1271 *wl); 77ccb1df94SEliad Peller int wl18xx_cmd_smart_config_set_group_key(struct wl1271 *wl, u16 group_id, 78ccb1df94SEliad Peller u8 key_len, u8 *key); 79750e9d15SEliad Peller int wl18xx_cmd_set_cac(struct wl1271 *wl, struct wl12xx_vif *wlvif, bool start); 80e7d32324SEliad Peller int wl18xx_cmd_radar_detection_debug(struct wl1271 *wl, u8 channel); 81830513abSEliad Peller int wl18xx_cmd_dfs_master_restart(struct wl1271 *wl, struct wl12xx_vif *wlvif); 82fcab1890SEliad Peller #endif 83