static void mwifiex_process_uap_tx_pause(struct mwifiex_private *priv, struct mwifiex_ie_types_header *tlv) { struct mwifiex_tx_pause_tlv *tp; struct mwifiex_sta_node *sta_ptr; unsigned long flags; tp = (void *)tlv; mwifiex_dbg(priv->adapter, EVENT, "uap tx_pause: %pM pause=%d, pkts=%d\n", tp->peermac, tp->tx_pause, tp->pkt_cnt); if (ether_addr_equal(tp->peermac, priv->netdev->dev_addr)) { if (tp->tx_pause) priv->port_open = false; else priv->port_open = true; } else if (is_multicast_ether_addr(tp->peermac)) { mwifiex_update_ralist_tx_pause(priv, tp->peermac, tp->tx_pause); } else { spin_lock_irqsave(&priv->sta_list_spinlock, flags); sta_ptr = mwifiex_get_sta_entry(priv, tp->peermac); if (sta_ptr && sta_ptr->tx_pause != tp->tx_pause) { sta_ptr->tx_pause = tp->tx_pause; mwifiex_update_ralist_tx_pause(priv, tp->peermac, tp->tx_pause); } spin_unlock_irqrestore(&priv->sta_list_spinlock, flags); } }
static void mwifiex_process_sta_tx_pause(struct mwifiex_private *priv, struct mwifiex_ie_types_header *tlv) { struct mwifiex_tx_pause_tlv *tp; struct mwifiex_sta_node *sta_ptr; int status; unsigned long flags; tp = (void *)tlv; mwifiex_dbg(priv->adapter, EVENT, "sta tx_pause: %pM pause=%d, pkts=%d\n", tp->peermac, tp->tx_pause, tp->pkt_cnt); if (ether_addr_equal(tp->peermac, priv->cfg_bssid)) { if (tp->tx_pause) priv->port_open = false; else priv->port_open = true; } else { if (!ISSUPP_TDLS_ENABLED(priv->adapter->fw_cap_info)) return; status = mwifiex_get_tdls_link_status(priv, tp->peermac); if (mwifiex_is_tdls_link_setup(status)) { spin_lock_irqsave(&priv->sta_list_spinlock, flags); sta_ptr = mwifiex_get_sta_entry(priv, tp->peermac); spin_unlock_irqrestore(&priv->sta_list_spinlock, flags); if (sta_ptr && sta_ptr->tx_pause != tp->tx_pause) { sta_ptr->tx_pause = tp->tx_pause; mwifiex_update_ralist_tx_pause(priv, tp->peermac, tp->tx_pause); } } } }