mac80211.c (a0306db6e5758b0488c79e739de3c0ffe47ea62f) mac80211.c (8f691af967293319668058efdc10f560b65bd651)
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.

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

656 wiphy_ext_feature_set(hw->wiphy,
657 NL80211_EXT_FEATURE_SCAN_START_TIME);
658 wiphy_ext_feature_set(hw->wiphy,
659 NL80211_EXT_FEATURE_BSS_PARENT_TSF);
660 wiphy_ext_feature_set(hw->wiphy,
661 NL80211_EXT_FEATURE_SET_SCAN_DWELL);
662 }
663
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.

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

656 wiphy_ext_feature_set(hw->wiphy,
657 NL80211_EXT_FEATURE_SCAN_START_TIME);
658 wiphy_ext_feature_set(hw->wiphy,
659 NL80211_EXT_FEATURE_BSS_PARENT_TSF);
660 wiphy_ext_feature_set(hw->wiphy,
661 NL80211_EXT_FEATURE_SET_SCAN_DWELL);
662 }
663
664 if (iwl_mvm_is_oce_supported(mvm)) {
665 wiphy_ext_feature_set(hw->wiphy,
666 NL80211_EXT_FEATURE_ACCEPT_BCAST_PROBE_RESP);
667 wiphy_ext_feature_set(hw->wiphy,
668 NL80211_EXT_FEATURE_FILS_MAX_CHANNEL_TIME);
669 wiphy_ext_feature_set(hw->wiphy,
670 NL80211_EXT_FEATURE_OCE_PROBE_REQ_DEFERRAL_SUPPRESSION);
671 wiphy_ext_feature_set(hw->wiphy,
672 NL80211_EXT_FEATURE_OCE_PROBE_REQ_HIGH_TX_RATE);
673 }
674
664 mvm->rts_threshold = IEEE80211_MAX_RTS_THRESHOLD;
665
666#ifdef CONFIG_PM_SLEEP
667 if (iwl_mvm_is_d0i3_supported(mvm) &&
668 device_can_wakeup(mvm->trans->dev)) {
669 mvm->wowlan.flags = WIPHY_WOWLAN_ANY;
670 hw->wiphy->wowlan = &mvm->wowlan;
671 }

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

2127 iwl_mvm_rm_mcast_sta(mvm, vif);
2128 goto out_unbind;
2129 }
2130 } else {
2131 /*
2132 * Send the bcast station. At this stage the TBTT and DTIM time
2133 * events are added and applied to the scheduler
2134 */
675 mvm->rts_threshold = IEEE80211_MAX_RTS_THRESHOLD;
676
677#ifdef CONFIG_PM_SLEEP
678 if (iwl_mvm_is_d0i3_supported(mvm) &&
679 device_can_wakeup(mvm->trans->dev)) {
680 mvm->wowlan.flags = WIPHY_WOWLAN_ANY;
681 hw->wiphy->wowlan = &mvm->wowlan;
682 }

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

2138 iwl_mvm_rm_mcast_sta(mvm, vif);
2139 goto out_unbind;
2140 }
2141 } else {
2142 /*
2143 * Send the bcast station. At this stage the TBTT and DTIM time
2144 * events are added and applied to the scheduler
2145 */
2135 iwl_mvm_send_add_bcast_sta(mvm, vif);
2146 ret = iwl_mvm_send_add_bcast_sta(mvm, vif);
2136 if (ret)
2137 goto out_unbind;
2147 if (ret)
2148 goto out_unbind;
2138 iwl_mvm_add_mcast_sta(mvm, vif);
2149 ret = iwl_mvm_add_mcast_sta(mvm, vif);
2139 if (ret) {
2140 iwl_mvm_send_rm_bcast_sta(mvm, vif);
2141 goto out_unbind;
2142 }
2143 }
2144
2145 /* must be set before quota calculations */
2146 mvmvif->ap_ibss_active = true;

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

3489 case NL80211_IFTYPE_ADHOC:
3490 /*
3491 * The AP binding flow is handled as part of the start_ap flow
3492 * (in bss_info_changed), similarly for IBSS.
3493 */
3494 ret = 0;
3495 goto out;
3496 case NL80211_IFTYPE_STATION:
2150 if (ret) {
2151 iwl_mvm_send_rm_bcast_sta(mvm, vif);
2152 goto out_unbind;
2153 }
2154 }
2155
2156 /* must be set before quota calculations */
2157 mvmvif->ap_ibss_active = true;

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

3500 case NL80211_IFTYPE_ADHOC:
3501 /*
3502 * The AP binding flow is handled as part of the start_ap flow
3503 * (in bss_info_changed), similarly for IBSS.
3504 */
3505 ret = 0;
3506 goto out;
3507 case NL80211_IFTYPE_STATION:
3508 mvmvif->csa_bcn_pending = false;
3497 break;
3498 case NL80211_IFTYPE_MONITOR:
3499 /* always disable PS when a monitor interface is active */
3500 mvmvif->ps_disabled = true;
3501 break;
3502 default:
3503 ret = -EINVAL;
3504 goto out;

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

3532
3533 /* Handle binding during CSA */
3534 if (vif->type == NL80211_IFTYPE_AP) {
3535 iwl_mvm_update_quotas(mvm, false, NULL);
3536 iwl_mvm_mac_ctxt_changed(mvm, vif, false, NULL);
3537 }
3538
3539 if (switching_chanctx && vif->type == NL80211_IFTYPE_STATION) {
3509 break;
3510 case NL80211_IFTYPE_MONITOR:
3511 /* always disable PS when a monitor interface is active */
3512 mvmvif->ps_disabled = true;
3513 break;
3514 default:
3515 ret = -EINVAL;
3516 goto out;

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

3544
3545 /* Handle binding during CSA */
3546 if (vif->type == NL80211_IFTYPE_AP) {
3547 iwl_mvm_update_quotas(mvm, false, NULL);
3548 iwl_mvm_mac_ctxt_changed(mvm, vif, false, NULL);
3549 }
3550
3551 if (switching_chanctx && vif->type == NL80211_IFTYPE_STATION) {
3540 u32 duration = 2 * vif->bss_conf.beacon_int;
3552 u32 duration = 3 * vif->bss_conf.beacon_int;
3541
3542 /* iwl_mvm_protect_session() reads directly from the
3543 * device (the system time), so make sure it is
3544 * available.
3545 */
3546 ret = iwl_mvm_ref_sync(mvm, IWL_MVM_REF_PROTECT_CSA);
3547 if (ret)
3548 goto out_remove_binding;
3549
3550 /* Protect the session to make sure we hear the first
3551 * beacon on the new channel.
3552 */
3553
3554 /* iwl_mvm_protect_session() reads directly from the
3555 * device (the system time), so make sure it is
3556 * available.
3557 */
3558 ret = iwl_mvm_ref_sync(mvm, IWL_MVM_REF_PROTECT_CSA);
3559 if (ret)
3560 goto out_remove_binding;
3561
3562 /* Protect the session to make sure we hear the first
3563 * beacon on the new channel.
3564 */
3565 mvmvif->csa_bcn_pending = true;
3553 iwl_mvm_protect_session(mvm, vif, duration, duration,
3554 vif->bss_conf.beacon_int / 2,
3555 true);
3556
3557 iwl_mvm_unref(mvm, IWL_MVM_REF_PROTECT_CSA);
3558
3559 iwl_mvm_update_quotas(mvm, false, NULL);
3560 }

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

3983 mvmvif->csa_failed = false;
3984 ret = -EIO;
3985 goto out_unlock;
3986 }
3987
3988 if (vif->type == NL80211_IFTYPE_STATION) {
3989 struct iwl_mvm_sta *mvmsta;
3990
3566 iwl_mvm_protect_session(mvm, vif, duration, duration,
3567 vif->bss_conf.beacon_int / 2,
3568 true);
3569
3570 iwl_mvm_unref(mvm, IWL_MVM_REF_PROTECT_CSA);
3571
3572 iwl_mvm_update_quotas(mvm, false, NULL);
3573 }

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

3996 mvmvif->csa_failed = false;
3997 ret = -EIO;
3998 goto out_unlock;
3999 }
4000
4001 if (vif->type == NL80211_IFTYPE_STATION) {
4002 struct iwl_mvm_sta *mvmsta;
4003
4004 mvmvif->csa_bcn_pending = false;
3991 mvmsta = iwl_mvm_sta_from_staid_protected(mvm,
3992 mvmvif->ap_sta_id);
3993
3994 if (WARN_ON(!mvmsta)) {
3995 ret = -EIO;
3996 goto out_unlock;
3997 }
3998

--- 439 unchanged lines hidden ---
4005 mvmsta = iwl_mvm_sta_from_staid_protected(mvm,
4006 mvmvif->ap_sta_id);
4007
4008 if (WARN_ON(!mvmsta)) {
4009 ret = -EIO;
4010 goto out_unlock;
4011 }
4012

--- 439 unchanged lines hidden ---