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

Commit 4f58605e authored by David S. Miller's avatar David S. Miller
Browse files
parents b8eb3a10 d89197c7
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -35,6 +35,10 @@
static struct usb_device_id ath3k_table[] = {
	/* Atheros AR3011 */
	{ USB_DEVICE(0x0CF3, 0x3000) },

	/* Atheros AR3011 with sflash firmware*/
	{ USB_DEVICE(0x0CF3, 0x3002) },

	{ }	/* Terminating entry */
};

+9 −3
Original line number Diff line number Diff line
@@ -99,6 +99,9 @@ static struct usb_device_id blacklist_table[] = {
	/* Broadcom BCM2033 without firmware */
	{ USB_DEVICE(0x0a5c, 0x2033), .driver_info = BTUSB_IGNORE },

	/* Atheros 3011 with sflash firmware */
	{ USB_DEVICE(0x0cf3, 0x3002), .driver_info = BTUSB_IGNORE },

	/* Broadcom BCM2035 */
	{ USB_DEVICE(0x0a5c, 0x2035), .driver_info = BTUSB_WRONG_SCO_MTU },
	{ USB_DEVICE(0x0a5c, 0x200a), .driver_info = BTUSB_WRONG_SCO_MTU },
@@ -239,6 +242,7 @@ static void btusb_intr_complete(struct urb *urb)

	err = usb_submit_urb(urb, GFP_ATOMIC);
	if (err < 0) {
		if (err != -EPERM)
			BT_ERR("%s urb %p failed to resubmit (%d)",
						hdev->name, urb, -err);
		usb_unanchor_urb(urb);
@@ -323,6 +327,7 @@ static void btusb_bulk_complete(struct urb *urb)

	err = usb_submit_urb(urb, GFP_ATOMIC);
	if (err < 0) {
		if (err != -EPERM)
			BT_ERR("%s urb %p failed to resubmit (%d)",
						hdev->name, urb, -err);
		usb_unanchor_urb(urb);
@@ -412,6 +417,7 @@ static void btusb_isoc_complete(struct urb *urb)

	err = usb_submit_urb(urb, GFP_ATOMIC);
	if (err < 0) {
		if (err != -EPERM)
			BT_ERR("%s urb %p failed to resubmit (%d)",
						hdev->name, urb, -err);
		usb_unanchor_urb(urb);
+38 −35
Original line number Diff line number Diff line
@@ -55,6 +55,8 @@
#define SUB_NUM_CTL_MODES_AT_5G_40 2    /* excluding HT40, EXT-OFDM */
#define SUB_NUM_CTL_MODES_AT_2G_40 3    /* excluding HT40, EXT-OFDM, EXT-CCK */

#define CTL(_tpower, _flag) ((_tpower) | ((_flag) << 6))

static const struct ar9300_eeprom ar9300_default = {
	.eepromVersion = 2,
	.templateVersion = 2,
@@ -290,20 +292,21 @@ static const struct ar9300_eeprom ar9300_default = {
		}
	 },
	.ctlPowerData_2G = {
		 { { {60, 0}, {60, 1}, {60, 0}, {60, 0} } },
		 { { {60, 0}, {60, 1}, {60, 0}, {60, 0} } },
		 { { {60, 1}, {60, 0}, {60, 0}, {60, 1} } },
		 { { CTL(60, 0), CTL(60, 1), CTL(60, 0), CTL(60, 0) } },
		 { { CTL(60, 0), CTL(60, 1), CTL(60, 0), CTL(60, 0) } },
		 { { CTL(60, 1), CTL(60, 0), CTL(60, 0), CTL(60, 1) } },

		 { { {60, 1}, {60, 0}, {0, 0}, {0, 0} } },
		 { { {60, 0}, {60, 1}, {60, 0}, {60, 0} } },
		 { { {60, 0}, {60, 1}, {60, 0}, {60, 0} } },
		 { { CTL(60, 1), CTL(60, 0), CTL(0, 0), CTL(0, 0) } },
		 { { CTL(60, 0), CTL(60, 1), CTL(60, 0), CTL(60, 0) } },
		 { { CTL(60, 0), CTL(60, 1), CTL(60, 0), CTL(60, 0) } },

		 { { {60, 0}, {60, 1}, {60, 1}, {60, 0} } },
		 { { {60, 0}, {60, 1}, {60, 0}, {60, 0} } },
		 { { {60, 0}, {60, 1}, {60, 0}, {60, 0} } },
		 { { CTL(60, 0), CTL(60, 1), CTL(60, 1), CTL(60, 0) } },
		 { { CTL(60, 0), CTL(60, 1), CTL(60, 0), CTL(60, 0) } },
		 { { CTL(60, 0), CTL(60, 1), CTL(60, 0), CTL(60, 0) } },

		 { { {60, 0}, {60, 1}, {60, 0}, {60, 0} } },
		 { { {60, 0}, {60, 1}, {60, 1}, {60, 1} } },
		 { { CTL(60, 0), CTL(60, 1), CTL(60, 0), CTL(60, 0) } },
		 { { CTL(60, 0), CTL(60, 1), CTL(60, 1), CTL(60, 1) } },
		 { { CTL(60, 0), CTL(60, 1), CTL(60, 1), CTL(60, 1) } },
	 },
	.modalHeader5G = {
		/* 4 idle,t1,t2,b (4 bits per setting) */
@@ -568,56 +571,56 @@ static const struct ar9300_eeprom ar9300_default = {
	.ctlPowerData_5G = {
		{
			{
				{60, 1}, {60, 1}, {60, 1}, {60, 1},
				{60, 1}, {60, 1}, {60, 1}, {60, 0},
				CTL(60, 1), CTL(60, 1), CTL(60, 1), CTL(60, 1),
				CTL(60, 1), CTL(60, 1), CTL(60, 1), CTL(60, 0),
			}
		},
		{
			{
				{60, 1}, {60, 1}, {60, 1}, {60, 1},
				{60, 1}, {60, 1}, {60, 1}, {60, 0},
				CTL(60, 1), CTL(60, 1), CTL(60, 1), CTL(60, 1),
				CTL(60, 1), CTL(60, 1), CTL(60, 1), CTL(60, 0),
			}
		},
		{
			{
				{60, 0}, {60, 1}, {60, 0}, {60, 1},
				{60, 1}, {60, 1}, {60, 1}, {60, 1},
				CTL(60, 0), CTL(60, 1), CTL(60, 0), CTL(60, 1),
				CTL(60, 1), CTL(60, 1), CTL(60, 1), CTL(60, 1),
			}
		},
		{
			{
				{60, 0}, {60, 1}, {60, 1}, {60, 0},
				{60, 1}, {60, 0}, {60, 0}, {60, 0},
				CTL(60, 0), CTL(60, 1), CTL(60, 1), CTL(60, 0),
				CTL(60, 1), CTL(60, 0), CTL(60, 0), CTL(60, 0),
			}
		},
		{
			{
				{60, 1}, {60, 1}, {60, 1}, {60, 0},
				{60, 0}, {60, 0}, {60, 0}, {60, 0},
				CTL(60, 1), CTL(60, 1), CTL(60, 1), CTL(60, 0),
				CTL(60, 0), CTL(60, 0), CTL(60, 0), CTL(60, 0),
			}
		},
		{
			{
				{60, 1}, {60, 1}, {60, 1}, {60, 1},
				{60, 1}, {60, 0}, {60, 0}, {60, 0},
				CTL(60, 1), CTL(60, 1), CTL(60, 1), CTL(60, 1),
				CTL(60, 1), CTL(60, 0), CTL(60, 0), CTL(60, 0),
			}
		},
		{
			{
				{60, 1}, {60, 1}, {60, 1}, {60, 1},
				{60, 1}, {60, 1}, {60, 1}, {60, 1},
				CTL(60, 1), CTL(60, 1), CTL(60, 1), CTL(60, 1),
				CTL(60, 1), CTL(60, 1), CTL(60, 1), CTL(60, 1),
			}
		},
		{
			{
				{60, 1}, {60, 1}, {60, 0}, {60, 1},
				{60, 1}, {60, 1}, {60, 1}, {60, 0},
				CTL(60, 1), CTL(60, 1), CTL(60, 0), CTL(60, 1),
				CTL(60, 1), CTL(60, 1), CTL(60, 1), CTL(60, 0),
			}
		},
		{
			{
				{60, 1}, {60, 0}, {60, 1}, {60, 1},
				{60, 1}, {60, 1}, {60, 0}, {60, 1},
				CTL(60, 1), CTL(60, 0), CTL(60, 1), CTL(60, 1),
				CTL(60, 1), CTL(60, 1), CTL(60, 0), CTL(60, 1),
			}
		},
	 }
@@ -1827,9 +1830,9 @@ static u16 ar9003_hw_get_direct_edge_power(struct ar9300_eeprom *eep,
	struct cal_ctl_data_5g *ctl_5g = eep->ctlPowerData_5G;

	if (is2GHz)
		return ctl_2g[idx].ctlEdges[edge].tPower;
		return CTL_EDGE_TPOWER(ctl_2g[idx].ctlEdges[edge]);
	else
		return ctl_5g[idx].ctlEdges[edge].tPower;
		return CTL_EDGE_TPOWER(ctl_5g[idx].ctlEdges[edge]);
}

static u16 ar9003_hw_get_indirect_edge_power(struct ar9300_eeprom *eep,
@@ -1847,12 +1850,12 @@ static u16 ar9003_hw_get_indirect_edge_power(struct ar9300_eeprom *eep,

	if (is2GHz) {
		if (ath9k_hw_fbin2freq(ctl_freqbin[edge - 1], 1) < freq &&
		    ctl_2g[idx].ctlEdges[edge - 1].flag)
			return ctl_2g[idx].ctlEdges[edge - 1].tPower;
		    CTL_EDGE_FLAGS(ctl_2g[idx].ctlEdges[edge - 1]))
			return CTL_EDGE_TPOWER(ctl_2g[idx].ctlEdges[edge - 1]);
	} else {
		if (ath9k_hw_fbin2freq(ctl_freqbin[edge - 1], 0) < freq &&
		    ctl_5g[idx].ctlEdges[edge - 1].flag)
			return ctl_5g[idx].ctlEdges[edge - 1].tPower;
		    CTL_EDGE_FLAGS(ctl_5g[idx].ctlEdges[edge - 1]))
			return CTL_EDGE_TPOWER(ctl_5g[idx].ctlEdges[edge - 1]);
	}

	return AR9300_MAX_RATE_POWER;
+2 −7
Original line number Diff line number Diff line
@@ -261,17 +261,12 @@ struct cal_tgt_pow_ht {
	u8 tPow2x[14];
} __packed;

struct cal_ctl_edge_pwr {
	u8 tPower:6,
	   flag:2;
} __packed;

struct cal_ctl_data_2g {
	struct cal_ctl_edge_pwr ctlEdges[AR9300_NUM_BAND_EDGES_2G];
	u8 ctlEdges[AR9300_NUM_BAND_EDGES_2G];
} __packed;

struct cal_ctl_data_5g {
	struct cal_ctl_edge_pwr ctlEdges[AR9300_NUM_BAND_EDGES_5G];
	u8 ctlEdges[AR9300_NUM_BAND_EDGES_5G];
} __packed;

struct ar9300_eeprom {
+3 −1
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@
#include <linux/device.h>
#include <linux/leds.h>
#include <linux/completion.h>
#include <linux/pm_qos_params.h>

#include "debug.h"
#include "common.h"
@@ -646,6 +647,8 @@ struct ath_softc {
	struct ath_descdma txsdma;

	struct ath_ant_comb ant_comb;

	struct pm_qos_request_list pm_qos_req;
};

struct ath_wiphy {
@@ -675,7 +678,6 @@ static inline void ath_read_cachesize(struct ath_common *common, int *csz)
}

extern struct ieee80211_ops ath9k_ops;
extern struct pm_qos_request_list ath9k_pm_qos_req;
extern int modparam_nohwcrypt;
extern int led_blink;

Loading