Commit f1c26960 authored by Kalle Valo's avatar Kalle Valo
Browse files
ath.git patches for v6.10

ath12k

* debugfs support

* dfs_simulate_radar debugfs file

* disable Wireless Extensions

* suspend and hibernation support

* ACPI support

* refactoring in preparation of multi-link support

ath11k

* support hibernation (required changes in qrtr and MHI subsystems)

* ieee80211-freq-limit Device Tree property support

ath10k

* firmware-name Device Tree property support
parents d08aeb97 bf76b144
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -73,6 +73,12 @@ properties:
      - sky85703-11
      - sky85803

  firmware-name:
    maxItems: 1
    description:
      If present, a board or platform specific string used to lookup firmware
      files for the device.

  wifi-firmware:
    type: object
    additionalProperties: false
+3 −0
Original line number Diff line number Diff line
@@ -59,6 +59,8 @@ properties:
    minItems: 1
    maxItems: 2

  ieee80211-freq-limit: true

  wifi-firmware:
    type: object
    description: |
@@ -88,6 +90,7 @@ required:
additionalProperties: false

allOf:
  - $ref: ieee80211.yaml#
  - if:
      properties:
        compatible:
+3 −1
Original line number Diff line number Diff line
@@ -80,6 +80,7 @@ enum dev_st_transition {
	DEV_ST_TRANSITION_FP,
	DEV_ST_TRANSITION_SYS_ERR,
	DEV_ST_TRANSITION_DISABLE,
	DEV_ST_TRANSITION_DISABLE_DESTROY_DEVICE,
	DEV_ST_TRANSITION_MAX,
};

@@ -90,7 +91,8 @@ enum dev_st_transition {
	dev_st_trans(MISSION_MODE,	"MISSION MODE")		\
	dev_st_trans(FP,		"FLASH PROGRAMMER")	\
	dev_st_trans(SYS_ERR,		"SYS ERROR")		\
	dev_st_trans_end(DISABLE,	"DISABLE")
	dev_st_trans(DISABLE,		"DISABLE")		\
	dev_st_trans_end(DISABLE_DESTROY_DEVICE, "DISABLE (DESTROY DEVICE)")

extern const char * const dev_state_tran_str[DEV_ST_TRANSITION_MAX];
#define TO_DEV_STATE_TRANS_STR(state) (((state) >= DEV_ST_TRANSITION_MAX) ? \
+36 −6
Original line number Diff line number Diff line
@@ -468,7 +468,8 @@ static int mhi_pm_mission_mode_transition(struct mhi_controller *mhi_cntrl)
}

/* Handle shutdown transitions */
static void mhi_pm_disable_transition(struct mhi_controller *mhi_cntrl)
static void mhi_pm_disable_transition(struct mhi_controller *mhi_cntrl,
				      bool destroy_device)
{
	enum mhi_pm_state cur_state;
	struct mhi_event *mhi_event;
@@ -530,8 +531,16 @@ static void mhi_pm_disable_transition(struct mhi_controller *mhi_cntrl)
	dev_dbg(dev, "Waiting for all pending threads to complete\n");
	wake_up_all(&mhi_cntrl->state_event);

	/*
	 * Only destroy the 'struct device' for channels if indicated by the
	 * 'destroy_device' flag. Because, during system suspend or hibernation
	 * state, there is no need to destroy the 'struct device' as the endpoint
	 * device would still be physically attached to the machine.
	 */
	if (destroy_device) {
		dev_dbg(dev, "Reset all active channels and remove MHI devices\n");
		device_for_each_child(&mhi_cntrl->mhi_dev->dev, NULL, mhi_destroy_device);
	}

	mutex_lock(&mhi_cntrl->pm_mutex);

@@ -821,7 +830,10 @@ void mhi_pm_st_worker(struct work_struct *work)
			mhi_pm_sys_error_transition(mhi_cntrl);
			break;
		case DEV_ST_TRANSITION_DISABLE:
			mhi_pm_disable_transition(mhi_cntrl);
			mhi_pm_disable_transition(mhi_cntrl, false);
			break;
		case DEV_ST_TRANSITION_DISABLE_DESTROY_DEVICE:
			mhi_pm_disable_transition(mhi_cntrl, true);
			break;
		default:
			break;
@@ -1175,7 +1187,8 @@ int mhi_async_power_up(struct mhi_controller *mhi_cntrl)
}
EXPORT_SYMBOL_GPL(mhi_async_power_up);

void mhi_power_down(struct mhi_controller *mhi_cntrl, bool graceful)
static void __mhi_power_down(struct mhi_controller *mhi_cntrl, bool graceful,
			     bool destroy_device)
{
	enum mhi_pm_state cur_state, transition_state;
	struct device *dev = &mhi_cntrl->mhi_dev->dev;
@@ -1211,15 +1224,32 @@ void mhi_power_down(struct mhi_controller *mhi_cntrl, bool graceful)
	write_unlock_irq(&mhi_cntrl->pm_lock);
	mutex_unlock(&mhi_cntrl->pm_mutex);

	mhi_queue_state_transition(mhi_cntrl, DEV_ST_TRANSITION_DISABLE);
	if (destroy_device)
		mhi_queue_state_transition(mhi_cntrl,
					   DEV_ST_TRANSITION_DISABLE_DESTROY_DEVICE);
	else
		mhi_queue_state_transition(mhi_cntrl,
					   DEV_ST_TRANSITION_DISABLE);

	/* Wait for shutdown to complete */
	flush_work(&mhi_cntrl->st_worker);

	disable_irq(mhi_cntrl->irq[0]);
}

void mhi_power_down(struct mhi_controller *mhi_cntrl, bool graceful)
{
	__mhi_power_down(mhi_cntrl, graceful, true);
}
EXPORT_SYMBOL_GPL(mhi_power_down);

void mhi_power_down_keep_dev(struct mhi_controller *mhi_cntrl,
			       bool graceful)
{
	__mhi_power_down(mhi_cntrl, graceful, false);
}
EXPORT_SYMBOL_GPL(mhi_power_down_keep_dev);

int mhi_sync_power_up(struct mhi_controller *mhi_cntrl)
{
	int ret = mhi_async_power_up(mhi_cntrl);
+14 −0
Original line number Diff line number Diff line
@@ -1594,6 +1594,20 @@ static int ar5523_probe(struct usb_interface *intf,
	struct ar5523 *ar;
	int error = -ENOMEM;

	static const u8 bulk_ep_addr[] = {
		AR5523_CMD_TX_PIPE | USB_DIR_OUT,
		AR5523_DATA_TX_PIPE | USB_DIR_OUT,
		AR5523_CMD_RX_PIPE | USB_DIR_IN,
		AR5523_DATA_RX_PIPE | USB_DIR_IN,
		0};

	if (!usb_check_bulk_endpoints(intf, bulk_ep_addr)) {
		dev_err(&dev->dev,
			"Could not find all expected endpoints\n");
		error = -ENODEV;
		goto out;
	}

	/*
	 * Load firmware if the device requires it.  This will return
	 * -ENXIO on success and we'll get called back afer the usb
Loading