Lines Matching refs:hw

104 	offchannel_flag = local->hw.conf.flags & IEEE80211_CONF_OFFCHANNEL;
121 local->hw.conf.flags |= IEEE80211_CONF_OFFCHANNEL;
123 local->hw.conf.flags &= ~IEEE80211_CONF_OFFCHANNEL;
125 offchannel_flag ^= local->hw.conf.flags & IEEE80211_CONF_OFFCHANNEL;
128 !cfg80211_chandef_identical(&local->hw.conf.chandef,
130 local->hw.conf.chandef = chandef;
134 if (!conf_is_ht(&local->hw.conf)) {
140 local->hw.conf.smps_mode = IEEE80211_SMPS_STATIC;
141 } else if (local->hw.conf.smps_mode != local->smps_mode) {
142 local->hw.conf.smps_mode = local->smps_mode;
158 if (local->hw.conf.power_level != power) {
160 local->hw.conf.power_level = power;
233 ieee80211_rx(&local->hw, skb);
237 ieee80211_tx_status(&local->hw, skb);
265 void ieee80211_restart_hw(struct ieee80211_hw *hw)
267 struct ieee80211_local *local = hw_to_local(hw);
271 wiphy_info(hw->wiphy,
275 ieee80211_stop_queues_by_reason(hw, IEEE80211_MAX_QUEUE_MAP,
310 if (wdev->wiphy != local->hw.wiphy)
362 if (!wdev || wdev->wiphy != local->hw.wiphy)
510 /* Ensure 32-byte alignment of our private data and hw private data.
567 local->hw.wiphy = wiphy;
569 local->hw.priv = (char *)local + ALIGN(sizeof(*local), NETDEV_ALIGN);
575 local->hw.queues = 1;
576 local->hw.max_rates = 1;
577 local->hw.max_report_rates = 0;
578 local->hw.max_rx_aggregation_subframes = IEEE80211_MAX_AMPDU_BUF;
579 local->hw.max_tx_aggregation_subframes = IEEE80211_MAX_AMPDU_BUF;
580 local->hw.offchannel_tx_hw_queue = IEEE80211_INVAL_HW_QUEUE;
581 local->hw.conf.long_frame_max_tx_count = wiphy->retry_long;
582 local->hw.conf.short_frame_max_tx_count = wiphy->retry_short;
583 local->hw.radiotap_mcs_details = IEEE80211_RADIOTAP_MCS_HAVE_MCS |
586 local->hw.radiotap_vht_details = IEEE80211_RADIOTAP_VHT_KNOWN_GI |
588 local->hw.uapsd_queues = IEEE80211_DEFAULT_UAPSD_QUEUES;
589 local->hw.uapsd_max_sp_len = IEEE80211_DEFAULT_MAX_SP_LEN;
652 return &local->hw;
660 bool have_mfp = local->hw.flags & IEEE80211_HW_MFP_CAPABLE;
661 const struct ieee80211_cipher_scheme *cs = local->hw.cipher_schemes;
671 /* keep last -- depends on hw flags! */
676 if (local->hw.wiphy->cipher_suites && have_wep)
680 if (!local->hw.wiphy->cipher_suites && !cs) {
681 local->hw.wiphy->cipher_suites = cipher_suites;
682 local->hw.wiphy->n_cipher_suites = ARRAY_SIZE(cipher_suites);
685 local->hw.wiphy->n_cipher_suites--;
688 local->hw.wiphy->cipher_suites += 2;
689 local->hw.wiphy->n_cipher_suites -= 2;
695 if (!local->hw.wiphy->cipher_suites) {
700 n_suites = local->hw.n_cipher_schemes + 2;
725 for (r = 0; r < local->hw.n_cipher_schemes; r++)
729 suites = kmemdup(local->hw.wiphy->cipher_suites,
730 sizeof(u32) * local->hw.wiphy->n_cipher_suites,
735 for (r = 0; r < local->hw.wiphy->n_cipher_suites; r++) {
736 u32 suite = local->hw.wiphy->cipher_suites[r];
745 local->hw.wiphy->cipher_suites = suites;
746 local->hw.wiphy->n_cipher_suites = w;
752 int ieee80211_register_hw(struct ieee80211_hw *hw)
754 struct ieee80211_local *local = hw_to_local(hw);
762 if (hw->flags & IEEE80211_HW_QUEUE_CONTROL &&
763 (local->hw.offchannel_tx_hw_queue == IEEE80211_INVAL_HW_QUEUE ||
764 local->hw.offchannel_tx_hw_queue >= local->hw.queues))
768 if (hw->wiphy->wowlan && (!local->ops->suspend || !local->ops->resume))
773 for (i = 0; i < local->hw.wiphy->n_iface_combinations; i++) {
776 comb = &local->hw.wiphy->iface_combinations[i];
787 if (local->hw.wiphy->interface_modes & BIT(NL80211_IFTYPE_WDS))
791 for (i = 0; i < local->hw.wiphy->n_iface_combinations; i++) {
794 comb = &local->hw.wiphy->iface_combinations[i];
804 if (WARN_ON(hw->netdev_features & ~feature_whitelist))
807 if (hw->max_report_rates == 0)
808 hw->max_report_rates = hw->max_rates;
815 * that hw.conf.channel is assigned
824 sband = local->hw.wiphy->bands[band];
834 local->hw.conf.chandef = dflt_chandef;
856 if (local->hw.wiphy->interface_modes & BIT(NL80211_IFTYPE_AP)) {
857 hw->wiphy->interface_modes |= BIT(NL80211_IFTYPE_AP_VLAN);
858 hw->wiphy->software_iftypes |= BIT(NL80211_IFTYPE_AP_VLAN);
862 hw->wiphy->interface_modes |= BIT(NL80211_IFTYPE_MONITOR);
863 hw->wiphy->software_iftypes |= BIT(NL80211_IFTYPE_MONITOR);
866 for (i = 0; i < hw->wiphy->n_iface_combinations; i++) {
870 c = &hw->wiphy->iface_combinations[i];
884 if (!local->hw.wiphy->bands[band])
891 local->hw.wiphy->interface_modes &= ~BIT(NL80211_IFTYPE_MESH_POINT);
896 if (local->hw.wiphy->interface_modes & BIT(NL80211_IFTYPE_MESH_POINT))
897 local->hw.wiphy->flags |= WIPHY_FLAG_MESH_AUTH;
900 local->hw.wiphy->flags |= WIPHY_FLAG_CONTROL_PORT_PROTOCOL;
902 if (local->hw.flags & IEEE80211_HW_SIGNAL_DBM) {
903 local->hw.wiphy->signal_type = CFG80211_SIGNAL_TYPE_MBM;
904 } else if (local->hw.flags & IEEE80211_HW_SIGNAL_UNSPEC) {
905 local->hw.wiphy->signal_type = CFG80211_SIGNAL_TYPE_UNSPEC;
906 if (hw->max_signal <= 0) {
912 WARN((local->hw.flags & IEEE80211_HW_SUPPORTS_UAPSD)
913 && (local->hw.flags & IEEE80211_HW_PS_NULLFUNC_STACK),
933 local->hw.wiphy->max_scan_ssids = 4;
934 local->hw.wiphy->max_scan_ie_len = IEEE80211_MAX_DATA_LEN;
944 if (local->hw.wiphy->max_scan_ie_len)
945 local->hw.wiphy->max_scan_ie_len -= local->scan_ies_len;
947 WARN_ON(!ieee80211_cs_list_valid(local->hw.cipher_schemes,
948 local->hw.n_cipher_schemes));
955 local->hw.wiphy->max_remain_on_channel_duration = 5000;
958 if (local->hw.wiphy->flags & WIPHY_FLAG_SUPPORTS_TDLS)
959 local->hw.wiphy->flags |= WIPHY_FLAG_TDLS_EXTERNAL_SETUP;
961 local->hw.wiphy->max_num_csa_counters = IEEE80211_MAX_CSA_COUNTERS_NUM;
963 result = wiphy_register(local->hw.wiphy);
971 if (hw->queues > IEEE80211_MAX_QUEUES)
972 hw->queues = IEEE80211_MAX_QUEUES;
975 alloc_ordered_workqueue("%s", 0, wiphy_name(local->hw.wiphy));
986 local->tx_headroom = max_t(unsigned int , local->hw.extra_tx_headroom,
995 if (local->hw.max_listen_interval == 0)
996 local->hw.max_listen_interval = 5;
998 local->hw.conf.listen_interval = local->hw.max_listen_interval;
1004 wiphy_debug(local->hw.wiphy, "Failed to initialize wep: %d\n",
1007 local->hw.conf.flags = IEEE80211_CONF_IDLE;
1014 hw->rate_control_algorithm);
1016 wiphy_debug(local->hw.wiphy,
1022 if (local->hw.wiphy->interface_modes & BIT(NL80211_IFTYPE_STATION)) {
1026 wiphy_warn(local->hw.wiphy,
1078 wiphy_unregister(local->hw.wiphy);
1081 kfree(local->hw.wiphy->cipher_suites);
1087 void ieee80211_napi_add(struct ieee80211_hw *hw, struct napi_struct *napi,
1092 struct ieee80211_local *local = hw_to_local(hw);
1099 void ieee80211_unregister_hw(struct ieee80211_hw *hw)
1101 struct ieee80211_local *local = hw_to_local(hw);
1135 wiphy_warn(local->hw.wiphy, "skb_queue not empty\n");
1140 wiphy_unregister(local->hw.wiphy);
1155 void ieee80211_free_hw(struct ieee80211_hw *hw)
1157 struct ieee80211_local *local = hw_to_local(hw);
1163 kfree(local->hw.wiphy->cipher_suites);
1171 wiphy_free(local->hw.wiphy);