diff options
author | Eliad Peller <eliad@wizery.com> | 2012-01-31 04:57:19 -0500 |
---|---|---|
committer | Luciano Coelho <coelho@ti.com> | 2012-02-15 01:38:31 -0500 |
commit | 8332f0f6dc017aef9aa4a95a6a2bd6eba4c82d0a (patch) | |
tree | 1fcb84cc55ed902c489f10f167a0747d9223604e /drivers/net | |
parent | 9c531149af5b6e81d204c3f633827338ad9b327e (diff) |
wl12xx: fw api change - update cmd/acx/event enums
Update enums/structs to the new fw api.
Signed-off-by: Eyal Shapira <eyal@wizery.com>
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/wireless/wl12xx/acx.h | 137 | ||||
-rw-r--r-- | drivers/net/wireless/wl12xx/boot.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/wl12xx/cmd.c | 12 | ||||
-rw-r--r-- | drivers/net/wireless/wl12xx/cmd.h | 122 | ||||
-rw-r--r-- | drivers/net/wireless/wl12xx/event.h | 15 | ||||
-rw-r--r-- | drivers/net/wireless/wl12xx/main.c | 2 |
6 files changed, 156 insertions, 134 deletions
diff --git a/drivers/net/wireless/wl12xx/acx.h b/drivers/net/wireless/wl12xx/acx.h index a5bf761c83d2..0749df58c85d 100644 --- a/drivers/net/wireless/wl12xx/acx.h +++ b/drivers/net/wireless/wl12xx/acx.h | |||
@@ -1153,74 +1153,75 @@ struct wl12xx_acx_config_hangover { | |||
1153 | } __packed; | 1153 | } __packed; |
1154 | 1154 | ||
1155 | enum { | 1155 | enum { |
1156 | ACX_WAKE_UP_CONDITIONS = 0x0002, | 1156 | ACX_WAKE_UP_CONDITIONS = 0x0000, |
1157 | ACX_MEM_CFG = 0x0003, | 1157 | ACX_MEM_CFG = 0x0001, |
1158 | ACX_SLOT = 0x0004, | 1158 | ACX_SLOT = 0x0002, |
1159 | ACX_AC_CFG = 0x0007, | 1159 | ACX_AC_CFG = 0x0003, |
1160 | ACX_MEM_MAP = 0x0008, | 1160 | ACX_MEM_MAP = 0x0004, |
1161 | ACX_AID = 0x000A, | 1161 | ACX_AID = 0x0005, |
1162 | ACX_MEDIUM_USAGE = 0x000F, | 1162 | ACX_MEDIUM_USAGE = 0x0006, |
1163 | ACX_TX_QUEUE_CFG = 0x0011, /* FIXME: only used by wl1251 */ | 1163 | ACX_STATISTICS = 0x0007, |
1164 | ACX_STATISTICS = 0x0013, /* Debug API */ | 1164 | ACX_PWR_CONSUMPTION_STATISTICS = 0x0008, |
1165 | ACX_PWR_CONSUMPTION_STATISTICS = 0x0014, | 1165 | ACX_TID_CFG = 0x0009, |
1166 | ACX_FEATURE_CFG = 0x0015, | 1166 | ACX_PS_RX_STREAMING = 0x000A, |
1167 | ACX_TID_CFG = 0x001A, | 1167 | ACX_BEACON_FILTER_OPT = 0x000B, |
1168 | ACX_PS_RX_STREAMING = 0x001B, | 1168 | ACX_NOISE_HIST = 0x000C, |
1169 | ACX_BEACON_FILTER_OPT = 0x001F, | 1169 | ACX_HDK_VERSION = 0x000D, |
1170 | ACX_NOISE_HIST = 0x0021, | 1170 | ACX_PD_THRESHOLD = 0x000E, |
1171 | ACX_HDK_VERSION = 0x0022, /* ??? */ | 1171 | ACX_TX_CONFIG_OPT = 0x000F, |
1172 | ACX_PD_THRESHOLD = 0x0023, | 1172 | ACX_CCA_THRESHOLD = 0x0010, |
1173 | ACX_TX_CONFIG_OPT = 0x0024, | 1173 | ACX_EVENT_MBOX_MASK = 0x0011, |
1174 | ACX_CCA_THRESHOLD = 0x0025, | 1174 | ACX_CONN_MONIT_PARAMS = 0x0012, |
1175 | ACX_EVENT_MBOX_MASK = 0x0026, | 1175 | ACX_DISABLE_BROADCASTS = 0x0013, |
1176 | ACX_CONN_MONIT_PARAMS = 0x002D, | 1176 | ACX_BCN_DTIM_OPTIONS = 0x0014, |
1177 | ACX_BCN_DTIM_OPTIONS = 0x0031, | 1177 | ACX_SG_ENABLE = 0x0015, |
1178 | ACX_SG_ENABLE = 0x0032, | 1178 | ACX_SG_CFG = 0x0016, |
1179 | ACX_SG_CFG = 0x0033, | 1179 | ACX_FM_COEX_CFG = 0x0017, |
1180 | ACX_FM_COEX_CFG = 0x0034, | 1180 | ACX_BEACON_FILTER_TABLE = 0x0018, |
1181 | ACX_BEACON_FILTER_TABLE = 0x0038, | 1181 | ACX_ARP_IP_FILTER = 0x0019, |
1182 | ACX_ARP_IP_FILTER = 0x0039, | 1182 | ACX_ROAMING_STATISTICS_TBL = 0x001A, |
1183 | ACX_ROAMING_STATISTICS_TBL = 0x003B, | 1183 | ACX_RATE_POLICY = 0x001B, |
1184 | ACX_RATE_POLICY = 0x003D, | 1184 | ACX_CTS_PROTECTION = 0x001C, |
1185 | ACX_CTS_PROTECTION = 0x003E, | 1185 | ACX_SLEEP_AUTH = 0x001D, |
1186 | ACX_SLEEP_AUTH = 0x003F, | 1186 | ACX_PREAMBLE_TYPE = 0x001E, |
1187 | ACX_PREAMBLE_TYPE = 0x0040, | 1187 | ACX_ERROR_CNT = 0x001F, |
1188 | ACX_ERROR_CNT = 0x0041, | 1188 | ACX_IBSS_FILTER = 0x0020, |
1189 | ACX_IBSS_FILTER = 0x0044, | 1189 | ACX_SERVICE_PERIOD_TIMEOUT = 0x0021, |
1190 | ACX_SERVICE_PERIOD_TIMEOUT = 0x0045, | 1190 | ACX_TSF_INFO = 0x0022, |
1191 | ACX_TSF_INFO = 0x0046, | 1191 | ACX_CONFIG_PS_WMM = 0x0023, |
1192 | ACX_CONFIG_PS_WMM = 0x0049, | 1192 | ACX_ENABLE_RX_DATA_FILTER = 0x0024, |
1193 | ACX_ENABLE_RX_DATA_FILTER = 0x004A, | 1193 | ACX_SET_RX_DATA_FILTER = 0x0025, |
1194 | ACX_SET_RX_DATA_FILTER = 0x004B, | 1194 | ACX_GET_DATA_FILTER_STATISTICS = 0x0026, |
1195 | ACX_GET_DATA_FILTER_STATISTICS = 0x004C, | 1195 | ACX_RX_CONFIG_OPT = 0x0027, |
1196 | ACX_RX_CONFIG_OPT = 0x004E, | 1196 | ACX_FRAG_CFG = 0x0028, |
1197 | ACX_FRAG_CFG = 0x004F, | 1197 | ACX_BET_ENABLE = 0x0029, |
1198 | ACX_BET_ENABLE = 0x0050, | 1198 | ACX_RSSI_SNR_TRIGGER = 0x002A, |
1199 | ACX_RSSI_SNR_TRIGGER = 0x0051, | 1199 | ACX_RSSI_SNR_WEIGHTS = 0x002B, |
1200 | ACX_RSSI_SNR_WEIGHTS = 0x0052, | 1200 | ACX_KEEP_ALIVE_MODE = 0x002C, |
1201 | ACX_KEEP_ALIVE_MODE = 0x0053, | 1201 | ACX_SET_KEEP_ALIVE_CONFIG = 0x002D, |
1202 | ACX_SET_KEEP_ALIVE_CONFIG = 0x0054, | 1202 | ACX_BA_SESSION_INIT_POLICY = 0x002E, |
1203 | ACX_BA_SESSION_INIT_POLICY = 0x0055, | 1203 | ACX_BA_SESSION_RX_SETUP = 0x002F, |
1204 | ACX_BA_SESSION_RX_SETUP = 0x0056, | 1204 | ACX_PEER_HT_CAP = 0x0030, |
1205 | ACX_PEER_HT_CAP = 0x0057, | 1205 | ACX_HT_BSS_OPERATION = 0x0031, |
1206 | ACX_HT_BSS_OPERATION = 0x0058, | 1206 | ACX_COEX_ACTIVITY = 0x0032, |
1207 | ACX_COEX_ACTIVITY = 0x0059, | 1207 | ACX_BURST_MODE = 0x0033, |
1208 | ACX_BURST_MODE = 0x005C, | 1208 | ACX_SET_RATE_MGMT_PARAMS = 0x0034, |
1209 | ACX_SET_RATE_MGMT_PARAMS = 0x005D, | 1209 | ACX_GET_RATE_MGMT_PARAMS = 0x0035, |
1210 | ACX_SET_RATE_ADAPT_PARAMS = 0x0060, | 1210 | ACX_SET_RATE_ADAPT_PARAMS = 0x0036, |
1211 | ACX_SET_DCO_ITRIM_PARAMS = 0x0061, | 1211 | ACX_SET_DCO_ITRIM_PARAMS = 0x0037, |
1212 | ACX_GEN_FW_CMD = 0x0070, | 1212 | ACX_GEN_FW_CMD = 0x0038, |
1213 | ACX_HOST_IF_CFG_BITMAP = 0x0071, | 1213 | ACX_HOST_IF_CFG_BITMAP = 0x0039, |
1214 | ACX_MAX_TX_FAILURE = 0x0072, | 1214 | ACX_MAX_TX_FAILURE = 0x003A, |
1215 | ACX_UPDATE_INCONNECTION_STA_LIST = 0x0073, | 1215 | ACX_UPDATE_INCONNECTION_STA_LIST = 0x003B, |
1216 | DOT11_RX_MSDU_LIFE_TIME = 0x1004, | 1216 | DOT11_RX_MSDU_LIFE_TIME = 0x003C, |
1217 | DOT11_CUR_TX_PWR = 0x100D, | 1217 | DOT11_CUR_TX_PWR = 0x003D, |
1218 | DOT11_RX_DOT11_MODE = 0x1012, | 1218 | DOT11_RTS_THRESHOLD = 0x003E, |
1219 | DOT11_RTS_THRESHOLD = 0x1013, | 1219 | DOT11_GROUP_ADDRESS_TBL = 0x003F, |
1220 | DOT11_GROUP_ADDRESS_TBL = 0x1014, | 1220 | ACX_PM_CONFIG = 0x0040, |
1221 | ACX_PM_CONFIG = 0x1016, | 1221 | ACX_CONFIG_PS = 0x0041, |
1222 | ACX_CONFIG_PS = 0x1017, | 1222 | ACX_CONFIG_HANGOVER = 0x0042, |
1223 | ACX_CONFIG_HANGOVER = 0x1018, | 1223 | ACX_FEATURE_CFG = 0x0043, |
1224 | ACX_PROTECTION_CFG = 0x0044, | ||
1224 | }; | 1225 | }; |
1225 | 1226 | ||
1226 | 1227 | ||
diff --git a/drivers/net/wireless/wl12xx/boot.c b/drivers/net/wireless/wl12xx/boot.c index 32a7f9b69d7c..eea2dda6e6e7 100644 --- a/drivers/net/wireless/wl12xx/boot.c +++ b/drivers/net/wireless/wl12xx/boot.c | |||
@@ -449,7 +449,7 @@ static int wl1271_boot_run_firmware(struct wl1271 *wl) | |||
449 | wl->event_mask = BSS_LOSE_EVENT_ID | | 449 | wl->event_mask = BSS_LOSE_EVENT_ID | |
450 | SCAN_COMPLETE_EVENT_ID | | 450 | SCAN_COMPLETE_EVENT_ID | |
451 | PS_REPORT_EVENT_ID | | 451 | PS_REPORT_EVENT_ID | |
452 | DISCONNECT_EVENT_COMPLETE_ID | | 452 | ROLE_STOP_COMPLETE_EVENT_ID | |
453 | RSSI_SNR_TRIGGER_0_EVENT_ID | | 453 | RSSI_SNR_TRIGGER_0_EVENT_ID | |
454 | PSPOLL_DELIVERY_FAILURE_EVENT_ID | | 454 | PSPOLL_DELIVERY_FAILURE_EVENT_ID | |
455 | SOFT_GEMINI_SENSE_EVENT_ID | | 455 | SOFT_GEMINI_SENSE_EVENT_ID | |
diff --git a/drivers/net/wireless/wl12xx/cmd.c b/drivers/net/wireless/wl12xx/cmd.c index 10dba19f3eb3..88e94c5938a4 100644 --- a/drivers/net/wireless/wl12xx/cmd.c +++ b/drivers/net/wireless/wl12xx/cmd.c | |||
@@ -566,7 +566,7 @@ static int wl12xx_cmd_role_stop_dev(struct wl1271 *wl, | |||
566 | goto out_free; | 566 | goto out_free; |
567 | } | 567 | } |
568 | 568 | ||
569 | ret = wl1271_cmd_wait_for_event(wl, DISCONNECT_EVENT_COMPLETE_ID); | 569 | ret = wl1271_cmd_wait_for_event(wl, ROLE_STOP_COMPLETE_EVENT_ID); |
570 | if (ret < 0) { | 570 | if (ret < 0) { |
571 | wl1271_error("cmd role stop dev event completion error"); | 571 | wl1271_error("cmd role stop dev event completion error"); |
572 | goto out_free; | 572 | goto out_free; |
@@ -715,6 +715,8 @@ int wl12xx_cmd_role_start_ap(struct wl1271 *wl, struct wl12xx_vif *wlvif) | |||
715 | cmd->ap.beacon_interval = cpu_to_le16(wlvif->beacon_int); | 715 | cmd->ap.beacon_interval = cpu_to_le16(wlvif->beacon_int); |
716 | cmd->ap.dtim_interval = bss_conf->dtim_period; | 716 | cmd->ap.dtim_interval = bss_conf->dtim_period; |
717 | cmd->ap.beacon_expiry = WL1271_AP_DEF_BEACON_EXP; | 717 | cmd->ap.beacon_expiry = WL1271_AP_DEF_BEACON_EXP; |
718 | /* FIXME: Change when adding DFS */ | ||
719 | cmd->ap.reset_tsf = 1; /* By default reset AP TSF */ | ||
718 | cmd->channel = wlvif->channel; | 720 | cmd->channel = wlvif->channel; |
719 | 721 | ||
720 | if (!bss_conf->hidden_ssid) { | 722 | if (!bss_conf->hidden_ssid) { |
@@ -1756,6 +1758,7 @@ out: | |||
1756 | } | 1758 | } |
1757 | 1759 | ||
1758 | int wl12xx_cmd_channel_switch(struct wl1271 *wl, | 1760 | int wl12xx_cmd_channel_switch(struct wl1271 *wl, |
1761 | struct wl12xx_vif *wlvif, | ||
1759 | struct ieee80211_channel_switch *ch_switch) | 1762 | struct ieee80211_channel_switch *ch_switch) |
1760 | { | 1763 | { |
1761 | struct wl12xx_cmd_channel_switch *cmd; | 1764 | struct wl12xx_cmd_channel_switch *cmd; |
@@ -1769,10 +1772,13 @@ int wl12xx_cmd_channel_switch(struct wl1271 *wl, | |||
1769 | goto out; | 1772 | goto out; |
1770 | } | 1773 | } |
1771 | 1774 | ||
1775 | cmd->role_id = wlvif->role_id; | ||
1772 | cmd->channel = ch_switch->channel->hw_value; | 1776 | cmd->channel = ch_switch->channel->hw_value; |
1773 | cmd->switch_time = ch_switch->count; | 1777 | cmd->switch_time = ch_switch->count; |
1774 | cmd->tx_suspend = ch_switch->block_tx; | 1778 | cmd->stop_tx = ch_switch->block_tx; |
1775 | cmd->flush = 0; /* this value is ignored by the FW */ | 1779 | |
1780 | /* FIXME: control from mac80211 in the future */ | ||
1781 | cmd->post_switch_tx_disable = 0; /* Enable TX on the target channel */ | ||
1776 | 1782 | ||
1777 | ret = wl1271_cmd_send(wl, CMD_CHANNEL_SWITCH, cmd, sizeof(*cmd), 0); | 1783 | ret = wl1271_cmd_send(wl, CMD_CHANNEL_SWITCH, cmd, sizeof(*cmd), 0); |
1778 | if (ret < 0) { | 1784 | if (ret < 0) { |
diff --git a/drivers/net/wireless/wl12xx/cmd.h b/drivers/net/wireless/wl12xx/cmd.h index 8e8035d33068..edd240db0dcc 100644 --- a/drivers/net/wireless/wl12xx/cmd.h +++ b/drivers/net/wireless/wl12xx/cmd.h | |||
@@ -91,6 +91,7 @@ int wl12xx_cmd_config_fwlog(struct wl1271 *wl); | |||
91 | int wl12xx_cmd_start_fwlog(struct wl1271 *wl); | 91 | int wl12xx_cmd_start_fwlog(struct wl1271 *wl); |
92 | int wl12xx_cmd_stop_fwlog(struct wl1271 *wl); | 92 | int wl12xx_cmd_stop_fwlog(struct wl1271 *wl); |
93 | int wl12xx_cmd_channel_switch(struct wl1271 *wl, | 93 | int wl12xx_cmd_channel_switch(struct wl1271 *wl, |
94 | struct wl12xx_vif *wlvif, | ||
94 | struct ieee80211_channel_switch *ch_switch); | 95 | struct ieee80211_channel_switch *ch_switch); |
95 | int wl12xx_cmd_stop_channel_switch(struct wl1271 *wl); | 96 | int wl12xx_cmd_stop_channel_switch(struct wl1271 *wl); |
96 | int wl12xx_allocate_link(struct wl1271 *wl, struct wl12xx_vif *wlvif, | 97 | int wl12xx_allocate_link(struct wl1271 *wl, struct wl12xx_vif *wlvif, |
@@ -98,62 +99,65 @@ int wl12xx_allocate_link(struct wl1271 *wl, struct wl12xx_vif *wlvif, | |||
98 | void wl12xx_free_link(struct wl1271 *wl, struct wl12xx_vif *wlvif, u8 *hlid); | 99 | void wl12xx_free_link(struct wl1271 *wl, struct wl12xx_vif *wlvif, u8 *hlid); |
99 | 100 | ||
100 | enum wl1271_commands { | 101 | enum wl1271_commands { |
101 | CMD_INTERROGATE = 1, /*use this to read information elements*/ | 102 | CMD_INTERROGATE = 1, /* use this to read information elements */ |
102 | CMD_CONFIGURE = 2, /*use this to write information elements*/ | 103 | CMD_CONFIGURE = 2, /* use this to write information elements */ |
103 | CMD_ENABLE_RX = 3, | 104 | CMD_ENABLE_RX = 3, |
104 | CMD_ENABLE_TX = 4, | 105 | CMD_ENABLE_TX = 4, |
105 | CMD_DISABLE_RX = 5, | 106 | CMD_DISABLE_RX = 5, |
106 | CMD_DISABLE_TX = 6, | 107 | CMD_DISABLE_TX = 6, |
107 | CMD_SCAN = 8, | 108 | CMD_SCAN = 7, |
108 | CMD_STOP_SCAN = 9, | 109 | CMD_STOP_SCAN = 8, |
109 | CMD_SET_KEYS = 12, | 110 | CMD_SET_KEYS = 9, |
110 | CMD_READ_MEMORY = 13, | 111 | CMD_READ_MEMORY = 10, |
111 | CMD_WRITE_MEMORY = 14, | 112 | CMD_WRITE_MEMORY = 11, |
112 | CMD_SET_TEMPLATE = 19, | 113 | CMD_SET_TEMPLATE = 12, |
113 | CMD_TEST = 23, | 114 | CMD_TEST = 13, |
114 | CMD_NOISE_HIST = 28, | 115 | CMD_NOISE_HIST = 14, |
115 | CMD_QUIET_ELEMENT_SET_STATE = 29, | 116 | CMD_QUIET_ELEMENT_SET_STATE = 15, |
116 | CMD_SET_BCN_MODE = 33, | 117 | CMD_SET_BCN_MODE = 16, |
117 | CMD_MEASUREMENT = 34, | 118 | |
118 | CMD_STOP_MEASUREMENT = 35, | 119 | CMD_MEASUREMENT = 17, |
119 | CMD_SET_PS_MODE = 37, | 120 | CMD_STOP_MEASUREMENT = 18, |
120 | CMD_CHANNEL_SWITCH = 38, | 121 | CMD_SET_PS_MODE = 19, |
121 | CMD_STOP_CHANNEL_SWICTH = 39, | 122 | CMD_CHANNEL_SWITCH = 20, |
122 | CMD_AP_DISCOVERY = 40, | 123 | CMD_STOP_CHANNEL_SWICTH = 21, |
123 | CMD_STOP_AP_DISCOVERY = 41, | 124 | CMD_AP_DISCOVERY = 22, |
124 | CMD_HEALTH_CHECK = 45, | 125 | CMD_STOP_AP_DISCOVERY = 23, |
125 | CMD_DEBUG = 46, | 126 | CMD_HEALTH_CHECK = 24, |
126 | CMD_TRIGGER_SCAN_TO = 47, | 127 | CMD_DEBUG = 25, |
127 | CMD_CONNECTION_SCAN_CFG = 48, | 128 | CMD_TRIGGER_SCAN_TO = 26, |
128 | CMD_CONNECTION_SCAN_SSID_CFG = 49, | 129 | CMD_CONNECTION_SCAN_CFG = 27, |
129 | CMD_START_PERIODIC_SCAN = 50, | 130 | CMD_CONNECTION_SCAN_SSID_CFG = 28, |
130 | CMD_STOP_PERIODIC_SCAN = 51, | 131 | CMD_START_PERIODIC_SCAN = 29, |
131 | CMD_SET_PEER_STATE = 52, | 132 | CMD_STOP_PERIODIC_SCAN = 30, |
132 | CMD_REMAIN_ON_CHANNEL = 53, | 133 | CMD_SET_PEER_STATE = 31, |
133 | CMD_CANCEL_REMAIN_ON_CHANNEL = 54, | 134 | CMD_REMAIN_ON_CHANNEL = 32, |
134 | 135 | CMD_CANCEL_REMAIN_ON_CHANNEL = 33, | |
135 | CMD_CONFIG_FWLOGGER = 55, | 136 | CMD_CONFIG_FWLOGGER = 34, |
136 | CMD_START_FWLOGGER = 56, | 137 | CMD_START_FWLOGGER = 35, |
137 | CMD_STOP_FWLOGGER = 57, | 138 | CMD_STOP_FWLOGGER = 36, |
138 | 139 | ||
139 | /* AP commands */ | 140 | /* Access point commands */ |
140 | CMD_ADD_PEER = 62, | 141 | CMD_ADD_PEER = 37, |
141 | CMD_REMOVE_PEER = 63, | 142 | CMD_REMOVE_PEER = 38, |
142 | 143 | ||
143 | /* Role API */ | 144 | /* Role API */ |
144 | CMD_ROLE_ENABLE = 70, | 145 | CMD_ROLE_ENABLE = 39, |
145 | CMD_ROLE_DISABLE = 71, | 146 | CMD_ROLE_DISABLE = 40, |
146 | CMD_ROLE_START = 72, | 147 | CMD_ROLE_START = 41, |
147 | CMD_ROLE_STOP = 73, | 148 | CMD_ROLE_STOP = 42, |
148 | 149 | ||
149 | /* WIFI Direct */ | 150 | /* DFS */ |
150 | CMD_WFD_START_DISCOVERY = 80, | 151 | CMD_START_RADAR_DETECTION = 43, |
151 | CMD_WFD_STOP_DISCOVERY = 81, | 152 | CMD_STOP_RADAR_DETECTION = 44, |
152 | CMD_WFD_ATTRIBUTE_CONFIG = 82, | ||
153 | 153 | ||
154 | CMD_NOP = 100, | 154 | /* WIFI Direct */ |
155 | CMD_WFD_START_DISCOVERY = 45, | ||
156 | CMD_WFD_STOP_DISCOVERY = 46, | ||
157 | CMD_WFD_ATTRIBUTE_CONFIG = 47, | ||
158 | CMD_NOP = 48, | ||
159 | CMD_LAST_COMMAND, | ||
155 | 160 | ||
156 | NUM_COMMANDS, | ||
157 | MAX_COMMAND_ID = 0xFFFF, | 161 | MAX_COMMAND_ID = 0xFFFF, |
158 | }; | 162 | }; |
159 | 163 | ||
@@ -341,7 +345,9 @@ struct wl12xx_cmd_role_start { | |||
341 | u8 ssid_len; | 345 | u8 ssid_len; |
342 | u8 ssid[IEEE80211_MAX_SSID_LEN]; | 346 | u8 ssid[IEEE80211_MAX_SSID_LEN]; |
343 | 347 | ||
344 | u8 padding_1[5]; | 348 | u8 reset_tsf; |
349 | |||
350 | u8 padding_1[4]; | ||
345 | } __packed ap; | 351 | } __packed ap; |
346 | }; | 352 | }; |
347 | } __packed; | 353 | } __packed; |
@@ -701,14 +707,18 @@ struct wl12xx_cmd_stop_fwlog { | |||
701 | struct wl12xx_cmd_channel_switch { | 707 | struct wl12xx_cmd_channel_switch { |
702 | struct wl1271_cmd_header header; | 708 | struct wl1271_cmd_header header; |
703 | 709 | ||
710 | u8 role_id; | ||
711 | |||
704 | /* The new serving channel */ | 712 | /* The new serving channel */ |
705 | u8 channel; | 713 | u8 channel; |
706 | /* Relative time of the serving channel switch in TBTT units */ | 714 | /* Relative time of the serving channel switch in TBTT units */ |
707 | u8 switch_time; | 715 | u8 switch_time; |
708 | /* 1: Suspend TX till switch time; 0: Do not suspend TX */ | 716 | /* Stop the role TX, should expect it after radar detection */ |
709 | u8 tx_suspend; | 717 | u8 stop_tx; |
710 | /* 1: Flush TX at switch time; 0: Do not flush */ | 718 | /* The target channel tx status 1-stopped 0-open*/ |
711 | u8 flush; | 719 | u8 post_switch_tx_disable; |
720 | |||
721 | u8 padding[3]; | ||
712 | } __packed; | 722 | } __packed; |
713 | 723 | ||
714 | struct wl12xx_cmd_stop_channel_switch { | 724 | struct wl12xx_cmd_stop_channel_switch { |
diff --git a/drivers/net/wireless/wl12xx/event.h b/drivers/net/wireless/wl12xx/event.h index 1d878ba47bf4..b41f730f11dd 100644 --- a/drivers/net/wireless/wl12xx/event.h +++ b/drivers/net/wireless/wl12xx/event.h | |||
@@ -53,8 +53,8 @@ enum { | |||
53 | AP_DISCOVERY_COMPLETE_EVENT_ID = BIT(12), | 53 | AP_DISCOVERY_COMPLETE_EVENT_ID = BIT(12), |
54 | PS_REPORT_EVENT_ID = BIT(13), | 54 | PS_REPORT_EVENT_ID = BIT(13), |
55 | PSPOLL_DELIVERY_FAILURE_EVENT_ID = BIT(14), | 55 | PSPOLL_DELIVERY_FAILURE_EVENT_ID = BIT(14), |
56 | DISCONNECT_EVENT_COMPLETE_ID = BIT(15), | 56 | ROLE_STOP_COMPLETE_EVENT_ID = BIT(15), |
57 | /* BIT(16) is reserved */ | 57 | RADAR_DETECTED_EVENT_ID = BIT(16), |
58 | CHANNEL_SWITCH_COMPLETE_EVENT_ID = BIT(17), | 58 | CHANNEL_SWITCH_COMPLETE_EVENT_ID = BIT(17), |
59 | BSS_LOSE_EVENT_ID = BIT(18), | 59 | BSS_LOSE_EVENT_ID = BIT(18), |
60 | REGAINED_BSS_EVENT_ID = BIT(19), | 60 | REGAINED_BSS_EVENT_ID = BIT(19), |
@@ -94,7 +94,7 @@ struct event_mailbox { | |||
94 | u8 soft_gemini_sense_info; | 94 | u8 soft_gemini_sense_info; |
95 | u8 soft_gemini_protective_info; | 95 | u8 soft_gemini_protective_info; |
96 | s8 rssi_snr_trigger_metric[NUM_OF_RSSI_SNR_TRIGGERS]; | 96 | s8 rssi_snr_trigger_metric[NUM_OF_RSSI_SNR_TRIGGERS]; |
97 | u8 channel_switch_status; | 97 | u8 change_auto_mode_timeout; |
98 | u8 scheduled_scan_status; | 98 | u8 scheduled_scan_status; |
99 | u8 ps_status; | 99 | u8 ps_status; |
100 | /* tuned channel (roc) */ | 100 | /* tuned channel (roc) */ |
@@ -119,12 +119,17 @@ struct event_mailbox { | |||
119 | u8 rx_ba_allowed; | 119 | u8 rx_ba_allowed; |
120 | u8 reserved_6[2]; | 120 | u8 reserved_6[2]; |
121 | 121 | ||
122 | /* Channel switch results */ | ||
123 | |||
124 | u8 channel_switch_role_id; | ||
125 | u8 channel_switch_status; | ||
126 | u8 reserved_7[2]; | ||
127 | |||
122 | u8 ps_poll_delivery_failure_role_ids; | 128 | u8 ps_poll_delivery_failure_role_ids; |
123 | u8 stopped_role_ids; | 129 | u8 stopped_role_ids; |
124 | u8 started_role_ids; | 130 | u8 started_role_ids; |
125 | u8 change_auto_mode_timeout; | ||
126 | 131 | ||
127 | u8 reserved_7[12]; | 132 | u8 reserved_8[9]; |
128 | } __packed; | 133 | } __packed; |
129 | 134 | ||
130 | int wl1271_event_unmask(struct wl1271 *wl); | 135 | int wl1271_event_unmask(struct wl1271 *wl); |
diff --git a/drivers/net/wireless/wl12xx/main.c b/drivers/net/wireless/wl12xx/main.c index 1cdffa88eb02..a339a85ecfb0 100644 --- a/drivers/net/wireless/wl12xx/main.c +++ b/drivers/net/wireless/wl12xx/main.c | |||
@@ -4409,7 +4409,7 @@ static void wl12xx_op_channel_switch(struct ieee80211_hw *hw, | |||
4409 | 4409 | ||
4410 | /* TODO: change mac80211 to pass vif as param */ | 4410 | /* TODO: change mac80211 to pass vif as param */ |
4411 | wl12xx_for_each_wlvif_sta(wl, wlvif) { | 4411 | wl12xx_for_each_wlvif_sta(wl, wlvif) { |
4412 | ret = wl12xx_cmd_channel_switch(wl, ch_switch); | 4412 | ret = wl12xx_cmd_channel_switch(wl, wlvif, ch_switch); |
4413 | 4413 | ||
4414 | if (!ret) | 4414 | if (!ret) |
4415 | set_bit(WLVIF_FLAG_CS_PROGRESS, &wlvif->flags); | 4415 | set_bit(WLVIF_FLAG_CS_PROGRESS, &wlvif->flags); |