Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Marvell Wireless LAN device driver: station event handling |
| 3 | * |
Xinming Hu | 65da33f | 2014-06-19 21:38:57 -0700 | [diff] [blame] | 4 | * Copyright (C) 2011-2014, Marvell International Ltd. |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 5 | * |
| 6 | * This software file (the "File") is distributed by Marvell International |
| 7 | * Ltd. under the terms of the GNU General Public License Version 2, June 1991 |
| 8 | * (the "License"). You may use, redistribute and/or modify this File in |
| 9 | * accordance with the terms and conditions of the License, a copy of which |
| 10 | * is available by writing to the Free Software Foundation, Inc., |
| 11 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the |
| 12 | * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. |
| 13 | * |
| 14 | * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE |
| 15 | * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE |
| 16 | * ARE EXPRESSLY DISCLAIMED. The License provides additional details about |
| 17 | * this warranty disclaimer. |
| 18 | */ |
| 19 | |
| 20 | #include "decl.h" |
| 21 | #include "ioctl.h" |
| 22 | #include "util.h" |
| 23 | #include "fw.h" |
| 24 | #include "main.h" |
| 25 | #include "wmm.h" |
| 26 | #include "11n.h" |
| 27 | |
| 28 | /* |
| 29 | * This function resets the connection state. |
| 30 | * |
| 31 | * The function is invoked after receiving a disconnect event from firmware, |
| 32 | * and performs the following actions - |
| 33 | * - Set media status to disconnected |
| 34 | * - Clean up Tx and Rx packets |
| 35 | * - Resets SNR/NF/RSSI value in driver |
| 36 | * - Resets security configurations in driver |
| 37 | * - Enables auto data rate |
| 38 | * - Saves the previous SSID and BSSID so that they can |
| 39 | * be used for re-association, if required |
| 40 | * - Erases current SSID and BSSID information |
| 41 | * - Sends a disconnect event to upper layers/applications. |
| 42 | */ |
Amitkumar Karwar | c62d50a | 2016-05-25 08:37:35 -0700 | [diff] [blame] | 43 | void mwifiex_reset_connect_state(struct mwifiex_private *priv, u16 reason_code, |
| 44 | bool from_ap) |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 45 | { |
| 46 | struct mwifiex_adapter *adapter = priv->adapter; |
| 47 | |
| 48 | if (!priv->media_connected) |
| 49 | return; |
| 50 | |
Zhaoyang Liu | acebe8c | 2015-05-12 00:48:20 +0530 | [diff] [blame] | 51 | mwifiex_dbg(adapter, INFO, |
| 52 | "info: handles disconnect event\n"); |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 53 | |
| 54 | priv->media_connected = false; |
| 55 | |
| 56 | priv->scan_block = false; |
Avinash Patil | 5c894633 | 2015-06-22 19:06:18 +0530 | [diff] [blame] | 57 | priv->port_open = false; |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 58 | |
Avinash Patil | be104b9 | 2014-02-07 16:30:41 -0800 | [diff] [blame] | 59 | if ((GET_BSS_ROLE(priv) == MWIFIEX_BSS_ROLE_STA) && |
Avinash Patil | 9927baa | 2014-11-13 21:54:16 +0530 | [diff] [blame] | 60 | ISSUPP_TDLS_ENABLED(priv->adapter->fw_cap_info)) { |
Avinash Patil | be104b9 | 2014-02-07 16:30:41 -0800 | [diff] [blame] | 61 | mwifiex_disable_all_tdls_links(priv); |
| 62 | |
Avinash Patil | 9927baa | 2014-11-13 21:54:16 +0530 | [diff] [blame] | 63 | if (priv->adapter->auto_tdls) |
| 64 | mwifiex_clean_auto_tdls(priv); |
| 65 | } |
| 66 | |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 67 | /* Free Tx and Rx packets, report disconnect to upper layer */ |
| 68 | mwifiex_clean_txrx(priv); |
| 69 | |
| 70 | /* Reset SNR/NF/RSSI values */ |
| 71 | priv->data_rssi_last = 0; |
| 72 | priv->data_nf_last = 0; |
| 73 | priv->data_rssi_avg = 0; |
| 74 | priv->data_nf_avg = 0; |
| 75 | priv->bcn_rssi_last = 0; |
| 76 | priv->bcn_nf_last = 0; |
| 77 | priv->bcn_rssi_avg = 0; |
| 78 | priv->bcn_nf_avg = 0; |
| 79 | priv->rxpd_rate = 0; |
| 80 | priv->rxpd_htinfo = 0; |
| 81 | priv->sec_info.wpa_enabled = false; |
| 82 | priv->sec_info.wpa2_enabled = false; |
| 83 | priv->wpa_ie_len = 0; |
| 84 | |
| 85 | priv->sec_info.wapi_enabled = false; |
| 86 | priv->wapi_ie_len = 0; |
| 87 | priv->sec_info.wapi_key_on = false; |
| 88 | |
Yogesh Ashok Powar | 2be50b8 | 2011-04-01 18:36:47 -0700 | [diff] [blame] | 89 | priv->sec_info.encryption_mode = 0; |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 90 | |
| 91 | /* Enable auto data rate */ |
| 92 | priv->is_data_rate_auto = true; |
| 93 | priv->data_rate = 0; |
| 94 | |
Nachiket Kukade | 44ca509 | 2016-01-31 23:44:46 -0800 | [diff] [blame] | 95 | priv->assoc_resp_ht_param = 0; |
| 96 | priv->ht_param_present = false; |
| 97 | |
Xinming Hu | cbf6e05 | 2014-12-23 19:14:07 +0530 | [diff] [blame] | 98 | if ((GET_BSS_ROLE(priv) == MWIFIEX_BSS_ROLE_STA || |
| 99 | GET_BSS_ROLE(priv) == MWIFIEX_BSS_ROLE_UAP) && priv->hist_data) |
| 100 | mwifiex_hist_data_reset(priv); |
| 101 | |
Bing Zhao | eecd825 | 2011-03-28 17:55:41 -0700 | [diff] [blame] | 102 | if (priv->bss_mode == NL80211_IFTYPE_ADHOC) { |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 103 | priv->adhoc_state = ADHOC_IDLE; |
| 104 | priv->adhoc_is_link_sensed = false; |
| 105 | } |
| 106 | |
| 107 | /* |
| 108 | * Memorize the previous SSID and BSSID so |
| 109 | * it could be used for re-assoc |
| 110 | */ |
| 111 | |
Zhaoyang Liu | acebe8c | 2015-05-12 00:48:20 +0530 | [diff] [blame] | 112 | mwifiex_dbg(adapter, INFO, |
| 113 | "info: previous SSID=%s, SSID len=%u\n", |
| 114 | priv->prev_ssid.ssid, priv->prev_ssid.ssid_len); |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 115 | |
Zhaoyang Liu | acebe8c | 2015-05-12 00:48:20 +0530 | [diff] [blame] | 116 | mwifiex_dbg(adapter, INFO, |
| 117 | "info: current SSID=%s, SSID len=%u\n", |
| 118 | priv->curr_bss_params.bss_descriptor.ssid.ssid, |
| 119 | priv->curr_bss_params.bss_descriptor.ssid.ssid_len); |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 120 | |
| 121 | memcpy(&priv->prev_ssid, |
| 122 | &priv->curr_bss_params.bss_descriptor.ssid, |
Amitkumar Karwar | b9be5f3 | 2012-02-27 22:04:14 -0800 | [diff] [blame] | 123 | sizeof(struct cfg80211_ssid)); |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 124 | |
| 125 | memcpy(priv->prev_bssid, |
| 126 | priv->curr_bss_params.bss_descriptor.mac_address, ETH_ALEN); |
| 127 | |
| 128 | /* Need to erase the current SSID and BSSID info */ |
| 129 | memset(&priv->curr_bss_params, 0x00, sizeof(priv->curr_bss_params)); |
| 130 | |
| 131 | adapter->tx_lock_flag = false; |
| 132 | adapter->pps_uapsd_mode = false; |
| 133 | |
Amitkumar Karwar | 0c9c4a0 | 2014-02-27 19:35:17 -0800 | [diff] [blame] | 134 | if (adapter->is_cmd_timedout && adapter->curr_cmd) |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 135 | return; |
| 136 | priv->media_connected = false; |
Zhaoyang Liu | acebe8c | 2015-05-12 00:48:20 +0530 | [diff] [blame] | 137 | mwifiex_dbg(adapter, MSG, |
| 138 | "info: successfully disconnected from %pM: reason code %d\n", |
| 139 | priv->cfg_bssid, reason_code); |
Avinash Patil | 9612bd1 | 2013-10-11 18:31:32 -0700 | [diff] [blame] | 140 | if (priv->bss_mode == NL80211_IFTYPE_STATION || |
| 141 | priv->bss_mode == NL80211_IFTYPE_P2P_CLIENT) { |
Amitkumar Karwar | 8cc1d52 | 2012-10-05 20:21:43 -0700 | [diff] [blame] | 142 | cfg80211_disconnected(priv->netdev, reason_code, NULL, 0, |
Amitkumar Karwar | c62d50a | 2016-05-25 08:37:35 -0700 | [diff] [blame] | 143 | !from_ap, GFP_KERNEL); |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 144 | } |
Joe Perches | 93803b3 | 2015-03-02 19:54:49 -0800 | [diff] [blame] | 145 | eth_zero_addr(priv->cfg_bssid); |
Amitkumar Karwar | 38c9d66 | 2011-12-13 20:43:17 -0800 | [diff] [blame] | 146 | |
Avinash Patil | 47411a0 | 2012-11-01 18:44:16 -0700 | [diff] [blame] | 147 | mwifiex_stop_net_dev_queue(priv->netdev, adapter); |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 148 | if (netif_carrier_ok(priv->netdev)) |
| 149 | netif_carrier_off(priv->netdev); |
Ganapathi Bhat | f6b1cbe | 2016-04-05 01:04:34 -0700 | [diff] [blame] | 150 | |
| 151 | mwifiex_send_cmd(priv, HostCmd_CMD_GTK_REKEY_OFFLOAD_CFG, |
| 152 | HostCmd_ACT_GEN_REMOVE, 0, NULL, false); |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 153 | } |
| 154 | |
Avinash Patil | 79ff434 | 2014-05-06 22:02:44 -0700 | [diff] [blame] | 155 | static int mwifiex_parse_tdls_event(struct mwifiex_private *priv, |
| 156 | struct sk_buff *event_skb) |
| 157 | { |
Avinash Patil | c1078bc | 2014-05-21 22:02:29 -0700 | [diff] [blame] | 158 | int ret = 0; |
Avinash Patil | 79ff434 | 2014-05-06 22:02:44 -0700 | [diff] [blame] | 159 | struct mwifiex_adapter *adapter = priv->adapter; |
| 160 | struct mwifiex_sta_node *sta_ptr; |
| 161 | struct mwifiex_tdls_generic_event *tdls_evt = |
| 162 | (void *)event_skb->data + sizeof(adapter->event_cause); |
Xinming Hu | f766987 | 2015-06-22 19:06:11 +0530 | [diff] [blame] | 163 | u8 *mac = tdls_evt->peer_mac; |
Avinash Patil | 79ff434 | 2014-05-06 22:02:44 -0700 | [diff] [blame] | 164 | |
| 165 | /* reserved 2 bytes are not mandatory in tdls event */ |
| 166 | if (event_skb->len < (sizeof(struct mwifiex_tdls_generic_event) - |
| 167 | sizeof(u16) - sizeof(adapter->event_cause))) { |
Zhaoyang Liu | acebe8c | 2015-05-12 00:48:20 +0530 | [diff] [blame] | 168 | mwifiex_dbg(adapter, ERROR, "Invalid event length!\n"); |
Avinash Patil | 79ff434 | 2014-05-06 22:02:44 -0700 | [diff] [blame] | 169 | return -1; |
| 170 | } |
| 171 | |
| 172 | sta_ptr = mwifiex_get_sta_entry(priv, tdls_evt->peer_mac); |
| 173 | if (!sta_ptr) { |
Zhaoyang Liu | acebe8c | 2015-05-12 00:48:20 +0530 | [diff] [blame] | 174 | mwifiex_dbg(adapter, ERROR, "cannot get sta entry!\n"); |
Avinash Patil | 79ff434 | 2014-05-06 22:02:44 -0700 | [diff] [blame] | 175 | return -1; |
| 176 | } |
| 177 | |
| 178 | switch (le16_to_cpu(tdls_evt->type)) { |
| 179 | case TDLS_EVENT_LINK_TEAR_DOWN: |
| 180 | cfg80211_tdls_oper_request(priv->netdev, |
| 181 | tdls_evt->peer_mac, |
| 182 | NL80211_TDLS_TEARDOWN, |
| 183 | le16_to_cpu(tdls_evt->u.reason_code), |
| 184 | GFP_KERNEL); |
| 185 | break; |
Xinming Hu | f766987 | 2015-06-22 19:06:11 +0530 | [diff] [blame] | 186 | case TDLS_EVENT_CHAN_SWITCH_RESULT: |
| 187 | mwifiex_dbg(adapter, EVENT, "tdls channel switch result :\n"); |
| 188 | mwifiex_dbg(adapter, EVENT, |
| 189 | "status=0x%x, reason=0x%x cur_chan=%d\n", |
| 190 | tdls_evt->u.switch_result.status, |
| 191 | tdls_evt->u.switch_result.reason, |
| 192 | tdls_evt->u.switch_result.cur_chan); |
| 193 | |
| 194 | /* tdls channel switch failed */ |
| 195 | if (tdls_evt->u.switch_result.status != 0) { |
| 196 | switch (tdls_evt->u.switch_result.cur_chan) { |
| 197 | case TDLS_BASE_CHANNEL: |
| 198 | sta_ptr->tdls_status = TDLS_IN_BASE_CHAN; |
| 199 | break; |
| 200 | case TDLS_OFF_CHANNEL: |
| 201 | sta_ptr->tdls_status = TDLS_IN_OFF_CHAN; |
| 202 | break; |
| 203 | default: |
| 204 | break; |
| 205 | } |
| 206 | return ret; |
| 207 | } |
| 208 | |
| 209 | /* tdls channel switch success */ |
| 210 | switch (tdls_evt->u.switch_result.cur_chan) { |
| 211 | case TDLS_BASE_CHANNEL: |
| 212 | if (sta_ptr->tdls_status == TDLS_IN_BASE_CHAN) |
| 213 | break; |
| 214 | mwifiex_update_ralist_tx_pause_in_tdls_cs(priv, mac, |
| 215 | false); |
| 216 | sta_ptr->tdls_status = TDLS_IN_BASE_CHAN; |
| 217 | break; |
| 218 | case TDLS_OFF_CHANNEL: |
| 219 | if (sta_ptr->tdls_status == TDLS_IN_OFF_CHAN) |
| 220 | break; |
| 221 | mwifiex_update_ralist_tx_pause_in_tdls_cs(priv, mac, |
| 222 | true); |
| 223 | sta_ptr->tdls_status = TDLS_IN_OFF_CHAN; |
| 224 | break; |
| 225 | default: |
| 226 | break; |
| 227 | } |
| 228 | |
| 229 | break; |
| 230 | case TDLS_EVENT_START_CHAN_SWITCH: |
| 231 | mwifiex_dbg(adapter, EVENT, "tdls start channel switch...\n"); |
| 232 | sta_ptr->tdls_status = TDLS_CHAN_SWITCHING; |
| 233 | break; |
| 234 | case TDLS_EVENT_CHAN_SWITCH_STOPPED: |
| 235 | mwifiex_dbg(adapter, EVENT, |
| 236 | "tdls chan switch stopped, reason=%d\n", |
| 237 | tdls_evt->u.cs_stop_reason); |
| 238 | break; |
Avinash Patil | 79ff434 | 2014-05-06 22:02:44 -0700 | [diff] [blame] | 239 | default: |
| 240 | break; |
| 241 | } |
| 242 | |
Avinash Patil | c1078bc | 2014-05-21 22:02:29 -0700 | [diff] [blame] | 243 | return ret; |
Avinash Patil | 79ff434 | 2014-05-06 22:02:44 -0700 | [diff] [blame] | 244 | } |
| 245 | |
Avinash Patil | ddd7ceb | 2015-06-22 19:06:19 +0530 | [diff] [blame] | 246 | static void mwifiex_process_uap_tx_pause(struct mwifiex_private *priv, |
| 247 | struct mwifiex_ie_types_header *tlv) |
Avinash Patil | 4e6ee91 | 2015-06-22 19:06:07 +0530 | [diff] [blame] | 248 | { |
Avinash Patil | ddd7ceb | 2015-06-22 19:06:19 +0530 | [diff] [blame] | 249 | struct mwifiex_tx_pause_tlv *tp; |
Avinash Patil | 4e6ee91 | 2015-06-22 19:06:07 +0530 | [diff] [blame] | 250 | struct mwifiex_sta_node *sta_ptr; |
| 251 | unsigned long flags; |
Avinash Patil | ddd7ceb | 2015-06-22 19:06:19 +0530 | [diff] [blame] | 252 | |
| 253 | tp = (void *)tlv; |
| 254 | mwifiex_dbg(priv->adapter, EVENT, |
| 255 | "uap tx_pause: %pM pause=%d, pkts=%d\n", |
| 256 | tp->peermac, tp->tx_pause, |
| 257 | tp->pkt_cnt); |
| 258 | |
| 259 | if (ether_addr_equal(tp->peermac, priv->netdev->dev_addr)) { |
| 260 | if (tp->tx_pause) |
| 261 | priv->port_open = false; |
| 262 | else |
| 263 | priv->port_open = true; |
| 264 | } else if (is_multicast_ether_addr(tp->peermac)) { |
| 265 | mwifiex_update_ralist_tx_pause(priv, tp->peermac, tp->tx_pause); |
| 266 | } else { |
| 267 | spin_lock_irqsave(&priv->sta_list_spinlock, flags); |
| 268 | sta_ptr = mwifiex_get_sta_entry(priv, tp->peermac); |
| 269 | spin_unlock_irqrestore(&priv->sta_list_spinlock, flags); |
| 270 | |
| 271 | if (sta_ptr && sta_ptr->tx_pause != tp->tx_pause) { |
| 272 | sta_ptr->tx_pause = tp->tx_pause; |
| 273 | mwifiex_update_ralist_tx_pause(priv, tp->peermac, |
| 274 | tp->tx_pause); |
| 275 | } |
| 276 | } |
| 277 | } |
| 278 | |
| 279 | static void mwifiex_process_sta_tx_pause(struct mwifiex_private *priv, |
| 280 | struct mwifiex_ie_types_header *tlv) |
| 281 | { |
| 282 | struct mwifiex_tx_pause_tlv *tp; |
| 283 | struct mwifiex_sta_node *sta_ptr; |
| 284 | int status; |
| 285 | unsigned long flags; |
| 286 | |
| 287 | tp = (void *)tlv; |
| 288 | mwifiex_dbg(priv->adapter, EVENT, |
| 289 | "sta tx_pause: %pM pause=%d, pkts=%d\n", |
| 290 | tp->peermac, tp->tx_pause, |
| 291 | tp->pkt_cnt); |
| 292 | |
| 293 | if (ether_addr_equal(tp->peermac, priv->cfg_bssid)) { |
| 294 | if (tp->tx_pause) |
| 295 | priv->port_open = false; |
| 296 | else |
| 297 | priv->port_open = true; |
| 298 | } else { |
| 299 | if (!ISSUPP_TDLS_ENABLED(priv->adapter->fw_cap_info)) |
| 300 | return; |
| 301 | |
| 302 | status = mwifiex_get_tdls_link_status(priv, tp->peermac); |
| 303 | if (mwifiex_is_tdls_link_setup(status)) { |
| 304 | spin_lock_irqsave(&priv->sta_list_spinlock, flags); |
| 305 | sta_ptr = mwifiex_get_sta_entry(priv, tp->peermac); |
| 306 | spin_unlock_irqrestore(&priv->sta_list_spinlock, flags); |
| 307 | |
| 308 | if (sta_ptr && sta_ptr->tx_pause != tp->tx_pause) { |
| 309 | sta_ptr->tx_pause = tp->tx_pause; |
| 310 | mwifiex_update_ralist_tx_pause(priv, |
| 311 | tp->peermac, |
| 312 | tp->tx_pause); |
| 313 | } |
| 314 | } |
| 315 | } |
| 316 | } |
| 317 | |
Avinash Patil | 8d6b538 | 2015-06-22 19:06:23 +0530 | [diff] [blame] | 318 | void mwifiex_process_multi_chan_event(struct mwifiex_private *priv, |
| 319 | struct sk_buff *event_skb) |
| 320 | { |
| 321 | struct mwifiex_ie_types_multi_chan_info *chan_info; |
Zhaoyang Liu | 2b0f997 | 2015-09-18 06:32:15 -0700 | [diff] [blame] | 322 | struct mwifiex_ie_types_mc_group_info *grp_info; |
| 323 | struct mwifiex_adapter *adapter = priv->adapter; |
| 324 | struct mwifiex_ie_types_header *tlv; |
| 325 | u16 tlv_buf_left, tlv_type, tlv_len; |
| 326 | int intf_num, bss_type, bss_num, i; |
| 327 | struct mwifiex_private *intf_priv; |
Avinash Patil | 8d6b538 | 2015-06-22 19:06:23 +0530 | [diff] [blame] | 328 | |
Zhaoyang Liu | 2b0f997 | 2015-09-18 06:32:15 -0700 | [diff] [blame] | 329 | tlv_buf_left = event_skb->len - sizeof(u32); |
Avinash Patil | 8d6b538 | 2015-06-22 19:06:23 +0530 | [diff] [blame] | 330 | chan_info = (void *)event_skb->data + sizeof(u32); |
| 331 | |
Zhaoyang Liu | 2b0f997 | 2015-09-18 06:32:15 -0700 | [diff] [blame] | 332 | if (le16_to_cpu(chan_info->header.type) != TLV_TYPE_MULTI_CHAN_INFO || |
| 333 | tlv_buf_left < sizeof(struct mwifiex_ie_types_multi_chan_info)) { |
| 334 | mwifiex_dbg(adapter, ERROR, |
Avinash Patil | 8d6b538 | 2015-06-22 19:06:23 +0530 | [diff] [blame] | 335 | "unknown TLV in chan_info event\n"); |
| 336 | return; |
| 337 | } |
| 338 | |
Zhaoyang Liu | 2b0f997 | 2015-09-18 06:32:15 -0700 | [diff] [blame] | 339 | adapter->usb_mc_status = le16_to_cpu(chan_info->status); |
| 340 | mwifiex_dbg(adapter, EVENT, "multi chan operation %s\n", |
| 341 | adapter->usb_mc_status ? "started" : "over"); |
Avinash Patil | 8d6b538 | 2015-06-22 19:06:23 +0530 | [diff] [blame] | 342 | |
Zhaoyang Liu | 2b0f997 | 2015-09-18 06:32:15 -0700 | [diff] [blame] | 343 | tlv_buf_left -= sizeof(struct mwifiex_ie_types_multi_chan_info); |
| 344 | tlv = (struct mwifiex_ie_types_header *)chan_info->tlv_buffer; |
| 345 | |
| 346 | while (tlv_buf_left >= (int)sizeof(struct mwifiex_ie_types_header)) { |
| 347 | tlv_type = le16_to_cpu(tlv->type); |
| 348 | tlv_len = le16_to_cpu(tlv->len); |
| 349 | if ((sizeof(struct mwifiex_ie_types_header) + tlv_len) > |
| 350 | tlv_buf_left) { |
| 351 | mwifiex_dbg(adapter, ERROR, "wrong tlv: tlvLen=%d,\t" |
| 352 | "tlvBufLeft=%d\n", tlv_len, tlv_buf_left); |
| 353 | break; |
| 354 | } |
| 355 | if (tlv_type != TLV_TYPE_MC_GROUP_INFO) { |
| 356 | mwifiex_dbg(adapter, ERROR, "wrong tlv type: 0x%x\n", |
| 357 | tlv_type); |
| 358 | break; |
| 359 | } |
| 360 | |
| 361 | grp_info = (struct mwifiex_ie_types_mc_group_info *)tlv; |
| 362 | intf_num = grp_info->intf_num; |
| 363 | for (i = 0; i < intf_num; i++) { |
| 364 | bss_type = grp_info->bss_type_numlist[i] >> 4; |
| 365 | bss_num = grp_info->bss_type_numlist[i] & BSS_NUM_MASK; |
| 366 | intf_priv = mwifiex_get_priv_by_id(adapter, bss_num, |
| 367 | bss_type); |
| 368 | if (!intf_priv) { |
| 369 | mwifiex_dbg(adapter, ERROR, |
| 370 | "Invalid bss_type bss_num\t" |
| 371 | "in multi channel event\n"); |
| 372 | continue; |
| 373 | } |
| 374 | if (adapter->iface_type == MWIFIEX_USB) { |
| 375 | u8 ep; |
| 376 | |
| 377 | ep = grp_info->hid_num.usb_ep_num; |
| 378 | if (ep == MWIFIEX_USB_EP_DATA || |
| 379 | ep == MWIFIEX_USB_EP_DATA_CH2) |
| 380 | intf_priv->usb_port = ep; |
| 381 | } |
| 382 | } |
| 383 | |
| 384 | tlv_buf_left -= sizeof(struct mwifiex_ie_types_header) + |
| 385 | tlv_len; |
| 386 | tlv = (void *)((u8 *)tlv + tlv_len + |
| 387 | sizeof(struct mwifiex_ie_types_header)); |
Avinash Patil | 8d6b538 | 2015-06-22 19:06:23 +0530 | [diff] [blame] | 388 | } |
Zhaoyang Liu | 2b0f997 | 2015-09-18 06:32:15 -0700 | [diff] [blame] | 389 | |
Zhaoyang Liu | 7e4e5d2 | 2015-09-18 06:32:17 -0700 | [diff] [blame] | 390 | if (adapter->iface_type == MWIFIEX_USB) { |
| 391 | adapter->tx_lock_flag = true; |
| 392 | adapter->usb_mc_setup = true; |
| 393 | mwifiex_multi_chan_resync(adapter); |
| 394 | } |
Avinash Patil | 8d6b538 | 2015-06-22 19:06:23 +0530 | [diff] [blame] | 395 | } |
| 396 | |
Avinash Patil | ddd7ceb | 2015-06-22 19:06:19 +0530 | [diff] [blame] | 397 | void mwifiex_process_tx_pause_event(struct mwifiex_private *priv, |
| 398 | struct sk_buff *event_skb) |
| 399 | { |
| 400 | struct mwifiex_ie_types_header *tlv; |
Avinash Patil | 4e6ee91 | 2015-06-22 19:06:07 +0530 | [diff] [blame] | 401 | u16 tlv_type, tlv_len; |
Avinash Patil | ddd7ceb | 2015-06-22 19:06:19 +0530 | [diff] [blame] | 402 | int tlv_buf_left; |
Avinash Patil | 4e6ee91 | 2015-06-22 19:06:07 +0530 | [diff] [blame] | 403 | |
Avinash Patil | ddd7ceb | 2015-06-22 19:06:19 +0530 | [diff] [blame] | 404 | if (!priv->media_connected) { |
| 405 | mwifiex_dbg(priv->adapter, ERROR, |
| 406 | "tx_pause event while disconnected; bss_role=%d\n", |
| 407 | priv->bss_role); |
Avinash Patil | 4e6ee91 | 2015-06-22 19:06:07 +0530 | [diff] [blame] | 408 | return; |
Avinash Patil | ddd7ceb | 2015-06-22 19:06:19 +0530 | [diff] [blame] | 409 | } |
Avinash Patil | 4e6ee91 | 2015-06-22 19:06:07 +0530 | [diff] [blame] | 410 | |
| 411 | tlv_buf_left = event_skb->len - sizeof(u32); |
| 412 | tlv = (void *)event_skb->data + sizeof(u32); |
Avinash Patil | ddd7ceb | 2015-06-22 19:06:19 +0530 | [diff] [blame] | 413 | |
Avinash Patil | 4e6ee91 | 2015-06-22 19:06:07 +0530 | [diff] [blame] | 414 | while (tlv_buf_left >= (int)sizeof(struct mwifiex_ie_types_header)) { |
| 415 | tlv_type = le16_to_cpu(tlv->type); |
| 416 | tlv_len = le16_to_cpu(tlv->len); |
| 417 | if ((sizeof(struct mwifiex_ie_types_header) + tlv_len) > |
Avinash Patil | ddd7ceb | 2015-06-22 19:06:19 +0530 | [diff] [blame] | 418 | tlv_buf_left) { |
Avinash Patil | 4e6ee91 | 2015-06-22 19:06:07 +0530 | [diff] [blame] | 419 | mwifiex_dbg(priv->adapter, ERROR, |
| 420 | "wrong tlv: tlvLen=%d, tlvBufLeft=%d\n", |
| 421 | tlv_len, tlv_buf_left); |
| 422 | break; |
| 423 | } |
| 424 | if (tlv_type == TLV_TYPE_TX_PAUSE) { |
Avinash Patil | ddd7ceb | 2015-06-22 19:06:19 +0530 | [diff] [blame] | 425 | if (GET_BSS_ROLE(priv) == MWIFIEX_BSS_ROLE_STA) |
| 426 | mwifiex_process_sta_tx_pause(priv, tlv); |
| 427 | else |
| 428 | mwifiex_process_uap_tx_pause(priv, tlv); |
Avinash Patil | 4e6ee91 | 2015-06-22 19:06:07 +0530 | [diff] [blame] | 429 | } |
| 430 | |
| 431 | tlv_buf_left -= sizeof(struct mwifiex_ie_types_header) + |
| 432 | tlv_len; |
| 433 | tlv = (void *)((u8 *)tlv + tlv_len + |
| 434 | sizeof(struct mwifiex_ie_types_header)); |
| 435 | } |
Avinash Patil | ddd7ceb | 2015-06-22 19:06:19 +0530 | [diff] [blame] | 436 | |
Avinash Patil | 4e6ee91 | 2015-06-22 19:06:07 +0530 | [diff] [blame] | 437 | } |
| 438 | |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 439 | /* |
Chunfan Chen | d219b7e | 2015-06-10 06:19:48 -0700 | [diff] [blame] | 440 | * This function handles coex events generated by firmware |
| 441 | */ |
| 442 | void mwifiex_bt_coex_wlan_param_update_event(struct mwifiex_private *priv, |
| 443 | struct sk_buff *event_skb) |
| 444 | { |
| 445 | struct mwifiex_adapter *adapter = priv->adapter; |
| 446 | struct mwifiex_ie_types_header *tlv; |
| 447 | struct mwifiex_ie_types_btcoex_aggr_win_size *winsizetlv; |
| 448 | struct mwifiex_ie_types_btcoex_scan_time *scantlv; |
| 449 | s32 len = event_skb->len - sizeof(u32); |
| 450 | u8 *cur_ptr = event_skb->data + sizeof(u32); |
| 451 | u16 tlv_type, tlv_len; |
| 452 | |
| 453 | while (len >= sizeof(struct mwifiex_ie_types_header)) { |
| 454 | tlv = (struct mwifiex_ie_types_header *)cur_ptr; |
| 455 | tlv_len = le16_to_cpu(tlv->len); |
| 456 | tlv_type = le16_to_cpu(tlv->type); |
| 457 | |
| 458 | if ((tlv_len + sizeof(struct mwifiex_ie_types_header)) > len) |
| 459 | break; |
| 460 | switch (tlv_type) { |
| 461 | case TLV_BTCOEX_WL_AGGR_WINSIZE: |
| 462 | winsizetlv = |
| 463 | (struct mwifiex_ie_types_btcoex_aggr_win_size *)tlv; |
| 464 | adapter->coex_win_size = winsizetlv->coex_win_size; |
| 465 | adapter->coex_tx_win_size = |
| 466 | winsizetlv->tx_win_size; |
| 467 | adapter->coex_rx_win_size = |
| 468 | winsizetlv->rx_win_size; |
| 469 | mwifiex_coex_ampdu_rxwinsize(adapter); |
| 470 | mwifiex_update_ampdu_txwinsize(adapter); |
| 471 | break; |
| 472 | |
| 473 | case TLV_BTCOEX_WL_SCANTIME: |
| 474 | scantlv = |
| 475 | (struct mwifiex_ie_types_btcoex_scan_time *)tlv; |
| 476 | adapter->coex_scan = scantlv->coex_scan; |
Prasun Maiti | c18b104 | 2016-06-30 14:01:23 +0530 | [diff] [blame] | 477 | adapter->coex_min_scan_time = le16_to_cpu(scantlv->min_scan_time); |
| 478 | adapter->coex_max_scan_time = le16_to_cpu(scantlv->max_scan_time); |
Chunfan Chen | d219b7e | 2015-06-10 06:19:48 -0700 | [diff] [blame] | 479 | break; |
| 480 | |
| 481 | default: |
| 482 | break; |
| 483 | } |
| 484 | |
| 485 | len -= tlv_len + sizeof(struct mwifiex_ie_types_header); |
| 486 | cur_ptr += tlv_len + |
| 487 | sizeof(struct mwifiex_ie_types_header); |
| 488 | } |
| 489 | |
| 490 | dev_dbg(adapter->dev, "coex_scan=%d min_scan=%d coex_win=%d, tx_win=%d rx_win=%d\n", |
| 491 | adapter->coex_scan, adapter->coex_min_scan_time, |
| 492 | adapter->coex_win_size, adapter->coex_tx_win_size, |
| 493 | adapter->coex_rx_win_size); |
| 494 | } |
| 495 | |
| 496 | /* |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 497 | * This function handles events generated by firmware. |
| 498 | * |
| 499 | * This is a generic function and handles all events. |
| 500 | * |
| 501 | * Event specific routines are called by this function based |
| 502 | * upon the generated event cause. |
| 503 | * |
| 504 | * For the following events, the function just forwards them to upper |
| 505 | * layers, optionally recording the change - |
| 506 | * - EVENT_LINK_SENSED |
| 507 | * - EVENT_MIC_ERR_UNICAST |
| 508 | * - EVENT_MIC_ERR_MULTICAST |
| 509 | * - EVENT_PORT_RELEASE |
| 510 | * - EVENT_RSSI_LOW |
| 511 | * - EVENT_SNR_LOW |
| 512 | * - EVENT_MAX_FAIL |
| 513 | * - EVENT_RSSI_HIGH |
| 514 | * - EVENT_SNR_HIGH |
| 515 | * - EVENT_DATA_RSSI_LOW |
| 516 | * - EVENT_DATA_SNR_LOW |
| 517 | * - EVENT_DATA_RSSI_HIGH |
| 518 | * - EVENT_DATA_SNR_HIGH |
| 519 | * - EVENT_LINK_QUALITY |
| 520 | * - EVENT_PRE_BEACON_LOST |
| 521 | * - EVENT_IBSS_COALESCED |
| 522 | * - EVENT_WEP_ICV_ERR |
| 523 | * - EVENT_BW_CHANGE |
| 524 | * - EVENT_HOSTWAKE_STAIE |
| 525 | * |
| 526 | * For the following events, no action is taken - |
| 527 | * - EVENT_MIB_CHANGED |
| 528 | * - EVENT_INIT_DONE |
| 529 | * - EVENT_DUMMY_HOST_WAKEUP_SIGNAL |
| 530 | * |
| 531 | * Rest of the supported events requires driver handling - |
| 532 | * - EVENT_DEAUTHENTICATED |
| 533 | * - EVENT_DISASSOCIATED |
| 534 | * - EVENT_LINK_LOST |
| 535 | * - EVENT_PS_SLEEP |
| 536 | * - EVENT_PS_AWAKE |
| 537 | * - EVENT_DEEP_SLEEP_AWAKE |
| 538 | * - EVENT_HS_ACT_REQ |
| 539 | * - EVENT_ADHOC_BCN_LOST |
| 540 | * - EVENT_BG_SCAN_REPORT |
| 541 | * - EVENT_WMM_STATUS_CHANGE |
| 542 | * - EVENT_ADDBA |
| 543 | * - EVENT_DELBA |
| 544 | * - EVENT_BA_STREAM_TIEMOUT |
| 545 | * - EVENT_AMSDU_AGGR_CTRL |
| 546 | */ |
| 547 | int mwifiex_process_sta_event(struct mwifiex_private *priv) |
| 548 | { |
| 549 | struct mwifiex_adapter *adapter = priv->adapter; |
Avinash Patil | 3d99d98 | 2012-08-03 18:06:06 -0700 | [diff] [blame] | 550 | int ret = 0; |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 551 | u32 eventcause = adapter->event_cause; |
Amitkumar Karwar | 8cc1d52 | 2012-10-05 20:21:43 -0700 | [diff] [blame] | 552 | u16 ctrl, reason_code; |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 553 | |
| 554 | switch (eventcause) { |
| 555 | case EVENT_DUMMY_HOST_WAKEUP_SIGNAL: |
Zhaoyang Liu | acebe8c | 2015-05-12 00:48:20 +0530 | [diff] [blame] | 556 | mwifiex_dbg(adapter, ERROR, |
| 557 | "invalid EVENT: DUMMY_HOST_WAKEUP_SIGNAL, ignore it\n"); |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 558 | break; |
| 559 | case EVENT_LINK_SENSED: |
Zhaoyang Liu | acebe8c | 2015-05-12 00:48:20 +0530 | [diff] [blame] | 560 | mwifiex_dbg(adapter, EVENT, "event: LINK_SENSED\n"); |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 561 | if (!netif_carrier_ok(priv->netdev)) |
| 562 | netif_carrier_on(priv->netdev); |
Avinash Patil | 47411a0 | 2012-11-01 18:44:16 -0700 | [diff] [blame] | 563 | mwifiex_wake_up_net_dev_queue(priv->netdev, adapter); |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 564 | break; |
| 565 | |
| 566 | case EVENT_DEAUTHENTICATED: |
Zhaoyang Liu | acebe8c | 2015-05-12 00:48:20 +0530 | [diff] [blame] | 567 | mwifiex_dbg(adapter, EVENT, "event: Deauthenticated\n"); |
Stone Piao | eaf49db | 2013-07-22 19:17:43 -0700 | [diff] [blame] | 568 | if (priv->wps.session_enable) { |
Zhaoyang Liu | acebe8c | 2015-05-12 00:48:20 +0530 | [diff] [blame] | 569 | mwifiex_dbg(adapter, INFO, |
| 570 | "info: receive deauth event in wps session\n"); |
Stone Piao | eaf49db | 2013-07-22 19:17:43 -0700 | [diff] [blame] | 571 | break; |
| 572 | } |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 573 | adapter->dbg.num_event_deauth++; |
Amitkumar Karwar | 8cc1d52 | 2012-10-05 20:21:43 -0700 | [diff] [blame] | 574 | if (priv->media_connected) { |
| 575 | reason_code = |
| 576 | le16_to_cpu(*(__le16 *)adapter->event_body); |
Amitkumar Karwar | c62d50a | 2016-05-25 08:37:35 -0700 | [diff] [blame] | 577 | mwifiex_reset_connect_state(priv, reason_code, true); |
Amitkumar Karwar | 8cc1d52 | 2012-10-05 20:21:43 -0700 | [diff] [blame] | 578 | } |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 579 | break; |
| 580 | |
| 581 | case EVENT_DISASSOCIATED: |
Zhaoyang Liu | acebe8c | 2015-05-12 00:48:20 +0530 | [diff] [blame] | 582 | mwifiex_dbg(adapter, EVENT, "event: Disassociated\n"); |
Stone Piao | eaf49db | 2013-07-22 19:17:43 -0700 | [diff] [blame] | 583 | if (priv->wps.session_enable) { |
Zhaoyang Liu | acebe8c | 2015-05-12 00:48:20 +0530 | [diff] [blame] | 584 | mwifiex_dbg(adapter, INFO, |
| 585 | "info: receive disassoc event in wps session\n"); |
Stone Piao | eaf49db | 2013-07-22 19:17:43 -0700 | [diff] [blame] | 586 | break; |
| 587 | } |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 588 | adapter->dbg.num_event_disassoc++; |
Amitkumar Karwar | 8cc1d52 | 2012-10-05 20:21:43 -0700 | [diff] [blame] | 589 | if (priv->media_connected) { |
| 590 | reason_code = |
| 591 | le16_to_cpu(*(__le16 *)adapter->event_body); |
Amitkumar Karwar | c62d50a | 2016-05-25 08:37:35 -0700 | [diff] [blame] | 592 | mwifiex_reset_connect_state(priv, reason_code, true); |
Amitkumar Karwar | 8cc1d52 | 2012-10-05 20:21:43 -0700 | [diff] [blame] | 593 | } |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 594 | break; |
| 595 | |
| 596 | case EVENT_LINK_LOST: |
Zhaoyang Liu | acebe8c | 2015-05-12 00:48:20 +0530 | [diff] [blame] | 597 | mwifiex_dbg(adapter, EVENT, "event: Link lost\n"); |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 598 | adapter->dbg.num_event_link_lost++; |
Amitkumar Karwar | 8cc1d52 | 2012-10-05 20:21:43 -0700 | [diff] [blame] | 599 | if (priv->media_connected) { |
| 600 | reason_code = |
| 601 | le16_to_cpu(*(__le16 *)adapter->event_body); |
Amitkumar Karwar | c62d50a | 2016-05-25 08:37:35 -0700 | [diff] [blame] | 602 | mwifiex_reset_connect_state(priv, reason_code, true); |
Amitkumar Karwar | 8cc1d52 | 2012-10-05 20:21:43 -0700 | [diff] [blame] | 603 | } |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 604 | break; |
| 605 | |
| 606 | case EVENT_PS_SLEEP: |
Zhaoyang Liu | acebe8c | 2015-05-12 00:48:20 +0530 | [diff] [blame] | 607 | mwifiex_dbg(adapter, EVENT, "info: EVENT: SLEEP\n"); |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 608 | |
| 609 | adapter->ps_state = PS_STATE_PRE_SLEEP; |
| 610 | |
| 611 | mwifiex_check_ps_cond(adapter); |
| 612 | break; |
| 613 | |
| 614 | case EVENT_PS_AWAKE: |
Zhaoyang Liu | acebe8c | 2015-05-12 00:48:20 +0530 | [diff] [blame] | 615 | mwifiex_dbg(adapter, EVENT, "info: EVENT: AWAKE\n"); |
chunfan chen | dc386ce | 2016-01-06 23:40:48 -0800 | [diff] [blame] | 616 | if (!adapter->pps_uapsd_mode && |
| 617 | (priv->port_open || |
| 618 | (priv->bss_mode == NL80211_IFTYPE_ADHOC)) && |
Yogesh Ashok Powar | 500f747 | 2012-03-13 19:22:41 -0700 | [diff] [blame] | 619 | priv->media_connected && adapter->sleep_period.period) { |
chunfan chen | dc386ce | 2016-01-06 23:40:48 -0800 | [diff] [blame] | 620 | adapter->pps_uapsd_mode = true; |
| 621 | mwifiex_dbg(adapter, EVENT, |
| 622 | "event: PPS/UAPSD mode activated\n"); |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 623 | } |
| 624 | adapter->tx_lock_flag = false; |
| 625 | if (adapter->pps_uapsd_mode && adapter->gen_null_pkt) { |
| 626 | if (mwifiex_check_last_packet_indication(priv)) { |
Zhaoyang Liu | 735ab6b | 2015-09-18 06:32:18 -0700 | [diff] [blame] | 627 | if (adapter->data_sent || |
| 628 | (adapter->if_ops.is_port_ready && |
| 629 | !adapter->if_ops.is_port_ready(priv))) { |
Yogesh Ashok Powar | 500f747 | 2012-03-13 19:22:41 -0700 | [diff] [blame] | 630 | adapter->ps_state = PS_STATE_AWAKE; |
| 631 | adapter->pm_wakeup_card_req = false; |
| 632 | adapter->pm_wakeup_fw_try = false; |
Amitkumar Karwar | 6e9344f | 2015-03-12 00:38:40 -0700 | [diff] [blame] | 633 | del_timer(&adapter->wakeup_timer); |
Yogesh Ashok Powar | 500f747 | 2012-03-13 19:22:41 -0700 | [diff] [blame] | 634 | break; |
| 635 | } |
| 636 | if (!mwifiex_send_null_packet |
| 637 | (priv, |
| 638 | MWIFIEX_TxPD_POWER_MGMT_NULL_PACKET | |
| 639 | MWIFIEX_TxPD_POWER_MGMT_LAST_PACKET)) |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 640 | adapter->ps_state = |
| 641 | PS_STATE_SLEEP; |
| 642 | return 0; |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 643 | } |
| 644 | } |
| 645 | adapter->ps_state = PS_STATE_AWAKE; |
| 646 | adapter->pm_wakeup_card_req = false; |
| 647 | adapter->pm_wakeup_fw_try = false; |
Amitkumar Karwar | 6e9344f | 2015-03-12 00:38:40 -0700 | [diff] [blame] | 648 | del_timer(&adapter->wakeup_timer); |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 649 | |
| 650 | break; |
| 651 | |
| 652 | case EVENT_DEEP_SLEEP_AWAKE: |
| 653 | adapter->if_ops.wakeup_complete(adapter); |
Zhaoyang Liu | acebe8c | 2015-05-12 00:48:20 +0530 | [diff] [blame] | 654 | mwifiex_dbg(adapter, EVENT, "event: DS_AWAKE\n"); |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 655 | if (adapter->is_deep_sleep) |
| 656 | adapter->is_deep_sleep = false; |
| 657 | break; |
| 658 | |
| 659 | case EVENT_HS_ACT_REQ: |
Zhaoyang Liu | acebe8c | 2015-05-12 00:48:20 +0530 | [diff] [blame] | 660 | mwifiex_dbg(adapter, EVENT, "event: HS_ACT_REQ\n"); |
Bing Zhao | fa0ecbb | 2014-02-27 19:35:12 -0800 | [diff] [blame] | 661 | ret = mwifiex_send_cmd(priv, HostCmd_CMD_802_11_HS_CFG_ENH, |
| 662 | 0, 0, NULL, false); |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 663 | break; |
| 664 | |
| 665 | case EVENT_MIC_ERR_UNICAST: |
Zhaoyang Liu | acebe8c | 2015-05-12 00:48:20 +0530 | [diff] [blame] | 666 | mwifiex_dbg(adapter, EVENT, "event: UNICAST MIC ERROR\n"); |
Amitkumar Karwar | 9c7ff73 | 2012-08-08 19:02:56 -0700 | [diff] [blame] | 667 | cfg80211_michael_mic_failure(priv->netdev, priv->cfg_bssid, |
| 668 | NL80211_KEYTYPE_PAIRWISE, |
| 669 | -1, NULL, GFP_KERNEL); |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 670 | break; |
| 671 | |
| 672 | case EVENT_MIC_ERR_MULTICAST: |
Zhaoyang Liu | acebe8c | 2015-05-12 00:48:20 +0530 | [diff] [blame] | 673 | mwifiex_dbg(adapter, EVENT, "event: MULTICAST MIC ERROR\n"); |
Amitkumar Karwar | 9c7ff73 | 2012-08-08 19:02:56 -0700 | [diff] [blame] | 674 | cfg80211_michael_mic_failure(priv->netdev, priv->cfg_bssid, |
| 675 | NL80211_KEYTYPE_GROUP, |
| 676 | -1, NULL, GFP_KERNEL); |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 677 | break; |
| 678 | case EVENT_MIB_CHANGED: |
| 679 | case EVENT_INIT_DONE: |
| 680 | break; |
| 681 | |
| 682 | case EVENT_ADHOC_BCN_LOST: |
Zhaoyang Liu | acebe8c | 2015-05-12 00:48:20 +0530 | [diff] [blame] | 683 | mwifiex_dbg(adapter, EVENT, "event: ADHOC_BCN_LOST\n"); |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 684 | priv->adhoc_is_link_sensed = false; |
| 685 | mwifiex_clean_txrx(priv); |
Avinash Patil | 47411a0 | 2012-11-01 18:44:16 -0700 | [diff] [blame] | 686 | mwifiex_stop_net_dev_queue(priv->netdev, adapter); |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 687 | if (netif_carrier_ok(priv->netdev)) |
| 688 | netif_carrier_off(priv->netdev); |
| 689 | break; |
| 690 | |
| 691 | case EVENT_BG_SCAN_REPORT: |
Zhaoyang Liu | acebe8c | 2015-05-12 00:48:20 +0530 | [diff] [blame] | 692 | mwifiex_dbg(adapter, EVENT, "event: BGS_REPORT\n"); |
Bing Zhao | fa0ecbb | 2014-02-27 19:35:12 -0800 | [diff] [blame] | 693 | ret = mwifiex_send_cmd(priv, HostCmd_CMD_802_11_BG_SCAN_QUERY, |
| 694 | HostCmd_ACT_GEN_GET, 0, NULL, false); |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 695 | break; |
| 696 | |
Xinming Hu | 0c9b7f2 | 2016-01-13 01:26:52 -0800 | [diff] [blame] | 697 | case EVENT_BG_SCAN_STOPPED: |
| 698 | dev_dbg(adapter->dev, "event: BGS_STOPPED\n"); |
| 699 | cfg80211_sched_scan_stopped(priv->wdev.wiphy); |
| 700 | if (priv->sched_scanning) |
| 701 | priv->sched_scanning = false; |
| 702 | break; |
| 703 | |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 704 | case EVENT_PORT_RELEASE: |
Zhaoyang Liu | acebe8c | 2015-05-12 00:48:20 +0530 | [diff] [blame] | 705 | mwifiex_dbg(adapter, EVENT, "event: PORT RELEASE\n"); |
Avinash Patil | 5c894633 | 2015-06-22 19:06:18 +0530 | [diff] [blame] | 706 | priv->port_open = true; |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 707 | break; |
| 708 | |
Amitkumar Karwar | 21f58d20 | 2014-02-11 18:39:56 -0800 | [diff] [blame] | 709 | case EVENT_EXT_SCAN_REPORT: |
Zhaoyang Liu | acebe8c | 2015-05-12 00:48:20 +0530 | [diff] [blame] | 710 | mwifiex_dbg(adapter, EVENT, "event: EXT_SCAN Report\n"); |
Amitkumar Karwar | 16d25da | 2016-06-27 14:16:29 +0530 | [diff] [blame] | 711 | if (adapter->ext_scan && !priv->scan_aborting) |
Amitkumar Karwar | 21f58d20 | 2014-02-11 18:39:56 -0800 | [diff] [blame] | 712 | ret = mwifiex_handle_event_ext_scan_report(priv, |
| 713 | adapter->event_skb->data); |
| 714 | |
| 715 | break; |
| 716 | |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 717 | case EVENT_WMM_STATUS_CHANGE: |
Zhaoyang Liu | acebe8c | 2015-05-12 00:48:20 +0530 | [diff] [blame] | 718 | mwifiex_dbg(adapter, EVENT, "event: WMM status changed\n"); |
Bing Zhao | fa0ecbb | 2014-02-27 19:35:12 -0800 | [diff] [blame] | 719 | ret = mwifiex_send_cmd(priv, HostCmd_CMD_WMM_GET_STATUS, |
| 720 | 0, 0, NULL, false); |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 721 | break; |
| 722 | |
| 723 | case EVENT_RSSI_LOW: |
Amitkumar Karwar | fa444bf | 2012-03-15 20:51:51 -0700 | [diff] [blame] | 724 | cfg80211_cqm_rssi_notify(priv->netdev, |
| 725 | NL80211_CQM_RSSI_THRESHOLD_EVENT_LOW, |
| 726 | GFP_KERNEL); |
Bing Zhao | fa0ecbb | 2014-02-27 19:35:12 -0800 | [diff] [blame] | 727 | mwifiex_send_cmd(priv, HostCmd_CMD_RSSI_INFO, |
| 728 | HostCmd_ACT_GEN_GET, 0, NULL, false); |
Amitkumar Karwar | fa444bf | 2012-03-15 20:51:51 -0700 | [diff] [blame] | 729 | priv->subsc_evt_rssi_state = RSSI_LOW_RECVD; |
Zhaoyang Liu | acebe8c | 2015-05-12 00:48:20 +0530 | [diff] [blame] | 730 | mwifiex_dbg(adapter, EVENT, "event: Beacon RSSI_LOW\n"); |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 731 | break; |
| 732 | case EVENT_SNR_LOW: |
Zhaoyang Liu | acebe8c | 2015-05-12 00:48:20 +0530 | [diff] [blame] | 733 | mwifiex_dbg(adapter, EVENT, "event: Beacon SNR_LOW\n"); |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 734 | break; |
| 735 | case EVENT_MAX_FAIL: |
Zhaoyang Liu | acebe8c | 2015-05-12 00:48:20 +0530 | [diff] [blame] | 736 | mwifiex_dbg(adapter, EVENT, "event: MAX_FAIL\n"); |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 737 | break; |
| 738 | case EVENT_RSSI_HIGH: |
Amitkumar Karwar | fa444bf | 2012-03-15 20:51:51 -0700 | [diff] [blame] | 739 | cfg80211_cqm_rssi_notify(priv->netdev, |
| 740 | NL80211_CQM_RSSI_THRESHOLD_EVENT_HIGH, |
| 741 | GFP_KERNEL); |
Bing Zhao | fa0ecbb | 2014-02-27 19:35:12 -0800 | [diff] [blame] | 742 | mwifiex_send_cmd(priv, HostCmd_CMD_RSSI_INFO, |
| 743 | HostCmd_ACT_GEN_GET, 0, NULL, false); |
Amitkumar Karwar | fa444bf | 2012-03-15 20:51:51 -0700 | [diff] [blame] | 744 | priv->subsc_evt_rssi_state = RSSI_HIGH_RECVD; |
Zhaoyang Liu | acebe8c | 2015-05-12 00:48:20 +0530 | [diff] [blame] | 745 | mwifiex_dbg(adapter, EVENT, "event: Beacon RSSI_HIGH\n"); |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 746 | break; |
| 747 | case EVENT_SNR_HIGH: |
Zhaoyang Liu | acebe8c | 2015-05-12 00:48:20 +0530 | [diff] [blame] | 748 | mwifiex_dbg(adapter, EVENT, "event: Beacon SNR_HIGH\n"); |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 749 | break; |
| 750 | case EVENT_DATA_RSSI_LOW: |
Zhaoyang Liu | acebe8c | 2015-05-12 00:48:20 +0530 | [diff] [blame] | 751 | mwifiex_dbg(adapter, EVENT, "event: Data RSSI_LOW\n"); |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 752 | break; |
| 753 | case EVENT_DATA_SNR_LOW: |
Zhaoyang Liu | acebe8c | 2015-05-12 00:48:20 +0530 | [diff] [blame] | 754 | mwifiex_dbg(adapter, EVENT, "event: Data SNR_LOW\n"); |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 755 | break; |
| 756 | case EVENT_DATA_RSSI_HIGH: |
Zhaoyang Liu | acebe8c | 2015-05-12 00:48:20 +0530 | [diff] [blame] | 757 | mwifiex_dbg(adapter, EVENT, "event: Data RSSI_HIGH\n"); |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 758 | break; |
| 759 | case EVENT_DATA_SNR_HIGH: |
Zhaoyang Liu | acebe8c | 2015-05-12 00:48:20 +0530 | [diff] [blame] | 760 | mwifiex_dbg(adapter, EVENT, "event: Data SNR_HIGH\n"); |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 761 | break; |
| 762 | case EVENT_LINK_QUALITY: |
Zhaoyang Liu | acebe8c | 2015-05-12 00:48:20 +0530 | [diff] [blame] | 763 | mwifiex_dbg(adapter, EVENT, "event: Link Quality\n"); |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 764 | break; |
| 765 | case EVENT_PRE_BEACON_LOST: |
Zhaoyang Liu | acebe8c | 2015-05-12 00:48:20 +0530 | [diff] [blame] | 766 | mwifiex_dbg(adapter, EVENT, "event: Pre-Beacon Lost\n"); |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 767 | break; |
| 768 | case EVENT_IBSS_COALESCED: |
Zhaoyang Liu | acebe8c | 2015-05-12 00:48:20 +0530 | [diff] [blame] | 769 | mwifiex_dbg(adapter, EVENT, "event: IBSS_COALESCED\n"); |
Bing Zhao | fa0ecbb | 2014-02-27 19:35:12 -0800 | [diff] [blame] | 770 | ret = mwifiex_send_cmd(priv, |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 771 | HostCmd_CMD_802_11_IBSS_COALESCING_STATUS, |
Bing Zhao | fa0ecbb | 2014-02-27 19:35:12 -0800 | [diff] [blame] | 772 | HostCmd_ACT_GEN_GET, 0, NULL, false); |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 773 | break; |
| 774 | case EVENT_ADDBA: |
Zhaoyang Liu | acebe8c | 2015-05-12 00:48:20 +0530 | [diff] [blame] | 775 | mwifiex_dbg(adapter, EVENT, "event: ADDBA Request\n"); |
Bing Zhao | fa0ecbb | 2014-02-27 19:35:12 -0800 | [diff] [blame] | 776 | mwifiex_send_cmd(priv, HostCmd_CMD_11N_ADDBA_RSP, |
| 777 | HostCmd_ACT_GEN_SET, 0, |
| 778 | adapter->event_body, false); |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 779 | break; |
| 780 | case EVENT_DELBA: |
Zhaoyang Liu | acebe8c | 2015-05-12 00:48:20 +0530 | [diff] [blame] | 781 | mwifiex_dbg(adapter, EVENT, "event: DELBA Request\n"); |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 782 | mwifiex_11n_delete_ba_stream(priv, adapter->event_body); |
| 783 | break; |
| 784 | case EVENT_BA_STREAM_TIEMOUT: |
Zhaoyang Liu | acebe8c | 2015-05-12 00:48:20 +0530 | [diff] [blame] | 785 | mwifiex_dbg(adapter, EVENT, "event: BA Stream timeout\n"); |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 786 | mwifiex_11n_ba_stream_timeout(priv, |
| 787 | (struct host_cmd_ds_11n_batimeout |
| 788 | *) |
| 789 | adapter->event_body); |
| 790 | break; |
| 791 | case EVENT_AMSDU_AGGR_CTRL: |
Bing Zhao | 8dd4372 | 2012-08-07 16:08:08 -0700 | [diff] [blame] | 792 | ctrl = le16_to_cpu(*(__le16 *)adapter->event_body); |
Zhaoyang Liu | acebe8c | 2015-05-12 00:48:20 +0530 | [diff] [blame] | 793 | mwifiex_dbg(adapter, EVENT, |
| 794 | "event: AMSDU_AGGR_CTRL %d\n", ctrl); |
Bing Zhao | 8dd4372 | 2012-08-07 16:08:08 -0700 | [diff] [blame] | 795 | |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 796 | adapter->tx_buf_size = |
Bing Zhao | 8dd4372 | 2012-08-07 16:08:08 -0700 | [diff] [blame] | 797 | min_t(u16, adapter->curr_tx_buf_size, ctrl); |
Zhaoyang Liu | acebe8c | 2015-05-12 00:48:20 +0530 | [diff] [blame] | 798 | mwifiex_dbg(adapter, EVENT, "event: tx_buf_size %d\n", |
| 799 | adapter->tx_buf_size); |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 800 | break; |
| 801 | |
| 802 | case EVENT_WEP_ICV_ERR: |
Zhaoyang Liu | acebe8c | 2015-05-12 00:48:20 +0530 | [diff] [blame] | 803 | mwifiex_dbg(adapter, EVENT, "event: WEP ICV error\n"); |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 804 | break; |
| 805 | |
| 806 | case EVENT_BW_CHANGE: |
Zhaoyang Liu | acebe8c | 2015-05-12 00:48:20 +0530 | [diff] [blame] | 807 | mwifiex_dbg(adapter, EVENT, "event: BW Change\n"); |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 808 | break; |
| 809 | |
| 810 | case EVENT_HOSTWAKE_STAIE: |
Zhaoyang Liu | acebe8c | 2015-05-12 00:48:20 +0530 | [diff] [blame] | 811 | mwifiex_dbg(adapter, EVENT, |
| 812 | "event: HOSTWAKE_STAIE %d\n", eventcause); |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 813 | break; |
Avinash Patil | e568634 | 2012-05-08 18:30:25 -0700 | [diff] [blame] | 814 | |
Stone Piao | eab1c76 | 2012-09-25 20:23:37 -0700 | [diff] [blame] | 815 | case EVENT_REMAIN_ON_CHAN_EXPIRED: |
Zhaoyang Liu | acebe8c | 2015-05-12 00:48:20 +0530 | [diff] [blame] | 816 | mwifiex_dbg(adapter, EVENT, |
| 817 | "event: Remain on channel expired\n"); |
Avinash Patil | 4facc34 | 2015-01-28 15:42:00 +0530 | [diff] [blame] | 818 | cfg80211_remain_on_channel_expired(&priv->wdev, |
Stone Piao | eab1c76 | 2012-09-25 20:23:37 -0700 | [diff] [blame] | 819 | priv->roc_cfg.cookie, |
| 820 | &priv->roc_cfg.chan, |
Stone Piao | eab1c76 | 2012-09-25 20:23:37 -0700 | [diff] [blame] | 821 | GFP_ATOMIC); |
| 822 | |
| 823 | memset(&priv->roc_cfg, 0x00, sizeof(struct mwifiex_roc_cfg)); |
| 824 | |
| 825 | break; |
| 826 | |
Amitkumar Karwar | 2a7305c | 2013-06-19 08:49:05 -0700 | [diff] [blame] | 827 | case EVENT_CHANNEL_SWITCH_ANN: |
Zhaoyang Liu | acebe8c | 2015-05-12 00:48:20 +0530 | [diff] [blame] | 828 | mwifiex_dbg(adapter, EVENT, "event: Channel Switch Announcement\n"); |
Amitkumar Karwar | b887664 | 2013-06-18 16:36:58 -0700 | [diff] [blame] | 829 | priv->csa_expire_time = |
| 830 | jiffies + msecs_to_jiffies(DFS_CHAN_MOVE_TIME); |
| 831 | priv->csa_chan = priv->curr_bss_params.bss_descriptor.channel; |
Bing Zhao | fa0ecbb | 2014-02-27 19:35:12 -0800 | [diff] [blame] | 832 | ret = mwifiex_send_cmd(priv, HostCmd_CMD_802_11_DEAUTHENTICATE, |
Amitkumar Karwar | 2a7305c | 2013-06-19 08:49:05 -0700 | [diff] [blame] | 833 | HostCmd_ACT_GEN_SET, 0, |
Bing Zhao | fa0ecbb | 2014-02-27 19:35:12 -0800 | [diff] [blame] | 834 | priv->curr_bss_params.bss_descriptor.mac_address, |
| 835 | false); |
Amitkumar Karwar | 2a7305c | 2013-06-19 08:49:05 -0700 | [diff] [blame] | 836 | break; |
| 837 | |
Avinash Patil | 79ff434 | 2014-05-06 22:02:44 -0700 | [diff] [blame] | 838 | case EVENT_TDLS_GENERIC_EVENT: |
| 839 | ret = mwifiex_parse_tdls_event(priv, adapter->event_skb); |
| 840 | break; |
| 841 | |
Avinash Patil | 4e6ee91 | 2015-06-22 19:06:07 +0530 | [diff] [blame] | 842 | case EVENT_TX_DATA_PAUSE: |
Avinash Patil | 4e6ee91 | 2015-06-22 19:06:07 +0530 | [diff] [blame] | 843 | mwifiex_dbg(adapter, EVENT, "event: TX DATA PAUSE\n"); |
Avinash Patil | ddd7ceb | 2015-06-22 19:06:19 +0530 | [diff] [blame] | 844 | mwifiex_process_tx_pause_event(priv, adapter->event_skb); |
Avinash Patil | 4e6ee91 | 2015-06-22 19:06:07 +0530 | [diff] [blame] | 845 | break; |
| 846 | |
Avinash Patil | 8d6b538 | 2015-06-22 19:06:23 +0530 | [diff] [blame] | 847 | case EVENT_MULTI_CHAN_INFO: |
| 848 | mwifiex_dbg(adapter, EVENT, "event: multi-chan info\n"); |
| 849 | mwifiex_process_multi_chan_event(priv, adapter->event_skb); |
| 850 | break; |
| 851 | |
Amitkumar Karwar | 808bbeb | 2014-11-25 06:43:05 -0800 | [diff] [blame] | 852 | case EVENT_TX_STATUS_REPORT: |
Zhaoyang Liu | acebe8c | 2015-05-12 00:48:20 +0530 | [diff] [blame] | 853 | mwifiex_dbg(adapter, EVENT, "event: TX_STATUS Report\n"); |
Amitkumar Karwar | 808bbeb | 2014-11-25 06:43:05 -0800 | [diff] [blame] | 854 | mwifiex_parse_tx_status_event(priv, adapter->event_body); |
| 855 | break; |
| 856 | |
Avinash Patil | 0a694d6 | 2015-01-28 15:54:22 +0530 | [diff] [blame] | 857 | case EVENT_CHANNEL_REPORT_RDY: |
Zhaoyang Liu | acebe8c | 2015-05-12 00:48:20 +0530 | [diff] [blame] | 858 | mwifiex_dbg(adapter, EVENT, "event: Channel Report\n"); |
Avinash Patil | 0a694d6 | 2015-01-28 15:54:22 +0530 | [diff] [blame] | 859 | ret = mwifiex_11h_handle_chanrpt_ready(priv, |
| 860 | adapter->event_skb); |
| 861 | break; |
Avinash Patil | 3b57c1a | 2015-01-28 15:54:23 +0530 | [diff] [blame] | 862 | case EVENT_RADAR_DETECTED: |
Zhaoyang Liu | acebe8c | 2015-05-12 00:48:20 +0530 | [diff] [blame] | 863 | mwifiex_dbg(adapter, EVENT, "event: Radar detected\n"); |
Avinash Patil | 3b57c1a | 2015-01-28 15:54:23 +0530 | [diff] [blame] | 864 | ret = mwifiex_11h_handle_radar_detected(priv, |
| 865 | adapter->event_skb); |
| 866 | break; |
Chunfan Chen | d219b7e | 2015-06-10 06:19:48 -0700 | [diff] [blame] | 867 | case EVENT_BT_COEX_WLAN_PARA_CHANGE: |
| 868 | dev_dbg(adapter->dev, "EVENT: BT coex wlan param update\n"); |
| 869 | mwifiex_bt_coex_wlan_param_update_event(priv, |
| 870 | adapter->event_skb); |
Amitkumar Karwar | 323d8f1 | 2015-06-15 04:03:35 -0700 | [diff] [blame] | 871 | break; |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 872 | default: |
Zhaoyang Liu | acebe8c | 2015-05-12 00:48:20 +0530 | [diff] [blame] | 873 | mwifiex_dbg(adapter, ERROR, "event: unknown event id: %#x\n", |
| 874 | eventcause); |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 875 | break; |
| 876 | } |
| 877 | |
| 878 | return ret; |
| 879 | } |