mac80211.c (07bf5297d392069021055800ef48a1106a5c85b5) | mac80211.c (0bcc2155983e03c41b21a356af87ae839a6b3ead) |
---|---|
1// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause 2/* 3 * Copyright (C) 2012-2014, 2018-2024 Intel Corporation 4 * Copyright (C) 2013-2015 Intel Mobile Communications GmbH 5 * Copyright (C) 2016-2017 Intel Deutschland GmbH 6 */ 7#include <linux/kernel.h> 8#include <linux/slab.h> --- 1598 unchanged lines hidden (view full) --- 1607 /* Only queue for this station is the mcast queue, 1608 * which shouldn't be in TFD mask anyway 1609 */ 1610 return iwl_mvm_allocate_int_sta(mvm, &mvmvif->deflink.mcast_sta, 0, 1611 vif->type, 1612 IWL_STA_MULTICAST); 1613} 1614 | 1// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause 2/* 3 * Copyright (C) 2012-2014, 2018-2024 Intel Corporation 4 * Copyright (C) 2013-2015 Intel Mobile Communications GmbH 5 * Copyright (C) 2016-2017 Intel Deutschland GmbH 6 */ 7#include <linux/kernel.h> 8#include <linux/slab.h> --- 1598 unchanged lines hidden (view full) --- 1607 /* Only queue for this station is the mcast queue, 1608 * which shouldn't be in TFD mask anyway 1609 */ 1610 return iwl_mvm_allocate_int_sta(mvm, &mvmvif->deflink.mcast_sta, 0, 1611 vif->type, 1612 IWL_STA_MULTICAST); 1613} 1614 |
1615void iwl_mvm_mac_init_mvmvif(struct iwl_mvm *mvm, struct iwl_mvm_vif *mvmvif) 1616{ 1617 lockdep_assert_held(&mvm->mutex); 1618 1619 if (test_bit(IWL_MVM_STATUS_IN_HW_RESTART, &mvm->status)) 1620 return; 1621 1622 INIT_DELAYED_WORK(&mvmvif->csa_work, 1623 iwl_mvm_channel_switch_disconnect_wk); 1624} 1625 |
|
1615static int iwl_mvm_mac_add_interface(struct ieee80211_hw *hw, 1616 struct ieee80211_vif *vif) 1617{ 1618 struct iwl_mvm *mvm = IWL_MAC80211_GET_MVM(hw); 1619 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); 1620 int ret; 1621 int i; 1622 1623 mutex_lock(&mvm->mutex); 1624 | 1626static int iwl_mvm_mac_add_interface(struct ieee80211_hw *hw, 1627 struct ieee80211_vif *vif) 1628{ 1629 struct iwl_mvm *mvm = IWL_MAC80211_GET_MVM(hw); 1630 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); 1631 int ret; 1632 int i; 1633 1634 mutex_lock(&mvm->mutex); 1635 |
1636 iwl_mvm_mac_init_mvmvif(mvm, mvmvif); 1637 |
|
1625 mvmvif->mvm = mvm; 1626 1627 /* the first link always points to the default one */ 1628 mvmvif->deflink.fw_link_id = IWL_MVM_FW_LINK_ID_INVALID; 1629 mvmvif->deflink.active = 0; 1630 mvmvif->link[0] = &mvmvif->deflink; 1631 1632 ret = iwl_mvm_set_link_mapping(mvm, vif, &vif->bss_conf); --- 65 unchanged lines hidden (view full) --- 1698 vif->driver_flags |= IEEE80211_VIF_BEACON_FILTER | 1699 IEEE80211_VIF_SUPPORTS_CQM_RSSI; 1700 } 1701 1702 if (vif->type == NL80211_IFTYPE_P2P_DEVICE) 1703 mvm->p2p_device_vif = vif; 1704 1705 iwl_mvm_tcm_add_vif(mvm, vif); | 1638 mvmvif->mvm = mvm; 1639 1640 /* the first link always points to the default one */ 1641 mvmvif->deflink.fw_link_id = IWL_MVM_FW_LINK_ID_INVALID; 1642 mvmvif->deflink.active = 0; 1643 mvmvif->link[0] = &mvmvif->deflink; 1644 1645 ret = iwl_mvm_set_link_mapping(mvm, vif, &vif->bss_conf); --- 65 unchanged lines hidden (view full) --- 1711 vif->driver_flags |= IEEE80211_VIF_BEACON_FILTER | 1712 IEEE80211_VIF_SUPPORTS_CQM_RSSI; 1713 } 1714 1715 if (vif->type == NL80211_IFTYPE_P2P_DEVICE) 1716 mvm->p2p_device_vif = vif; 1717 1718 iwl_mvm_tcm_add_vif(mvm, vif); |
1706 INIT_DELAYED_WORK(&mvmvif->csa_work, 1707 iwl_mvm_channel_switch_disconnect_wk); | |
1708 1709 if (vif->type == NL80211_IFTYPE_MONITOR) { 1710 mvm->monitor_on = true; 1711 mvm->monitor_p80 = 1712 iwl_mvm_chandef_get_primary_80(&vif->bss_conf.chanreq.oper); 1713 } 1714 1715 if (!test_bit(IWL_MVM_STATUS_IN_HW_RESTART, &mvm->status)) --- 21 unchanged lines hidden (view full) --- 1737 mutex_unlock(&mvm->mutex); 1738 1739 return ret; 1740} 1741 1742void iwl_mvm_prepare_mac_removal(struct iwl_mvm *mvm, 1743 struct ieee80211_vif *vif) 1744{ | 1719 1720 if (vif->type == NL80211_IFTYPE_MONITOR) { 1721 mvm->monitor_on = true; 1722 mvm->monitor_p80 = 1723 iwl_mvm_chandef_get_primary_80(&vif->bss_conf.chanreq.oper); 1724 } 1725 1726 if (!test_bit(IWL_MVM_STATUS_IN_HW_RESTART, &mvm->status)) --- 21 unchanged lines hidden (view full) --- 1748 mutex_unlock(&mvm->mutex); 1749 1750 return ret; 1751} 1752 1753void iwl_mvm_prepare_mac_removal(struct iwl_mvm *mvm, 1754 struct ieee80211_vif *vif) 1755{ |
1756 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); 1757 |
|
1745 if (vif->type == NL80211_IFTYPE_P2P_DEVICE) { 1746 /* 1747 * Flush the ROC worker which will flush the OFFCHANNEL queue. 1748 * We assume here that all the packets sent to the OFFCHANNEL 1749 * queue are sent in ROC session. 1750 */ 1751 flush_work(&mvm->roc_done_wk); 1752 } | 1758 if (vif->type == NL80211_IFTYPE_P2P_DEVICE) { 1759 /* 1760 * Flush the ROC worker which will flush the OFFCHANNEL queue. 1761 * We assume here that all the packets sent to the OFFCHANNEL 1762 * queue are sent in ROC session. 1763 */ 1764 flush_work(&mvm->roc_done_wk); 1765 } |
1766 1767 cancel_delayed_work_sync(&mvmvif->csa_work); |
|
1753} 1754 1755/* This function is doing the common part of removing the interface for 1756 * both - MLD and non-MLD modes. Returns true if removing the interface 1757 * is done 1758 */ 1759static bool iwl_mvm_mac_remove_interface_common(struct ieee80211_hw *hw, 1760 struct ieee80211_vif *vif) --- 4693 unchanged lines hidden --- | 1768} 1769 1770/* This function is doing the common part of removing the interface for 1771 * both - MLD and non-MLD modes. Returns true if removing the interface 1772 * is done 1773 */ 1774static bool iwl_mvm_mac_remove_interface_common(struct ieee80211_hw *hw, 1775 struct ieee80211_vif *vif) --- 4693 unchanged lines hidden --- |