• Home
  • Raw
  • Download

Lines Matching refs:hw

99 	offchannel_flag = local->hw.conf.flags & IEEE80211_CONF_OFFCHANNEL;  in ieee80211_hw_conf_chan()
116 local->hw.conf.flags |= IEEE80211_CONF_OFFCHANNEL; in ieee80211_hw_conf_chan()
118 local->hw.conf.flags &= ~IEEE80211_CONF_OFFCHANNEL; in ieee80211_hw_conf_chan()
120 offchannel_flag ^= local->hw.conf.flags & IEEE80211_CONF_OFFCHANNEL; in ieee80211_hw_conf_chan()
123 !cfg80211_chandef_identical(&local->hw.conf.chandef, in ieee80211_hw_conf_chan()
125 local->hw.conf.chandef = chandef; in ieee80211_hw_conf_chan()
129 if (!conf_is_ht(&local->hw.conf)) { in ieee80211_hw_conf_chan()
135 local->hw.conf.smps_mode = IEEE80211_SMPS_STATIC; in ieee80211_hw_conf_chan()
136 } else if (local->hw.conf.smps_mode != local->smps_mode) { in ieee80211_hw_conf_chan()
137 local->hw.conf.smps_mode = local->smps_mode; in ieee80211_hw_conf_chan()
153 if (local->hw.conf.power_level != power) { in ieee80211_hw_conf_chan()
155 local->hw.conf.power_level = power; in ieee80211_hw_conf_chan()
228 ieee80211_rx(&local->hw, skb); in ieee80211_tasklet_handler()
232 ieee80211_tx_status(&local->hw, skb); in ieee80211_tasklet_handler()
292 void ieee80211_restart_hw(struct ieee80211_hw *hw) in ieee80211_restart_hw() argument
294 struct ieee80211_local *local = hw_to_local(hw); in ieee80211_restart_hw()
298 wiphy_info(hw->wiphy, in ieee80211_restart_hw()
302 ieee80211_stop_queues_by_reason(hw, IEEE80211_MAX_QUEUE_MAP, in ieee80211_restart_hw()
337 if (wdev->wiphy != local->hw.wiphy) in ieee80211_ifa_changed()
389 if (!wdev || wdev->wiphy != local->hw.wiphy) in ieee80211_ifa6_changed()
607 local->hw.wiphy = wiphy; in ieee80211_alloc_hw_nm()
609 local->hw.priv = (char *)local + ALIGN(sizeof(*local), NETDEV_ALIGN); in ieee80211_alloc_hw_nm()
624 local->hw.tx_sk_pacing_shift = 7; in ieee80211_alloc_hw_nm()
627 local->hw.queues = 1; in ieee80211_alloc_hw_nm()
628 local->hw.max_rates = 1; in ieee80211_alloc_hw_nm()
629 local->hw.max_report_rates = 0; in ieee80211_alloc_hw_nm()
630 local->hw.max_rx_aggregation_subframes = IEEE80211_MAX_AMPDU_BUF_HT; in ieee80211_alloc_hw_nm()
631 local->hw.max_tx_aggregation_subframes = IEEE80211_MAX_AMPDU_BUF_HT; in ieee80211_alloc_hw_nm()
632 local->hw.offchannel_tx_hw_queue = IEEE80211_INVAL_HW_QUEUE; in ieee80211_alloc_hw_nm()
633 local->hw.conf.long_frame_max_tx_count = wiphy->retry_long; in ieee80211_alloc_hw_nm()
634 local->hw.conf.short_frame_max_tx_count = wiphy->retry_short; in ieee80211_alloc_hw_nm()
635 local->hw.radiotap_mcs_details = IEEE80211_RADIOTAP_MCS_HAVE_MCS | in ieee80211_alloc_hw_nm()
638 local->hw.radiotap_vht_details = IEEE80211_RADIOTAP_VHT_KNOWN_GI | in ieee80211_alloc_hw_nm()
640 local->hw.uapsd_queues = IEEE80211_DEFAULT_UAPSD_QUEUES; in ieee80211_alloc_hw_nm()
641 local->hw.uapsd_max_sp_len = IEEE80211_DEFAULT_MAX_SP_LEN; in ieee80211_alloc_hw_nm()
642 local->hw.max_mtu = IEEE80211_MAX_DATA_LEN; in ieee80211_alloc_hw_nm()
723 local->hw.radiotap_timestamp.units_pos = -1; in ieee80211_alloc_hw_nm()
724 local->hw.radiotap_timestamp.accuracy = -1; in ieee80211_alloc_hw_nm()
726 return &local->hw; in ieee80211_alloc_hw_nm()
736 bool have_mfp = ieee80211_hw_check(&local->hw, MFP_CAPABLE); in ieee80211_init_cipher_suites()
756 if (ieee80211_hw_check(&local->hw, SW_CRYPTO_CONTROL) || in ieee80211_init_cipher_suites()
757 local->hw.wiphy->cipher_suites) { in ieee80211_init_cipher_suites()
765 if (!local->hw.wiphy->n_cipher_suites) in ieee80211_init_cipher_suites()
769 suites = kmemdup(local->hw.wiphy->cipher_suites, in ieee80211_init_cipher_suites()
770 sizeof(u32) * local->hw.wiphy->n_cipher_suites, in ieee80211_init_cipher_suites()
775 for (r = 0; r < local->hw.wiphy->n_cipher_suites; r++) { in ieee80211_init_cipher_suites()
776 u32 suite = local->hw.wiphy->cipher_suites[r]; in ieee80211_init_cipher_suites()
783 } else if (!local->hw.cipher_schemes) { in ieee80211_init_cipher_suites()
788 local->hw.wiphy->cipher_suites = cipher_suites; in ieee80211_init_cipher_suites()
789 local->hw.wiphy->n_cipher_suites = ARRAY_SIZE(cipher_suites); in ieee80211_init_cipher_suites()
792 local->hw.wiphy->n_cipher_suites -= 4; in ieee80211_init_cipher_suites()
795 local->hw.wiphy->cipher_suites += 2; in ieee80211_init_cipher_suites()
796 local->hw.wiphy->n_cipher_suites -= 2; in ieee80211_init_cipher_suites()
804 cs = local->hw.cipher_schemes; in ieee80211_init_cipher_suites()
812 n_suites = local->hw.n_cipher_schemes + 5; in ieee80211_init_cipher_suites()
846 for (r = 0; r < local->hw.n_cipher_schemes; r++) { in ieee80211_init_cipher_suites()
855 local->hw.wiphy->cipher_suites = suites; in ieee80211_init_cipher_suites()
856 local->hw.wiphy->n_cipher_suites = w; in ieee80211_init_cipher_suites()
862 int ieee80211_register_hw(struct ieee80211_hw *hw) in ieee80211_register_hw() argument
864 struct ieee80211_local *local = hw_to_local(hw); in ieee80211_register_hw()
872 if (ieee80211_hw_check(hw, QUEUE_CONTROL) && in ieee80211_register_hw()
873 (local->hw.offchannel_tx_hw_queue == IEEE80211_INVAL_HW_QUEUE || in ieee80211_register_hw()
874 local->hw.offchannel_tx_hw_queue >= local->hw.queues)) in ieee80211_register_hw()
877 if ((hw->wiphy->features & NL80211_FEATURE_TDLS_CHANNEL_SWITCH) && in ieee80211_register_hw()
883 if (WARN_ON(ieee80211_hw_check(hw, SUPPORTS_TX_FRAG) && in ieee80211_register_hw()
887 if (WARN_ON(local->hw.wiphy->interface_modes & in ieee80211_register_hw()
893 if (hw->wiphy->wowlan && (!local->ops->suspend || !local->ops->resume)) in ieee80211_register_hw()
898 for (i = 0; i < local->hw.wiphy->n_iface_combinations; i++) { in ieee80211_register_hw()
901 comb = &local->hw.wiphy->iface_combinations[i]; in ieee80211_register_hw()
912 if (local->hw.wiphy->interface_modes & BIT(NL80211_IFTYPE_WDS)) in ieee80211_register_hw()
916 for (i = 0; i < local->hw.wiphy->n_iface_combinations; i++) { in ieee80211_register_hw()
919 comb = &local->hw.wiphy->iface_combinations[i]; in ieee80211_register_hw()
931 if (WARN_ON(hw->netdev_features & ~feature_whitelist)) in ieee80211_register_hw()
934 if (hw->max_report_rates == 0) in ieee80211_register_hw()
935 hw->max_report_rates = hw->max_rates; in ieee80211_register_hw()
952 sband = local->hw.wiphy->bands[band]; in ieee80211_register_hw()
962 local->hw.conf.chandef = dflt_chandef; in ieee80211_register_hw()
995 if (local->hw.wiphy->interface_modes & BIT(NL80211_IFTYPE_AP) && in ieee80211_register_hw()
996 !ieee80211_hw_check(&local->hw, SW_CRYPTO_CONTROL)) { in ieee80211_register_hw()
997 hw->wiphy->interface_modes |= BIT(NL80211_IFTYPE_AP_VLAN); in ieee80211_register_hw()
998 hw->wiphy->software_iftypes |= BIT(NL80211_IFTYPE_AP_VLAN); in ieee80211_register_hw()
1002 hw->wiphy->interface_modes |= BIT(NL80211_IFTYPE_MONITOR); in ieee80211_register_hw()
1003 hw->wiphy->software_iftypes |= BIT(NL80211_IFTYPE_MONITOR); in ieee80211_register_hw()
1006 for (i = 0; i < hw->wiphy->n_iface_combinations; i++) { in ieee80211_register_hw()
1010 c = &hw->wiphy->iface_combinations[i]; in ieee80211_register_hw()
1024 if (!local->hw.wiphy->bands[band]) in ieee80211_register_hw()
1031 local->hw.wiphy->interface_modes &= ~BIT(NL80211_IFTYPE_MESH_POINT); in ieee80211_register_hw()
1036 if (local->hw.wiphy->interface_modes & BIT(NL80211_IFTYPE_MESH_POINT)) in ieee80211_register_hw()
1037 local->hw.wiphy->flags |= WIPHY_FLAG_MESH_AUTH; in ieee80211_register_hw()
1040 local->hw.wiphy->flags |= WIPHY_FLAG_CONTROL_PORT_PROTOCOL; in ieee80211_register_hw()
1042 if (ieee80211_hw_check(&local->hw, SIGNAL_DBM)) { in ieee80211_register_hw()
1043 local->hw.wiphy->signal_type = CFG80211_SIGNAL_TYPE_MBM; in ieee80211_register_hw()
1044 } else if (ieee80211_hw_check(&local->hw, SIGNAL_UNSPEC)) { in ieee80211_register_hw()
1045 local->hw.wiphy->signal_type = CFG80211_SIGNAL_TYPE_UNSPEC; in ieee80211_register_hw()
1046 if (hw->max_signal <= 0) { in ieee80211_register_hw()
1056 wiphy_ext_feature_set(local->hw.wiphy, in ieee80211_register_hw()
1058 wiphy_ext_feature_set(local->hw.wiphy, in ieee80211_register_hw()
1091 local->hw.wiphy->max_scan_ssids = 4; in ieee80211_register_hw()
1092 local->hw.wiphy->max_scan_ie_len = IEEE80211_MAX_DATA_LEN; in ieee80211_register_hw()
1102 if (local->hw.wiphy->max_scan_ie_len) in ieee80211_register_hw()
1103 local->hw.wiphy->max_scan_ie_len -= local->scan_ies_len; in ieee80211_register_hw()
1105 WARN_ON(!ieee80211_cs_list_valid(local->hw.cipher_schemes, in ieee80211_register_hw()
1106 local->hw.n_cipher_schemes)); in ieee80211_register_hw()
1113 local->hw.wiphy->max_remain_on_channel_duration = 5000; in ieee80211_register_hw()
1116 if (local->hw.wiphy->flags & WIPHY_FLAG_SUPPORTS_TDLS) in ieee80211_register_hw()
1117 local->hw.wiphy->flags |= WIPHY_FLAG_TDLS_EXTERNAL_SETUP; in ieee80211_register_hw()
1120 if (ieee80211_hw_check(&local->hw, CHANCTX_STA_CSA)) in ieee80211_register_hw()
1124 if (ieee80211_hw_check(&local->hw, SUPPORTS_MULTI_BSSID)) { in ieee80211_register_hw()
1125 local->hw.wiphy->support_mbssid = true; in ieee80211_register_hw()
1126 if (ieee80211_hw_check(&local->hw, in ieee80211_register_hw()
1128 local->hw.wiphy->support_only_he_mbssid = true; in ieee80211_register_hw()
1134 local->hw.wiphy->max_num_csa_counters = IEEE80211_MAX_CSA_COUNTERS_NUM; in ieee80211_register_hw()
1136 result = wiphy_register(local->hw.wiphy); in ieee80211_register_hw()
1144 if (hw->queues > IEEE80211_MAX_QUEUES) in ieee80211_register_hw()
1145 hw->queues = IEEE80211_MAX_QUEUES; in ieee80211_register_hw()
1148 alloc_ordered_workqueue("%s", 0, wiphy_name(local->hw.wiphy)); in ieee80211_register_hw()
1159 local->tx_headroom = max_t(unsigned int , local->hw.extra_tx_headroom, in ieee80211_register_hw()
1168 if (local->hw.max_listen_interval == 0) in ieee80211_register_hw()
1169 local->hw.max_listen_interval = 5; in ieee80211_register_hw()
1171 local->hw.conf.listen_interval = local->hw.max_listen_interval; in ieee80211_register_hw()
1175 if (!local->hw.max_nan_de_entries) in ieee80211_register_hw()
1176 local->hw.max_nan_de_entries = IEEE80211_MAX_NAN_INSTANCE_ID; in ieee80211_register_hw()
1178 if (!local->hw.weight_multiplier) in ieee80211_register_hw()
1179 local->hw.weight_multiplier = 1; in ieee80211_register_hw()
1183 wiphy_debug(local->hw.wiphy, "Failed to initialize wep: %d\n", in ieee80211_register_hw()
1186 local->hw.conf.flags = IEEE80211_CONF_IDLE; in ieee80211_register_hw()
1197 hw->rate_control_algorithm); in ieee80211_register_hw()
1199 wiphy_debug(local->hw.wiphy, in ieee80211_register_hw()
1205 clear_bit(IEEE80211_HW_SUPPORTS_VHT_EXT_NSS_BW, hw->flags); in ieee80211_register_hw()
1207 ieee80211_hw_set(hw, SUPPORTS_VHT_EXT_NSS_BW); in ieee80211_register_hw()
1223 local_cap = ieee80211_hw_check(hw, SUPPORTS_VHT_EXT_NSS_BW); in ieee80211_register_hw()
1225 sband = local->hw.wiphy->bands[band]; in ieee80211_register_hw()
1241 wiphy_dbg(hw->wiphy, "copying sband (band %d) due to VHT EXT NSS BW flag\n", in ieee80211_register_hw()
1247 local->hw.wiphy->bands[band] = sband; in ieee80211_register_hw()
1252 if (local->hw.wiphy->interface_modes & BIT(NL80211_IFTYPE_STATION) && in ieee80211_register_hw()
1253 !ieee80211_hw_check(hw, NO_AUTO_VIF)) { in ieee80211_register_hw()
1259 wiphy_warn(local->hw.wiphy, in ieee80211_register_hw()
1299 wiphy_unregister(local->hw.wiphy); in ieee80211_register_hw()
1302 kfree(local->hw.wiphy->cipher_suites); in ieee80211_register_hw()
1308 void ieee80211_unregister_hw(struct ieee80211_hw *hw) in ieee80211_unregister_hw() argument
1310 struct ieee80211_local *local = hw_to_local(hw); in ieee80211_unregister_hw()
1345 wiphy_warn(local->hw.wiphy, "skb_queue not empty\n"); in ieee80211_unregister_hw()
1351 wiphy_unregister(local->hw.wiphy); in ieee80211_unregister_hw()
1364 void ieee80211_free_hw(struct ieee80211_hw *hw) in ieee80211_free_hw() argument
1366 struct ieee80211_local *local = hw_to_local(hw); in ieee80211_free_hw()
1373 kfree(local->hw.wiphy->cipher_suites); in ieee80211_free_hw()
1386 kfree(local->hw.wiphy->bands[band]); in ieee80211_free_hw()
1389 wiphy_free(local->hw.wiphy); in ieee80211_free_hw()