mac80211.c (7b47c66cfa203288c43851260edeeb0fae56f692) mac80211.c (ecaf71de414345c68a05c403d33dd0cd89b2c85f)
1/******************************************************************************
2 *
3 * This file is provided under a dual BSD/GPLv2 license. When using or
4 * redistributing this file, you may do so under either license.
5 *
6 * GPL LICENSE SUMMARY
7 *
8 * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved.

--- 100 unchanged lines hidden (view full) ---

109 {
110 .num_different_channels = 2,
111 .max_interfaces = 3,
112 .limits = iwl_mvm_limits,
113 .n_limits = ARRAY_SIZE(iwl_mvm_limits),
114 },
115};
116
1/******************************************************************************
2 *
3 * This file is provided under a dual BSD/GPLv2 license. When using or
4 * redistributing this file, you may do so under either license.
5 *
6 * GPL LICENSE SUMMARY
7 *
8 * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved.

--- 100 unchanged lines hidden (view full) ---

109 {
110 .num_different_channels = 2,
111 .max_interfaces = 3,
112 .limits = iwl_mvm_limits,
113 .n_limits = ARRAY_SIZE(iwl_mvm_limits),
114 },
115};
116
117#ifdef CONFIG_PM_SLEEP
118static const struct nl80211_wowlan_tcp_data_token_feature
119iwl_mvm_wowlan_tcp_token_feature = {
120 .min_len = 0,
121 .max_len = 255,
122 .bufsize = IWL_WOWLAN_REMOTE_WAKE_MAX_TOKENS,
123};
124
125static const struct wiphy_wowlan_tcp_support iwl_mvm_wowlan_tcp_support = {
126 .tok = &iwl_mvm_wowlan_tcp_token_feature,
127 .data_payload_max = IWL_WOWLAN_TCP_MAX_PACKET_LEN -
128 sizeof(struct ethhdr) -
129 sizeof(struct iphdr) -
130 sizeof(struct tcphdr),
131 .data_interval_max = 65535, /* __le16 in API */
132 .wake_payload_max = IWL_WOWLAN_REMOTE_WAKE_MAX_PACKET_LEN -
133 sizeof(struct ethhdr) -
134 sizeof(struct iphdr) -
135 sizeof(struct tcphdr),
136 .seq = true,
137};
138#endif
139
140#ifdef CONFIG_IWLWIFI_BCAST_FILTERING
141/*
142 * Use the reserved field to indicate magic values.
143 * these values will only be used internally by the driver,
144 * and won't make it to the fw (reserved will be 0).
145 * BC_FILTER_MAGIC_IP - configure the val of this attribute to
146 * be the vif's ip address. in case there is not a single
147 * ip address (0, or more than 1), this attribute will

--- 290 unchanged lines hidden (view full) ---

438 ieee80211_hw_set(hw, AMPDU_AGGREGATION);
439 ieee80211_hw_set(hw, TIMING_BEACON_ONLY);
440 ieee80211_hw_set(hw, CONNECTION_MONITOR);
441 ieee80211_hw_set(hw, CHANCTX_STA_CSA);
442 ieee80211_hw_set(hw, SUPPORT_FAST_XMIT);
443 ieee80211_hw_set(hw, SUPPORTS_CLONED_SKBS);
444 ieee80211_hw_set(hw, SUPPORTS_AMSDU_IN_AMPDU);
445 ieee80211_hw_set(hw, NEEDS_UNIQUE_STA_ADDR);
117#ifdef CONFIG_IWLWIFI_BCAST_FILTERING
118/*
119 * Use the reserved field to indicate magic values.
120 * these values will only be used internally by the driver,
121 * and won't make it to the fw (reserved will be 0).
122 * BC_FILTER_MAGIC_IP - configure the val of this attribute to
123 * be the vif's ip address. in case there is not a single
124 * ip address (0, or more than 1), this attribute will

--- 290 unchanged lines hidden (view full) ---

415 ieee80211_hw_set(hw, AMPDU_AGGREGATION);
416 ieee80211_hw_set(hw, TIMING_BEACON_ONLY);
417 ieee80211_hw_set(hw, CONNECTION_MONITOR);
418 ieee80211_hw_set(hw, CHANCTX_STA_CSA);
419 ieee80211_hw_set(hw, SUPPORT_FAST_XMIT);
420 ieee80211_hw_set(hw, SUPPORTS_CLONED_SKBS);
421 ieee80211_hw_set(hw, SUPPORTS_AMSDU_IN_AMPDU);
422 ieee80211_hw_set(hw, NEEDS_UNIQUE_STA_ADDR);
423
424 if (fw_has_capa(&mvm->fw->ucode_capa, IWL_UCODE_TLV_CAPA_TLC_OFFLOAD)) {
425 ieee80211_hw_set(hw, TX_AMPDU_SETUP_IN_HW);
426 ieee80211_hw_set(hw, HAS_RATE_CONTROL);
427 }
428
446 if (iwl_mvm_has_new_rx_api(mvm))
447 ieee80211_hw_set(hw, SUPPORTS_REORDERING_BUFFER);
448
449 if (fw_has_capa(&mvm->fw->ucode_capa,
450 IWL_UCODE_TLV_CAPA_STA_PM_NOTIF)) {
451 ieee80211_hw_set(hw, AP_LINK_PS);
452 } else if (WARN_ON(iwl_mvm_has_new_tx_api(mvm))) {
453 /*

--- 243 unchanged lines hidden (view full) ---

697 mvm->wowlan.flags |= WIPHY_WOWLAN_SUPPORTS_GTK_REKEY |
698 WIPHY_WOWLAN_GTK_REKEY_FAILURE |
699 WIPHY_WOWLAN_4WAY_HANDSHAKE;
700
701 mvm->wowlan.n_patterns = IWL_WOWLAN_MAX_PATTERNS;
702 mvm->wowlan.pattern_min_len = IWL_WOWLAN_MIN_PATTERN_LEN;
703 mvm->wowlan.pattern_max_len = IWL_WOWLAN_MAX_PATTERN_LEN;
704 mvm->wowlan.max_nd_match_sets = IWL_SCAN_MAX_PROFILES;
429 if (iwl_mvm_has_new_rx_api(mvm))
430 ieee80211_hw_set(hw, SUPPORTS_REORDERING_BUFFER);
431
432 if (fw_has_capa(&mvm->fw->ucode_capa,
433 IWL_UCODE_TLV_CAPA_STA_PM_NOTIF)) {
434 ieee80211_hw_set(hw, AP_LINK_PS);
435 } else if (WARN_ON(iwl_mvm_has_new_tx_api(mvm))) {
436 /*

--- 243 unchanged lines hidden (view full) ---

680 mvm->wowlan.flags |= WIPHY_WOWLAN_SUPPORTS_GTK_REKEY |
681 WIPHY_WOWLAN_GTK_REKEY_FAILURE |
682 WIPHY_WOWLAN_4WAY_HANDSHAKE;
683
684 mvm->wowlan.n_patterns = IWL_WOWLAN_MAX_PATTERNS;
685 mvm->wowlan.pattern_min_len = IWL_WOWLAN_MIN_PATTERN_LEN;
686 mvm->wowlan.pattern_max_len = IWL_WOWLAN_MAX_PATTERN_LEN;
687 mvm->wowlan.max_nd_match_sets = IWL_SCAN_MAX_PROFILES;
705 mvm->wowlan.tcp = &iwl_mvm_wowlan_tcp_support;
706 hw->wiphy->wowlan = &mvm->wowlan;
707 }
708#endif
709
710#ifdef CONFIG_IWLWIFI_BCAST_FILTERING
711 /* assign default bcast filtering configuration */
712 mvm->bcast_filters = iwl_mvm_default_bcast_filters;
713#endif

--- 2497 unchanged lines hidden (view full) ---

3211 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
3212 struct cfg80211_chan_def chandef;
3213 struct iwl_mvm_phy_ctxt *phy_ctxt;
3214 int ret, i;
3215
3216 IWL_DEBUG_MAC80211(mvm, "enter (%d, %d, %d)\n", channel->hw_value,
3217 duration, type);
3218
688 hw->wiphy->wowlan = &mvm->wowlan;
689 }
690#endif
691
692#ifdef CONFIG_IWLWIFI_BCAST_FILTERING
693 /* assign default bcast filtering configuration */
694 mvm->bcast_filters = iwl_mvm_default_bcast_filters;
695#endif

--- 2497 unchanged lines hidden (view full) ---

3193 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
3194 struct cfg80211_chan_def chandef;
3195 struct iwl_mvm_phy_ctxt *phy_ctxt;
3196 int ret, i;
3197
3198 IWL_DEBUG_MAC80211(mvm, "enter (%d, %d, %d)\n", channel->hw_value,
3199 duration, type);
3200
3201 /*
3202 * Flush the done work, just in case it's still pending, so that
3203 * the work it does can complete and we can accept new frames.
3204 */
3219 flush_work(&mvm->roc_done_wk);
3220
3221 mutex_lock(&mvm->mutex);
3222
3223 switch (vif->type) {
3224 case NL80211_IFTYPE_STATION:
3225 if (fw_has_capa(&mvm->fw->ucode_capa,
3226 IWL_UCODE_TLV_CAPA_HOTSPOT_SUPPORT)) {

--- 1069 unchanged lines hidden (view full) ---

4296
4297 notif->cookie = mvm->queue_sync_cookie;
4298
4299 if (notif->sync)
4300 atomic_set(&mvm->queue_sync_counter,
4301 mvm->trans->num_rx_queues);
4302
4303 /* TODO - remove this when we have RXQ config API */
3205 flush_work(&mvm->roc_done_wk);
3206
3207 mutex_lock(&mvm->mutex);
3208
3209 switch (vif->type) {
3210 case NL80211_IFTYPE_STATION:
3211 if (fw_has_capa(&mvm->fw->ucode_capa,
3212 IWL_UCODE_TLV_CAPA_HOTSPOT_SUPPORT)) {

--- 1069 unchanged lines hidden (view full) ---

4282
4283 notif->cookie = mvm->queue_sync_cookie;
4284
4285 if (notif->sync)
4286 atomic_set(&mvm->queue_sync_counter,
4287 mvm->trans->num_rx_queues);
4288
4289 /* TODO - remove this when we have RXQ config API */
4304 if (mvm->trans->cfg->device_family == IWL_DEVICE_FAMILY_A000) {
4290 if (mvm->trans->cfg->device_family == IWL_DEVICE_FAMILY_22000) {
4305 qmask = BIT(0);
4306 if (notif->sync)
4307 atomic_set(&mvm->queue_sync_counter, 1);
4308 }
4309
4310 ret = iwl_mvm_notify_rx_queue(mvm, qmask, (u8 *)notif, size);
4311 if (ret) {
4312 IWL_ERR(mvm, "Failed to trigger RX queues sync (%d)\n", ret);

--- 105 unchanged lines hidden ---
4291 qmask = BIT(0);
4292 if (notif->sync)
4293 atomic_set(&mvm->queue_sync_counter, 1);
4294 }
4295
4296 ret = iwl_mvm_notify_rx_queue(mvm, qmask, (u8 *)notif, size);
4297 if (ret) {
4298 IWL_ERR(mvm, "Failed to trigger RX queues sync (%d)\n", ret);

--- 105 unchanged lines hidden ---