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

Commit 18911434 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman
Browse files

Merge 52008a5e ("wifi: mt76: mt76x02: fix MT76x0 external LNA gain...


Merge 52008a5e ("wifi: mt76: mt76x02: fix MT76x0 external LNA gain handling") into android11-5.4-lts

Steps on the way to 5.4.258

Change-Id: Id8b5da55e16af1c43be77a5e94c9f09bef7b391e
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
parents 993e3b2d 52008a5e
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -865,6 +865,13 @@ int ubi_attach_mtd_dev(struct mtd_info *mtd, int ubi_num,
		return -EINVAL;
	}

	/* UBI cannot work on flashes with zero erasesize. */
	if (!mtd->erasesize) {
		pr_err("ubi: refuse attaching mtd%d - zero erasesize flash is not supported\n",
			mtd->index);
		return -EINVAL;
	}

	if (ubi_num == UBI_DEV_NUM_AUTO) {
		/* Search for an empty slot in the @ubi_devices array */
		for (ubi_num = 0; ubi_num < UBI_MAX_DEVICES; ubi_num++)
+10 −2
Original line number Diff line number Diff line
@@ -34,6 +34,8 @@
#define TDM_PPPOHT_SLIC_MAXIN
#define RX_BD_ERRORS (R_CD_S | R_OV_S | R_CR_S | R_AB_S | R_NO_S | R_LG_S)

static int uhdlc_close(struct net_device *dev);

static struct ucc_tdm_info utdm_primary_info = {
	.uf_info = {
		.tsa = 0,
@@ -710,6 +712,7 @@ static int uhdlc_open(struct net_device *dev)
	hdlc_device *hdlc = dev_to_hdlc(dev);
	struct ucc_hdlc_private *priv = hdlc->priv;
	struct ucc_tdm *utdm = priv->utdm;
	int rc = 0;

	if (priv->hdlc_busy != 1) {
		if (request_irq(priv->ut_info->uf_info.irq,
@@ -733,10 +736,13 @@ static int uhdlc_open(struct net_device *dev)
		napi_enable(&priv->napi);
		netdev_reset_queue(dev);
		netif_start_queue(dev);
		hdlc_open(dev);

		rc = hdlc_open(dev);
		if (rc)
			uhdlc_close(dev);
	}

	return 0;
	return rc;
}

static void uhdlc_memclean(struct ucc_hdlc_private *priv)
@@ -826,6 +832,8 @@ static int uhdlc_close(struct net_device *dev)
	netdev_reset_queue(dev);
	priv->hdlc_busy = 0;

	hdlc_close(dev);

	return 0;
}

+3 −3
Original line number Diff line number Diff line
@@ -332,9 +332,9 @@ struct iwl_fw_ini_fifo_hdr {
struct iwl_fw_ini_error_dump_range {
	__le32 range_data_size;
	union {
		__le32 internal_base_addr;
		__le64 dram_base_addr;
		__le32 page_num;
		__le32 internal_base_addr __packed;
		__le64 dram_base_addr __packed;
		__le32 page_num __packed;
		struct iwl_fw_ini_fifo_hdr fifo_hdr;
	};
	__le32 data[];
+9 −7
Original line number Diff line number Diff line
@@ -98,7 +98,8 @@ int mwifiex_process_rx_packet(struct mwifiex_private *priv,
	rx_pkt_len = le16_to_cpu(local_rx_pd->rx_pkt_length);
	rx_pkt_hdr = (void *)local_rx_pd + rx_pkt_off;

	if (sizeof(*rx_pkt_hdr) + rx_pkt_off > skb->len) {
	if (sizeof(rx_pkt_hdr->eth803_hdr) + sizeof(rfc1042_header) +
	    rx_pkt_off > skb->len) {
		mwifiex_dbg(priv->adapter, ERROR,
			    "wrong rx packet offset: len=%d, rx_pkt_off=%d\n",
			    skb->len, rx_pkt_off);
@@ -107,12 +108,13 @@ int mwifiex_process_rx_packet(struct mwifiex_private *priv,
		return -1;
	}

	if ((!memcmp(&rx_pkt_hdr->rfc1042_hdr, bridge_tunnel_header,
	if (sizeof(*rx_pkt_hdr) + rx_pkt_off <= skb->len &&
	    ((!memcmp(&rx_pkt_hdr->rfc1042_hdr, bridge_tunnel_header,
		      sizeof(bridge_tunnel_header))) ||
	     (!memcmp(&rx_pkt_hdr->rfc1042_hdr, rfc1042_header,
		      sizeof(rfc1042_header)) &&
	      ntohs(rx_pkt_hdr->rfc1042_hdr.snap_type) != ETH_P_AARP &&
	     ntohs(rx_pkt_hdr->rfc1042_hdr.snap_type) != ETH_P_IPX)) {
	      ntohs(rx_pkt_hdr->rfc1042_hdr.snap_type) != ETH_P_IPX))) {
		/*
		 *  Replace the 803 header and rfc1042 header (llc/snap) with an
		 *    EthernetII header, keep the src/dst and snap_type
+0 −7
Original line number Diff line number Diff line
@@ -131,15 +131,8 @@ u8 mt76x02_get_lna_gain(struct mt76x02_dev *dev,
			s8 *lna_2g, s8 *lna_5g,
			struct ieee80211_channel *chan)
{
	u16 val;
	u8 lna;

	val = mt76x02_eeprom_get(dev, MT_EE_NIC_CONF_1);
	if (val & MT_EE_NIC_CONF_1_LNA_EXT_2G)
		*lna_2g = 0;
	if (val & MT_EE_NIC_CONF_1_LNA_EXT_5G)
		memset(lna_5g, 0, sizeof(s8) * 3);

	if (chan->band == NL80211_BAND_2GHZ)
		lna = *lna_2g;
	else if (chan->hw_value <= 64)
Loading