Commit 718803d1 authored by John W. Linville's avatar John W. Linville
Browse files
parents 0ba568d7 a53ee0a3
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -97,6 +97,8 @@

#define APMG_PCIDEV_STT_VAL_L1_ACT_DIS		(0x00000800)

#define APMG_RTC_INT_STT_RFKILL		(0x10000000)

/* Device system time */
#define DEVICE_SYSTEM_TIME_REG 0xA0206C

+10 −5
Original line number Diff line number Diff line
@@ -134,7 +134,7 @@ struct wowlan_key_data {
	struct iwl_wowlan_rsc_tsc_params_cmd *rsc_tsc;
	struct iwl_wowlan_tkip_params_cmd *tkip;
	bool error, use_rsc_tsc, use_tkip;
	int gtk_key_idx;
	int wep_key_idx;
};

static void iwl_mvm_wowlan_program_keys(struct ieee80211_hw *hw,
@@ -188,8 +188,8 @@ static void iwl_mvm_wowlan_program_keys(struct ieee80211_hw *hw,
			wkc.wep_key.key_offset = 0;
		} else {
			/* others start at 1 */
			data->gtk_key_idx++;
			wkc.wep_key.key_offset = data->gtk_key_idx;
			data->wep_key_idx++;
			wkc.wep_key.key_offset = data->wep_key_idx;
		}

		ret = iwl_mvm_send_cmd_pdu(mvm, WEP_KEY, CMD_SYNC,
@@ -316,8 +316,13 @@ static void iwl_mvm_wowlan_program_keys(struct ieee80211_hw *hw,
		mvm->ptk_ivlen = key->iv_len;
		mvm->ptk_icvlen = key->icv_len;
	} else {
		data->gtk_key_idx++;
		key->hw_key_idx = data->gtk_key_idx;
		/*
		 * firmware only supports TSC/RSC for a single key,
		 * so if there are multiple keep overwriting them
		 * with new ones -- this relies on mac80211 doing
		 * list_add_tail().
		 */
		key->hw_key_idx = 1;
		mvm->gtk_ivlen = key->iv_len;
		mvm->gtk_icvlen = key->icv_len;
	}
+0 −1
Original line number Diff line number Diff line
@@ -69,7 +69,6 @@
/* Scan Commands, Responses, Notifications */

/* Masks for iwl_scan_channel.type flags */
#define SCAN_CHANNEL_TYPE_PASSIVE	0
#define SCAN_CHANNEL_TYPE_ACTIVE	BIT(0)
#define SCAN_CHANNEL_NARROW_BAND	BIT(22)

+21 −21
Original line number Diff line number Diff line
@@ -511,6 +511,27 @@ static int iwl_mvm_mac_add_interface(struct ieee80211_hw *hw,
	if (ret)
		goto out_unlock;

	/*
	 * TODO: remove this temporary code.
	 * Currently MVM FW supports power management only on single MAC.
	 * If new interface added, disable PM on existing interface.
	 * P2P device is a special case, since it is handled by FW similary to
	 * scan. If P2P deviced is added, PM remains enabled on existing
	 * interface.
	 * Note: the method below does not count the new interface being added
	 * at this moment.
	 */
	if (vif->type != NL80211_IFTYPE_P2P_DEVICE)
		mvm->vif_count++;
	if (mvm->vif_count > 1) {
		IWL_DEBUG_MAC80211(mvm,
				   "Disable power on existing interfaces\n");
		ieee80211_iterate_active_interfaces_atomic(
					    mvm->hw,
					    IEEE80211_IFACE_ITER_NORMAL,
					    iwl_mvm_pm_disable_iterator, mvm);
	}

	/*
	 * The AP binding flow can be done only after the beacon
	 * template is configured (which happens only in the mac80211
@@ -534,27 +555,6 @@ static int iwl_mvm_mac_add_interface(struct ieee80211_hw *hw,
		goto out_unlock;
	}

	/*
	 * TODO: remove this temporary code.
	 * Currently MVM FW supports power management only on single MAC.
	 * If new interface added, disable PM on existing interface.
	 * P2P device is a special case, since it is handled by FW similary to
	 * scan. If P2P deviced is added, PM remains enabled on existing
	 * interface.
	 * Note: the method below does not count the new interface being added
	 * at this moment.
	 */
	if (vif->type != NL80211_IFTYPE_P2P_DEVICE)
		mvm->vif_count++;
	if (mvm->vif_count > 1) {
		IWL_DEBUG_MAC80211(mvm,
				   "Disable power on existing interfaces\n");
		ieee80211_iterate_active_interfaces_atomic(
					    mvm->hw,
					    IEEE80211_IFACE_ITER_NORMAL,
					    iwl_mvm_pm_disable_iterator, mvm);
	}

	ret = iwl_mvm_mac_ctxt_add(mvm, vif);
	if (ret)
		goto out_release;
+2 −9
Original line number Diff line number Diff line
@@ -178,19 +178,12 @@ static void iwl_mvm_scan_fill_channels(struct iwl_scan_cmd *cmd,
	struct iwl_scan_channel *chan = (struct iwl_scan_channel *)
		(cmd->data + le16_to_cpu(cmd->tx_cmd.len));
	int i;
	__le32 chan_type_value;

	if (req->n_ssids > 0)
		chan_type_value = cpu_to_le32(BIT(req->n_ssids) - 1);
	else
		chan_type_value = SCAN_CHANNEL_TYPE_PASSIVE;

	for (i = 0; i < cmd->channel_count; i++) {
		chan->channel = cpu_to_le16(req->channels[i]->hw_value);
		chan->type = cpu_to_le32(BIT(req->n_ssids) - 1);
		if (req->channels[i]->flags & IEEE80211_CHAN_PASSIVE_SCAN)
			chan->type = SCAN_CHANNEL_TYPE_PASSIVE;
		else
			chan->type = chan_type_value;
			chan->type &= cpu_to_le32(~SCAN_CHANNEL_TYPE_ACTIVE);
		chan->active_dwell = cpu_to_le16(active_dwell);
		chan->passive_dwell = cpu_to_le16(passive_dwell);
		chan->iteration_count = cpu_to_le16(1);
Loading