Lines Matching +full:1 +full:d +full:- +full:histogram
1 // SPDX-License-Identifier: GPL-2.0-only
5 * Copyright 2011-2020 NXP
18 item_addr(debug_mask), 1},
20 item_addr(int_counter), 1},
22 item_addr(packets_out[WMM_AC_VO]), 1},
24 item_addr(packets_out[WMM_AC_VI]), 1},
26 item_addr(packets_out[WMM_AC_BE]), 1},
28 item_addr(packets_out[WMM_AC_BK]), 1},
30 item_addr(tx_buf_size), 1},
32 item_addr(curr_tx_buf_size), 1},
34 item_addr(ps_mode), 1},
36 item_addr(ps_state), 1},
38 item_addr(is_deep_sleep), 1},
40 item_addr(pm_wakeup_card_req), 1},
42 item_addr(pm_wakeup_fw_try), 1},
44 item_addr(is_hs_configured), 1},
46 item_addr(hs_activated), 1},
48 item_addr(num_tx_timeout), 1},
50 item_addr(is_cmd_timedout), 1},
52 item_addr(timeout_cmd_id), 1},
54 item_addr(timeout_cmd_act), 1},
60 item_addr(last_cmd_index), 1},
64 item_addr(last_cmd_resp_index), 1},
68 item_addr(last_event_index), 1},
78 item_addr(last_sdio_mp_index), 1},
80 item_addr(num_cmd_host_to_card_failure), 1},
83 item_addr(num_cmd_sleep_cfm_host_to_card_failure), 1},
85 item_addr(num_tx_host_to_card_failure), 1},
87 item_addr(num_event_deauth), 1},
89 item_addr(num_event_disassoc), 1},
91 item_addr(num_event_link_lost), 1},
93 item_addr(num_cmd_deauth), 1},
95 item_addr(num_cmd_assoc_success), 1},
97 item_addr(num_cmd_assoc_failure), 1},
99 item_addr(cmd_sent), 1},
101 item_addr(data_sent), 1},
103 item_addr(cmd_resp_received), 1},
105 item_addr(event_received), 1},
109 adapter_item_addr(cmd_pending), 1},
111 adapter_item_addr(tx_pending), 1},
113 adapter_item_addr(rx_pending), 1},
132 mwifiex_dbg(priv->adapter, ERROR, in mwifiex_init_shutdown_fw()
134 return -1; in mwifiex_init_shutdown_fw()
150 struct mwifiex_adapter *adapter = priv->adapter; in mwifiex_get_debug_info()
153 info->debug_mask = adapter->debug_mask; in mwifiex_get_debug_info()
154 memcpy(info->packets_out, in mwifiex_get_debug_info()
155 priv->wmm.packets_out, in mwifiex_get_debug_info()
156 sizeof(priv->wmm.packets_out)); in mwifiex_get_debug_info()
157 info->curr_tx_buf_size = (u32) adapter->curr_tx_buf_size; in mwifiex_get_debug_info()
158 info->tx_buf_size = (u32) adapter->tx_buf_size; in mwifiex_get_debug_info()
159 info->rx_tbl_num = mwifiex_get_rx_reorder_tbl(priv, in mwifiex_get_debug_info()
160 info->rx_tbl); in mwifiex_get_debug_info()
161 info->tx_tbl_num = mwifiex_get_tx_ba_stream_tbl(priv, in mwifiex_get_debug_info()
162 info->tx_tbl); in mwifiex_get_debug_info()
163 info->tdls_peer_num = mwifiex_get_tdls_list(priv, in mwifiex_get_debug_info()
164 info->tdls_list); in mwifiex_get_debug_info()
165 info->ps_mode = adapter->ps_mode; in mwifiex_get_debug_info()
166 info->ps_state = adapter->ps_state; in mwifiex_get_debug_info()
167 info->is_deep_sleep = adapter->is_deep_sleep; in mwifiex_get_debug_info()
168 info->pm_wakeup_card_req = adapter->pm_wakeup_card_req; in mwifiex_get_debug_info()
169 info->pm_wakeup_fw_try = adapter->pm_wakeup_fw_try; in mwifiex_get_debug_info()
170 info->is_hs_configured = test_bit(MWIFIEX_IS_HS_CONFIGURED, in mwifiex_get_debug_info()
171 &adapter->work_flags); in mwifiex_get_debug_info()
172 info->hs_activated = adapter->hs_activated; in mwifiex_get_debug_info()
173 info->is_cmd_timedout = test_bit(MWIFIEX_IS_CMD_TIMEDOUT, in mwifiex_get_debug_info()
174 &adapter->work_flags); in mwifiex_get_debug_info()
175 info->num_cmd_host_to_card_failure in mwifiex_get_debug_info()
176 = adapter->dbg.num_cmd_host_to_card_failure; in mwifiex_get_debug_info()
177 info->num_cmd_sleep_cfm_host_to_card_failure in mwifiex_get_debug_info()
178 = adapter->dbg.num_cmd_sleep_cfm_host_to_card_failure; in mwifiex_get_debug_info()
179 info->num_tx_host_to_card_failure in mwifiex_get_debug_info()
180 = adapter->dbg.num_tx_host_to_card_failure; in mwifiex_get_debug_info()
181 info->num_event_deauth = adapter->dbg.num_event_deauth; in mwifiex_get_debug_info()
182 info->num_event_disassoc = adapter->dbg.num_event_disassoc; in mwifiex_get_debug_info()
183 info->num_event_link_lost = adapter->dbg.num_event_link_lost; in mwifiex_get_debug_info()
184 info->num_cmd_deauth = adapter->dbg.num_cmd_deauth; in mwifiex_get_debug_info()
185 info->num_cmd_assoc_success = in mwifiex_get_debug_info()
186 adapter->dbg.num_cmd_assoc_success; in mwifiex_get_debug_info()
187 info->num_cmd_assoc_failure = in mwifiex_get_debug_info()
188 adapter->dbg.num_cmd_assoc_failure; in mwifiex_get_debug_info()
189 info->num_tx_timeout = adapter->dbg.num_tx_timeout; in mwifiex_get_debug_info()
190 info->timeout_cmd_id = adapter->dbg.timeout_cmd_id; in mwifiex_get_debug_info()
191 info->timeout_cmd_act = adapter->dbg.timeout_cmd_act; in mwifiex_get_debug_info()
192 memcpy(info->last_cmd_id, adapter->dbg.last_cmd_id, in mwifiex_get_debug_info()
193 sizeof(adapter->dbg.last_cmd_id)); in mwifiex_get_debug_info()
194 memcpy(info->last_cmd_act, adapter->dbg.last_cmd_act, in mwifiex_get_debug_info()
195 sizeof(adapter->dbg.last_cmd_act)); in mwifiex_get_debug_info()
196 info->last_cmd_index = adapter->dbg.last_cmd_index; in mwifiex_get_debug_info()
197 memcpy(info->last_cmd_resp_id, adapter->dbg.last_cmd_resp_id, in mwifiex_get_debug_info()
198 sizeof(adapter->dbg.last_cmd_resp_id)); in mwifiex_get_debug_info()
199 info->last_cmd_resp_index = adapter->dbg.last_cmd_resp_index; in mwifiex_get_debug_info()
200 memcpy(info->last_event, adapter->dbg.last_event, in mwifiex_get_debug_info()
201 sizeof(adapter->dbg.last_event)); in mwifiex_get_debug_info()
202 info->last_event_index = adapter->dbg.last_event_index; in mwifiex_get_debug_info()
203 memcpy(info->last_mp_wr_bitmap, adapter->dbg.last_mp_wr_bitmap, in mwifiex_get_debug_info()
204 sizeof(adapter->dbg.last_mp_wr_bitmap)); in mwifiex_get_debug_info()
205 memcpy(info->last_mp_wr_ports, adapter->dbg.last_mp_wr_ports, in mwifiex_get_debug_info()
206 sizeof(adapter->dbg.last_mp_wr_ports)); in mwifiex_get_debug_info()
207 memcpy(info->last_mp_curr_wr_port, in mwifiex_get_debug_info()
208 adapter->dbg.last_mp_curr_wr_port, in mwifiex_get_debug_info()
209 sizeof(adapter->dbg.last_mp_curr_wr_port)); in mwifiex_get_debug_info()
210 memcpy(info->last_mp_wr_len, adapter->dbg.last_mp_wr_len, in mwifiex_get_debug_info()
211 sizeof(adapter->dbg.last_mp_wr_len)); in mwifiex_get_debug_info()
212 info->last_sdio_mp_index = adapter->dbg.last_sdio_mp_index; in mwifiex_get_debug_info()
213 info->data_sent = adapter->data_sent; in mwifiex_get_debug_info()
214 info->cmd_sent = adapter->cmd_sent; in mwifiex_get_debug_info()
215 info->cmd_resp_received = adapter->cmd_resp_received; in mwifiex_get_debug_info()
225 struct mwifiex_debug_data *d = &items[0]; in mwifiex_debug_info_to_buffer() local
234 p += sprintf(p, "%s=", d[i].name); in mwifiex_debug_info_to_buffer()
236 size = d[i].size / d[i].num; in mwifiex_debug_info_to_buffer()
238 if (i < (num_of_items - 3)) in mwifiex_debug_info_to_buffer()
239 addr = d[i].addr + (size_t)info; in mwifiex_debug_info_to_buffer()
241 addr = d[i].addr + (size_t)priv->adapter; in mwifiex_debug_info_to_buffer()
243 for (j = 0; j < d[i].num; j++) { in mwifiex_debug_info_to_buffer()
245 case 1: in mwifiex_debug_info_to_buffer()
258 val = -1; in mwifiex_debug_info_to_buffer()
269 if (info->tx_tbl_num) { in mwifiex_debug_info_to_buffer()
271 for (i = 0; i < info->tx_tbl_num; i++) in mwifiex_debug_info_to_buffer()
272 p += sprintf(p, "tid = %d, ra = %pM\n", in mwifiex_debug_info_to_buffer()
273 info->tx_tbl[i].tid, info->tx_tbl[i].ra); in mwifiex_debug_info_to_buffer()
276 if (info->rx_tbl_num) { in mwifiex_debug_info_to_buffer()
278 for (i = 0; i < info->rx_tbl_num; i++) { in mwifiex_debug_info_to_buffer()
279 p += sprintf(p, "tid = %d, ta = %pM, ", in mwifiex_debug_info_to_buffer()
280 info->rx_tbl[i].tid, in mwifiex_debug_info_to_buffer()
281 info->rx_tbl[i].ta); in mwifiex_debug_info_to_buffer()
282 p += sprintf(p, "start_win = %d, ", in mwifiex_debug_info_to_buffer()
283 info->rx_tbl[i].start_win); in mwifiex_debug_info_to_buffer()
284 p += sprintf(p, "win_size = %d, buffer: ", in mwifiex_debug_info_to_buffer()
285 info->rx_tbl[i].win_size); in mwifiex_debug_info_to_buffer()
287 for (j = 0; j < info->rx_tbl[i].win_size; j++) in mwifiex_debug_info_to_buffer()
289 info->rx_tbl[i].buffer[j] ? in mwifiex_debug_info_to_buffer()
290 '1' : '0'); in mwifiex_debug_info_to_buffer()
296 if (info->tdls_peer_num) { in mwifiex_debug_info_to_buffer()
298 for (i = 0; i < info->tdls_peer_num; i++) { in mwifiex_debug_info_to_buffer()
300 info->tdls_list[i].peer_addr); in mwifiex_debug_info_to_buffer()
305 return p - buf; in mwifiex_debug_info_to_buffer()
316 stype = (le16_to_cpu(ieee_hdr->frame_control) & IEEE80211_FCTL_STYPE); in mwifiex_parse_mgmt_packet()
324 + 1); in mwifiex_parse_mgmt_packet()
326 addr2 = ieee_hdr->addr2; in mwifiex_parse_mgmt_packet()
327 mwifiex_dbg(priv->adapter, INFO, in mwifiex_parse_mgmt_packet()
328 "TDLS discovery response %pM nf=%d, snr=%d\n", in mwifiex_parse_mgmt_packet()
329 addr2, rx_pd->nf, rx_pd->snr); in mwifiex_parse_mgmt_packet()
332 rx_pd->snr, in mwifiex_parse_mgmt_packet()
333 rx_pd->nf); in mwifiex_parse_mgmt_packet()
338 mwifiex_dbg(priv->adapter, INFO, in mwifiex_parse_mgmt_packet()
340 return -1; in mwifiex_parse_mgmt_packet()
342 mwifiex_dbg(priv->adapter, INFO, in mwifiex_parse_mgmt_packet()
343 "unknown public action frame category %d\n", in mwifiex_parse_mgmt_packet()
348 mwifiex_dbg(priv->adapter, INFO, in mwifiex_parse_mgmt_packet()
364 mgmt->frame_control = cpu_to_le16(IEEE80211_STYPE_DEAUTH); in mwifiex_host_mlme_disconnect()
365 mgmt->duration = 0; in mwifiex_host_mlme_disconnect()
366 mgmt->seq_ctrl = 0; in mwifiex_host_mlme_disconnect()
367 mgmt->u.deauth.reason_code = cpu_to_le16(reason_code); in mwifiex_host_mlme_disconnect()
370 eth_broadcast_addr(mgmt->da); in mwifiex_host_mlme_disconnect()
371 memcpy(mgmt->sa, in mwifiex_host_mlme_disconnect()
372 priv->curr_bss_params.bss_descriptor.mac_address, in mwifiex_host_mlme_disconnect()
374 memcpy(mgmt->bssid, priv->cfg_bssid, ETH_ALEN); in mwifiex_host_mlme_disconnect()
375 priv->auth_flag = 0; in mwifiex_host_mlme_disconnect()
376 priv->auth_alg = WLAN_AUTH_NONE; in mwifiex_host_mlme_disconnect()
378 memcpy(mgmt->da, priv->curr_addr, ETH_ALEN); in mwifiex_host_mlme_disconnect()
379 memcpy(mgmt->sa, sa, ETH_ALEN); in mwifiex_host_mlme_disconnect()
380 memcpy(mgmt->bssid, priv->curr_addr, ETH_ALEN); in mwifiex_host_mlme_disconnect()
384 wiphy_lock(priv->wdev.wiphy); in mwifiex_host_mlme_disconnect()
385 cfg80211_rx_mlme_mgmt(priv->netdev, frame_buf, 26); in mwifiex_host_mlme_disconnect()
386 wiphy_unlock(priv->wdev.wiphy); in mwifiex_host_mlme_disconnect()
388 cfg80211_rx_mgmt(&priv->wdev, in mwifiex_host_mlme_disconnect()
389 priv->bss_chandef.chan->center_freq, in mwifiex_host_mlme_disconnect()
407 return -1; in mwifiex_process_mgmt_packet()
409 if (!priv->mgmt_frame_mask || in mwifiex_process_mgmt_packet()
410 priv->wdev.iftype == NL80211_IFTYPE_UNSPECIFIED) { in mwifiex_process_mgmt_packet()
411 mwifiex_dbg(priv->adapter, ERROR, in mwifiex_process_mgmt_packet()
413 return -1; in mwifiex_process_mgmt_packet()
416 rx_pd = (struct rxpd *)skb->data; in mwifiex_process_mgmt_packet()
417 pkt_len = le16_to_cpu(rx_pd->rx_pkt_length); in mwifiex_process_mgmt_packet()
419 mwifiex_dbg(priv->adapter, ERROR, "invalid rx_pkt_length"); in mwifiex_process_mgmt_packet()
420 return -1; in mwifiex_process_mgmt_packet()
423 skb_pull(skb, le16_to_cpu(rx_pd->rx_pkt_offset)); in mwifiex_process_mgmt_packet()
425 pkt_len -= sizeof(pkt_len); in mwifiex_process_mgmt_packet()
427 ieee_hdr = (void *)skb->data; in mwifiex_process_mgmt_packet()
428 if (ieee80211_is_mgmt(ieee_hdr->frame_control)) { in mwifiex_process_mgmt_packet()
431 return -1; in mwifiex_process_mgmt_packet()
434 memmove(skb->data + sizeof(struct ieee80211_hdr_3addr), in mwifiex_process_mgmt_packet()
435 skb->data + sizeof(struct ieee80211_hdr), in mwifiex_process_mgmt_packet()
436 pkt_len - sizeof(struct ieee80211_hdr)); in mwifiex_process_mgmt_packet()
438 pkt_len -= ETH_ALEN; in mwifiex_process_mgmt_packet()
439 rx_pd->rx_pkt_length = cpu_to_le16(pkt_len); in mwifiex_process_mgmt_packet()
441 if (priv->host_mlme_reg && in mwifiex_process_mgmt_packet()
443 (ieee80211_is_auth(ieee_hdr->frame_control) || in mwifiex_process_mgmt_packet()
444 ieee80211_is_deauth(ieee_hdr->frame_control) || in mwifiex_process_mgmt_packet()
445 ieee80211_is_disassoc(ieee_hdr->frame_control))) { in mwifiex_process_mgmt_packet()
446 if (ieee80211_is_auth(ieee_hdr->frame_control)) { in mwifiex_process_mgmt_packet()
447 if (priv->auth_flag & HOST_MLME_AUTH_PENDING) { in mwifiex_process_mgmt_packet()
448 if (priv->auth_alg != WLAN_AUTH_SAE) { in mwifiex_process_mgmt_packet()
449 priv->auth_flag &= in mwifiex_process_mgmt_packet()
451 priv->auth_flag |= in mwifiex_process_mgmt_packet()
458 mwifiex_dbg(priv->adapter, MSG, in mwifiex_process_mgmt_packet()
460 ieee_hdr->addr3); in mwifiex_process_mgmt_packet()
462 if (!priv->wdev.connected || in mwifiex_process_mgmt_packet()
463 !ether_addr_equal(ieee_hdr->addr3, in mwifiex_process_mgmt_packet()
464 priv->curr_bss_params.bss_descriptor.mac_address)) in mwifiex_process_mgmt_packet()
467 if (ieee80211_is_deauth(ieee_hdr->frame_control)) { in mwifiex_process_mgmt_packet()
468 mwifiex_dbg(priv->adapter, MSG, in mwifiex_process_mgmt_packet()
470 ieee_hdr->addr3); in mwifiex_process_mgmt_packet()
471 priv->auth_flag = 0; in mwifiex_process_mgmt_packet()
472 priv->auth_alg = WLAN_AUTH_NONE; in mwifiex_process_mgmt_packet()
475 (priv->adapter, MSG, in mwifiex_process_mgmt_packet()
477 ieee_hdr->addr3); in mwifiex_process_mgmt_packet()
481 wiphy_lock(priv->wdev.wiphy); in mwifiex_process_mgmt_packet()
482 cfg80211_rx_mlme_mgmt(priv->netdev, skb->data, pkt_len); in mwifiex_process_mgmt_packet()
483 wiphy_unlock(priv->wdev.wiphy); in mwifiex_process_mgmt_packet()
486 if (priv->adapter->host_mlme_enabled && in mwifiex_process_mgmt_packet()
488 if (ieee80211_is_auth(ieee_hdr->frame_control)) in mwifiex_process_mgmt_packet()
489 mwifiex_dbg(priv->adapter, MSG, in mwifiex_process_mgmt_packet()
491 ieee_hdr->addr2); in mwifiex_process_mgmt_packet()
492 if (ieee80211_is_deauth(ieee_hdr->frame_control)) in mwifiex_process_mgmt_packet()
493 mwifiex_dbg(priv->adapter, MSG, in mwifiex_process_mgmt_packet()
495 ieee_hdr->addr2); in mwifiex_process_mgmt_packet()
496 if (ieee80211_is_disassoc(ieee_hdr->frame_control)) in mwifiex_process_mgmt_packet()
497 mwifiex_dbg(priv->adapter, MSG, in mwifiex_process_mgmt_packet()
499 ieee_hdr->addr2); in mwifiex_process_mgmt_packet()
500 if (ieee80211_is_assoc_req(ieee_hdr->frame_control)) in mwifiex_process_mgmt_packet()
501 mwifiex_dbg(priv->adapter, MSG, in mwifiex_process_mgmt_packet()
503 ieee_hdr->addr2); in mwifiex_process_mgmt_packet()
504 if (ieee80211_is_reassoc_req(ieee_hdr->frame_control)) in mwifiex_process_mgmt_packet()
505 mwifiex_dbg(priv->adapter, MSG, in mwifiex_process_mgmt_packet()
507 ieee_hdr->addr2); in mwifiex_process_mgmt_packet()
510 cfg80211_rx_mgmt(&priv->wdev, priv->roc_cfg.chan.center_freq, in mwifiex_process_mgmt_packet()
511 CAL_RSSI(rx_pd->snr, rx_pd->nf), skb->data, pkt_len, in mwifiex_process_mgmt_packet()
532 return -1; in mwifiex_recv_packet()
534 priv->stats.rx_bytes += skb->len; in mwifiex_recv_packet()
535 priv->stats.rx_packets++; in mwifiex_recv_packet()
538 p_ethhdr = (void *)skb->data; in mwifiex_recv_packet()
539 src_node = mwifiex_get_sta_entry(priv, p_ethhdr->h_source); in mwifiex_recv_packet()
541 src_node->stats.last_rx = jiffies; in mwifiex_recv_packet()
542 src_node->stats.rx_bytes += skb->len; in mwifiex_recv_packet()
543 src_node->stats.rx_packets++; in mwifiex_recv_packet()
547 skb->dev = priv->netdev; in mwifiex_recv_packet()
548 skb->protocol = eth_type_trans(skb, priv->netdev); in mwifiex_recv_packet()
549 skb->ip_summed = CHECKSUM_NONE; in mwifiex_recv_packet()
565 * fragments. Currently we fail the Filesndl-ht.scr script in mwifiex_recv_packet()
568 if ((priv->adapter->iface_type == MWIFIEX_USB || in mwifiex_recv_packet()
569 priv->adapter->iface_type == MWIFIEX_PCIE) && in mwifiex_recv_packet()
570 (skb->truesize > MWIFIEX_RX_DATA_BUF_SIZE)) in mwifiex_recv_packet()
571 skb->truesize += (skb->len - MWIFIEX_RX_DATA_BUF_SIZE); in mwifiex_recv_packet()
589 WARN_ON(!cmd_node->wait_q_enabled); in mwifiex_complete_cmd()
590 mwifiex_dbg(adapter, CMD, "cmd completed: status=%d\n", in mwifiex_complete_cmd()
591 adapter->cmd_wait_q.status); in mwifiex_complete_cmd()
593 *cmd_node->condition = true; in mwifiex_complete_cmd()
594 wake_up_interruptible(&adapter->cmd_wait_q.wait); in mwifiex_complete_cmd()
612 list_for_each_entry(node, &priv->sta_list, list) { in mwifiex_get_sta_entry()
613 if (!memcmp(node->mac_addr, mac, ETH_ALEN)) in mwifiex_get_sta_entry()
625 list_for_each_entry(node, &priv->sta_list, list) { in mwifiex_get_tdls_sta_entry()
626 if (node->tdls_status == status) in mwifiex_get_tdls_sta_entry()
633 /* If tdls channel switching is on-going, tx data traffic should be
640 if (!priv || !ISSUPP_TDLS_ENABLED(priv->adapter->fw_cap_info)) in mwifiex_is_tdls_chan_switching()
654 if (!priv || !ISSUPP_TDLS_ENABLED(priv->adapter->fw_cap_info)) in mwifiex_is_tdls_off_chan()
664 /* If tdls channel switching is on-going or tdls operate on off-channel,
665 * cmd path should be blocked until tdls switched to base-channel.
669 if (!priv || !ISSUPP_TDLS_ENABLED(priv->adapter->fw_cap_info)) in mwifiex_is_send_cmd_allowed()
692 spin_lock_bh(&priv->sta_list_spinlock); in mwifiex_add_sta_entry()
701 memcpy(node->mac_addr, mac, ETH_ALEN); in mwifiex_add_sta_entry()
702 list_add_tail(&node->list, &priv->sta_list); in mwifiex_add_sta_entry()
705 spin_unlock_bh(&priv->sta_list_spinlock); in mwifiex_add_sta_entry()
725 ht_cap = (void *)(ht_cap_ie + 1); in mwifiex_set_sta_ht_cap()
726 node->is_11n_enabled = 1; in mwifiex_set_sta_ht_cap()
727 node->max_amsdu = le16_to_cpu(ht_cap->cap_info) & in mwifiex_set_sta_ht_cap()
732 node->is_11n_enabled = 0; in mwifiex_set_sta_ht_cap()
743 spin_lock_bh(&priv->sta_list_spinlock); in mwifiex_del_sta_entry()
747 list_del(&node->list); in mwifiex_del_sta_entry()
751 spin_unlock_bh(&priv->sta_list_spinlock); in mwifiex_del_sta_entry()
760 spin_lock_bh(&priv->sta_list_spinlock); in mwifiex_del_all_sta_list()
762 list_for_each_entry_safe(node, tmp, &priv->sta_list, list) { in mwifiex_del_all_sta_list()
763 list_del(&node->list); in mwifiex_del_all_sta_list()
767 INIT_LIST_HEAD(&priv->sta_list); in mwifiex_del_all_sta_list()
768 spin_unlock_bh(&priv->sta_list_spinlock); in mwifiex_del_all_sta_list()
772 /* This function adds histogram data to histogram array*/
776 struct mwifiex_histogram_data *phist_data = priv->hist_data; in mwifiex_hist_data_add()
778 if (atomic_read(&phist_data->num_samples) > MWIFIEX_HIST_MAX_SAMPLES) in mwifiex_hist_data_add()
783 /* function to add histogram record */
787 struct mwifiex_histogram_data *phist_data = priv->hist_data; in mwifiex_hist_data_set()
788 s8 nf = -nflr; in mwifiex_hist_data_set()
789 s8 rssi = snr - nflr; in mwifiex_hist_data_set()
791 atomic_inc(&phist_data->num_samples); in mwifiex_hist_data_set()
792 atomic_inc(&phist_data->rx_rate[rx_rate]); in mwifiex_hist_data_set()
793 atomic_inc(&phist_data->snr[snr + 128]); in mwifiex_hist_data_set()
794 atomic_inc(&phist_data->noise_flr[nf + 128]); in mwifiex_hist_data_set()
795 atomic_inc(&phist_data->sig_str[rssi + 128]); in mwifiex_hist_data_set()
798 /* function to reset histogram data during init/reset */
802 struct mwifiex_histogram_data *phist_data = priv->hist_data; in mwifiex_hist_data_reset()
804 atomic_set(&phist_data->num_samples, 0); in mwifiex_hist_data_reset()
806 atomic_set(&phist_data->rx_rate[ix], 0); in mwifiex_hist_data_reset()
808 atomic_set(&phist_data->snr[ix], 0); in mwifiex_hist_data_reset()
810 atomic_set(&phist_data->noise_flr[ix], 0); in mwifiex_hist_data_reset()
812 atomic_set(&phist_data->sig_str[ix], 0); in mwifiex_hist_data_reset()
829 pad = MWIFIEX_ALIGN_ADDR(skb->data, MWIFIEX_DMA_ALIGN_SZ) - in mwifiex_alloc_dma_align_buf()
830 (long)skb->data; in mwifiex_alloc_dma_align_buf()