Skip to content

Commit

Permalink
Merge changes
Browse files Browse the repository at this point in the history
  • Loading branch information
kimocoder committed Apr 18, 2023
1 parent bf22bdb commit c58f779
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 73 deletions.
4 changes: 0 additions & 4 deletions rtl8xxxu_8188e.c
Expand Up @@ -568,10 +568,6 @@ static int rtl8188eu_parse_efuse(struct rtl8xxxu_priv *priv)

priv->default_crystal_cap = efuse->xtal_k & 0x3f;

dev_info(&priv->udev->dev, "Vendor: %.7s\n", efuse->vendor_name);
dev_info(&priv->udev->dev, "Product: %.11s\n", efuse->device_name);
dev_info(&priv->udev->dev, "Serial: %.11s\n", efuse->serial);

return 0;
}

Expand Down
3 changes: 0 additions & 3 deletions rtl8xxxu_8188f.c
Expand Up @@ -734,9 +734,6 @@ static int rtl8188fu_parse_efuse(struct rtl8xxxu_priv *priv)

priv->default_crystal_cap = efuse->xtal_k & 0x3f;

dev_info(&priv->udev->dev, "Vendor: %.7s\n", efuse->vendor_name);
dev_info(&priv->udev->dev, "Product: %.7s\n", efuse->device_name);

return 0;
}

Expand Down
5 changes: 0 additions & 5 deletions rtl8xxxu_8192c.c
Expand Up @@ -441,11 +441,6 @@ static int rtl8192cu_parse_efuse(struct rtl8xxxu_priv *priv)
efuse->ht20_max_power_offset,
sizeof(efuse->ht20_max_power_offset));

dev_info(&priv->udev->dev, "Vendor: %.7s\n",
efuse->vendor_name);
dev_info(&priv->udev->dev, "Product: %.20s\n",
efuse->device_name);

priv->power_base = &rtl8192c_power_base;

if (efuse->rf_regulatory & 0x20) {
Expand Down
54 changes: 0 additions & 54 deletions rtl8xxxu_8192e.c
Expand Up @@ -601,43 +601,9 @@ rtl8192e_set_tx_power(struct rtl8xxxu_priv *priv, int channel, bool ht40)
}
}

static void rtl8192eu_log_next_device_info(struct rtl8xxxu_priv *priv,
char *record_name,
char *device_info,
unsigned int *record_offset)
{
char *record = device_info + *record_offset;

/* A record is [ total length | 0x03 | value ] */
unsigned char l = record[0];

/*
* The whole device info section seems to be 80 characters, make sure
* we don't read further.
*/
if (*record_offset + l > 80) {
dev_warn(&priv->udev->dev,
"invalid record length %d while parsing \"%s\" at offset %u.\n",
l, record_name, *record_offset);
return;
}

if (l >= 2) {
char value[80];

memcpy(value, &record[2], l - 2);
value[l - 2] = '\0';
dev_info(&priv->udev->dev, "%s: %s\n", record_name, value);
*record_offset = *record_offset + l;
} else {
dev_info(&priv->udev->dev, "%s not available.\n", record_name);
}
}

static int rtl8192eu_parse_efuse(struct rtl8xxxu_priv *priv)
{
struct rtl8192eu_efuse *efuse = &priv->efuse_wifi.efuse8192eu;
unsigned int record_offset;
int i;

if (efuse->rtl_id != cpu_to_le16(0x8129))
Expand Down Expand Up @@ -684,26 +650,6 @@ static int rtl8192eu_parse_efuse(struct rtl8xxxu_priv *priv)

priv->default_crystal_cap = priv->efuse_wifi.efuse8192eu.xtal_k & 0x3f;

/*
* device_info section seems to be laid out as records
* [ total length | 0x03 | value ] so:
* - vendor length + 2
* - 0x03
* - vendor string (not null terminated)
* - product length + 2
* - 0x03
* - product string (not null terminated)
* Then there is one or 2 0x00 on all the 4 devices I own or found
* dumped online.
* As previous version of the code handled an optional serial
* string, I now assume there may be a third record if the
* length is not 0.
*/
record_offset = 0;
rtl8192eu_log_next_device_info(priv, "Vendor", efuse->device_info, &record_offset);
rtl8192eu_log_next_device_info(priv, "Product", efuse->device_info, &record_offset);
rtl8192eu_log_next_device_info(priv, "Serial", efuse->device_info, &record_offset);

return 0;
}

Expand Down
4 changes: 0 additions & 4 deletions rtl8xxxu_8723a.c
Expand Up @@ -222,10 +222,6 @@ static int rtl8723au_parse_efuse(struct rtl8xxxu_priv *priv)

priv->power_base = &rtl8723a_power_base;

dev_info(&priv->udev->dev, "Vendor: %.7s\n",
efuse->vendor_name);
dev_info(&priv->udev->dev, "Product: %.41s\n",
efuse->device_name);
return 0;
}

Expand Down
3 changes: 0 additions & 3 deletions rtl8xxxu_8723b.c
Expand Up @@ -494,9 +494,6 @@ static int rtl8723bu_parse_efuse(struct rtl8xxxu_priv *priv)

priv->default_crystal_cap = priv->efuse_wifi.efuse8723bu.xtal_k & 0x3f;

dev_info(&priv->udev->dev, "Vendor: %.7s\n", efuse->vendor_name);
dev_info(&priv->udev->dev, "Product: %.41s\n", efuse->device_name);

return 0;
}

Expand Down

0 comments on commit c58f779

Please sign in to comment.