Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2b755bbd authored by John W. Linville's avatar John W. Linville
Browse files
parents 608cfbe4 cf38e4f7
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -406,9 +406,8 @@ static bool iwl_resume_status_fn(struct iwl_notif_wait_data *notif_wait,
{
	struct iwl_resume_data *resume_data = data;
	struct iwl_priv *priv = resume_data->priv;
	u32 len = le32_to_cpu(pkt->len_n_flags) & FH_RSCSR_FRAME_SIZE_MSK;

	if (len - 4 != sizeof(*resume_data->cmd)) {
	if (iwl_rx_packet_payload_len(pkt) != sizeof(*resume_data->cmd)) {
		IWL_ERR(priv, "rx wrong size data\n");
		return true;
	}
+2 −5
Original line number Diff line number Diff line
@@ -205,8 +205,7 @@ static int iwlagn_rx_pm_debug_statistics_notif(struct iwl_priv *priv,
					     struct iwl_device_cmd *cmd)
{
	struct iwl_rx_packet *pkt = rxb_addr(rxb);
	u32 __maybe_unused len =
		le32_to_cpu(pkt->len_n_flags) & FH_RSCSR_FRAME_SIZE_MSK;
	u32 __maybe_unused len = iwl_rx_packet_len(pkt);
	IWL_DEBUG_RADIO(priv, "Dumping %d bytes of unhandled "
			"notification for PM_DEBUG_STATISTIC_NOTIFIC:\n", len);
	iwl_print_hex_dump(priv, IWL_DL_RADIO, pkt->data, len);
@@ -457,7 +456,7 @@ static int iwlagn_rx_statistics(struct iwl_priv *priv,
	const int reg_recalib_period = 60;
	int change;
	struct iwl_rx_packet *pkt = rxb_addr(rxb);
	u32 len = le32_to_cpu(pkt->len_n_flags) & FH_RSCSR_FRAME_SIZE_MSK;
	u32 len = iwl_rx_packet_payload_len(pkt);
	__le32 *flag;
	struct statistics_general_common *common;
	struct statistics_rx_non_phy *rx_non_phy;
@@ -467,8 +466,6 @@ static int iwlagn_rx_statistics(struct iwl_priv *priv,
	struct statistics_tx *tx;
	struct statistics_bt_activity *bt_activity;

	len -= sizeof(struct iwl_cmd_header); /* skip header */

	IWL_DEBUG_RX(priv, "Statistics notification received (%d bytes).\n",
		     len);

+1 −6
Original line number Diff line number Diff line
@@ -388,7 +388,6 @@ static bool iwlagn_wait_calib(struct iwl_notif_wait_data *notif_wait,
{
	struct iwl_priv *priv = data;
	struct iwl_calib_hdr *hdr;
	int len;

	if (pkt->hdr.cmd != CALIBRATION_RES_NOTIFICATION) {
		WARN_ON(pkt->hdr.cmd != CALIBRATION_COMPLETE_NOTIFICATION);
@@ -396,12 +395,8 @@ static bool iwlagn_wait_calib(struct iwl_notif_wait_data *notif_wait,
	}

	hdr = (struct iwl_calib_hdr *)pkt->data;
	len = le32_to_cpu(pkt->len_n_flags) & FH_RSCSR_FRAME_SIZE_MSK;

	/* reduce the size by the length field itself */
	len -= sizeof(__le32);

	if (iwl_calib_set(priv, hdr, len))
	if (iwl_calib_set(priv, hdr, iwl_rx_packet_payload_len(pkt)))
		IWL_ERR(priv, "Failed to record calibration data %d\n",
			hdr->op_code);

+1 −8
Original line number Diff line number Diff line
@@ -264,14 +264,13 @@ static void iwl_init_vht_hw_capab(const struct iwl_cfg *cfg,
				  struct ieee80211_sta_vht_cap *vht_cap)
{
	int num_ants = num_of_ant(data->valid_rx_ant);
	int bf_sts_cap = num_ants - 1;

	vht_cap->vht_supported = true;

	vht_cap->cap = IEEE80211_VHT_CAP_SHORT_GI_80 |
		       IEEE80211_VHT_CAP_RXSTBC_1 |
		       IEEE80211_VHT_CAP_SU_BEAMFORMEE_CAPABLE |
		       bf_sts_cap << IEEE80211_VHT_CAP_BEAMFORMEE_STS_SHIFT |
		       3 << IEEE80211_VHT_CAP_BEAMFORMEE_STS_SHIFT |
		       7 << IEEE80211_VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_SHIFT;

	if (num_ants > 1)
@@ -290,9 +289,6 @@ static void iwl_init_vht_hw_capab(const struct iwl_cfg *cfg,
			    IEEE80211_VHT_MCS_NOT_SUPPORTED << 12 |
			    IEEE80211_VHT_MCS_NOT_SUPPORTED << 14);

	/* Max rate for Long GI NSS=2 80Mhz is 780Mbps */
	vht_cap->vht_mcs.rx_highest = cpu_to_le16(780);

	if (num_ants == 1 ||
	    cfg->rx_with_siso_diversity) {
		vht_cap->cap |= IEEE80211_VHT_CAP_RX_ANTENNA_PATTERN |
@@ -300,12 +296,9 @@ static void iwl_init_vht_hw_capab(const struct iwl_cfg *cfg,
		/* this works because NOT_SUPPORTED == 3 */
		vht_cap->vht_mcs.rx_mcs_map |=
			cpu_to_le16(IEEE80211_VHT_MCS_NOT_SUPPORTED << 2);
		/* Max rate for Long GI NSS=1 80Mhz is 390Mbps */
		vht_cap->vht_mcs.rx_highest = cpu_to_le16(390);
	}

	vht_cap->vht_mcs.tx_mcs_map = vht_cap->vht_mcs.rx_mcs_map;
	vht_cap->vht_mcs.tx_highest = vht_cap->vht_mcs.rx_highest;
}

static void iwl_init_sbands(struct device *dev, const struct iwl_cfg *cfg,
+4 −0
Original line number Diff line number Diff line
@@ -277,4 +277,8 @@ static inline unsigned int SCD_QUEUE_STATUS_BITS(unsigned int chnl)

/*********************** END TX SCHEDULER *************************************/

/* Oscillator clock */
#define OSC_CLK				(0xa04068)
#define OSC_CLK_FORCE_CONTROL		(0x8)

#endif				/* __iwl_prph_h__ */
Loading