Skip to content

Commit

Permalink
Merge tag 'wireless-drivers-next-2021-10-22' of git://git.kernel.org/…
Browse files Browse the repository at this point in the history
…pub/scm/linux/kernel/git/kvalo/wireless-drivers-next

Kalle Valo says:

====================
wireless-drivers-next patches for v5.16

Second set of patches for v5.16 and this time we have a big one. We
have the new Realtek driver rtw89 with over 90 kLOC and also over 150
patches for mt76. ath9k also got few new small features. And the usual
cleanups and fixes all over.

Major changes:

rtw89
 * new Realtek 802.11ax driver
 * supports Realtek 8852AE 802.11ax 2x2 chip

ath9k
 * add option to reset the wifi chip via debugfs
 * convert Device Tree bindings to the json-schema
 * support Device Tree ieee80211-freq-limit property to limit channels

mt76
 * mt7921 aspm support
 * mt7921 testmode support
 * mt7915 LED support
 * mt7921 6GHz band support
 * support for eeprom data in DT
 * mt7915 TWT support
 * mt7921s SDIO support

* tag 'wireless-drivers-next-2021-10-22' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next: (213 commits)
  zd1201: use eth_hw_addr_set()
  wl3501_cs: use eth_hw_addr_set()
  ray_cs: use eth_hw_addr_set()
  ...
====================

Link: https://lore.kernel.org/r/20211022075845.0E679C4360D@smtp.codeaurora.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
  • Loading branch information
Jakub Kicinski committed Oct 22, 2021
2 parents 24f7cf9 + 9bc0b1a commit d1a3f40
Show file tree
Hide file tree
Showing 187 changed files with 97,735 additions and 2,768 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@ properties:

ieee80211-freq-limit: true

mediatek,eeprom-data:
$ref: /schemas/types.yaml#/definitions/uint32-array
description:
EEPROM data embedded as array.

mediatek,mtd-eeprom:
$ref: /schemas/types.yaml#/definitions/phandle-array
description:
Expand Down
48 changes: 0 additions & 48 deletions Documentation/devicetree/bindings/net/wireless/qca,ath9k.txt

This file was deleted.

90 changes: 90 additions & 0 deletions Documentation/devicetree/bindings/net/wireless/qca,ath9k.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/net/wireless/qca,ath9k.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Qualcomm Atheros ath9k wireless devices Generic Binding

maintainers:
- Kalle Valo <kvalo@codeaurora.org>

description: |
This node provides properties for configuring the ath9k wireless device.
The node is expected to be specified as a child node of the PCI controller
to which the wireless chip is connected.
allOf:
- $ref: ieee80211.yaml#

properties:
compatible:
enum:
- pci168c,0023 # AR5416
- pci168c,0024 # AR5418
- pci168c,0027 # AR9160
- pci168c,0029 # AR9220 and AR9223
- pci168c,002a # AR9280 and AR9283
- pci168c,002b # AR9285
- pci168c,002c # AR2427 - 802.11n bonded out
- pci168c,002d # AR9227
- pci168c,002e # AR9287
- pci168c,0030 # AR9380, AR9381 and AR9382
- pci168c,0032 # AR9485
- pci168c,0033 # AR9580 and AR9590
- pci168c,0034 # AR9462
- pci168c,0036 # AR9565
- pci168c,0037 # AR1111 and AR9485

reg:
maxItems: 1

interrupts:
maxItems: 1

ieee80211-freq-limit: true

qca,no-eeprom:
$ref: /schemas/types.yaml#/definitions/flag
description:
Indicates that there is no physical EEPROM connected

nvmem-cells:
items:
- description: Reference to an nvmem node for the MAC address
- description: Reference to an nvmem node for calibration data

nvmem-cell-names:
items:
- const: mac-address
- const: calibration

required:
- compatible
- reg

additionalProperties: false

examples:
- |
pcie0 {
#address-cells = <3>;
#size-cells = <2>;
wifi@0,0 {
compatible = "pci168c,002d";
reg = <0 0 0 0 0>;
interrupts = <3>;
qca,no-eeprom;
};
};
- |
pci0 {
#address-cells = <3>;
#size-cells = <2>;
wifi@0,11 {
compatible = "pci168c,0029";
reg = <0x8800 0 0 0 0>;
nvmem-cells = <&macaddr_art_c>, <&cal_art_1000>;
nvmem-cell-names = "mac-address", "calibration";
};
};
11 changes: 10 additions & 1 deletion MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -11830,7 +11830,9 @@ F: drivers/mmc/host/mtk-sd.c
MEDIATEK MT76 WIRELESS LAN DRIVER
M: Felix Fietkau <nbd@nbd.name>
M: Lorenzo Bianconi <lorenzo.bianconi83@gmail.com>
R: Ryder Lee <ryder.lee@mediatek.com>
M: Ryder Lee <ryder.lee@mediatek.com>
R: Shayne Chen <shayne.chen@mediatek.com>
R: Sean Wang <sean.wang@mediatek.com>
L: linux-wireless@vger.kernel.org
S: Maintained
F: drivers/net/wireless/mediatek/mt76/
Expand Down Expand Up @@ -15469,6 +15471,7 @@ M: ath9k-devel@qca.qualcomm.com
L: linux-wireless@vger.kernel.org
S: Supported
W: https://wireless.wiki.kernel.org/en/users/Drivers/ath9k
F: Documentation/devicetree/bindings/net/wireless/qca,ath9k.yaml
F: drivers/net/wireless/ath/ath9k/

QUALCOMM CAMERA SUBSYSTEM DRIVER
Expand Down Expand Up @@ -15890,6 +15893,12 @@ L: linux-wireless@vger.kernel.org
S: Maintained
F: drivers/net/wireless/realtek/rtw88/

REALTEK WIRELESS DRIVER (rtw89)
M: Ping-Ke Shih <pkshih@realtek.com>
L: linux-wireless@vger.kernel.org
S: Maintained
F: drivers/net/wireless/realtek/rtw89/

REDPINE WIRELESS DRIVER
M: Amitkumar Karwar <amitkarwar@gmail.com>
M: Siva Rebbagondla <siva8118@gmail.com>
Expand Down
3 changes: 0 additions & 3 deletions drivers/net/wireless/ath/ath10k/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -3520,13 +3520,10 @@ EXPORT_SYMBOL(ath10k_core_create);

void ath10k_core_destroy(struct ath10k *ar)
{
flush_workqueue(ar->workqueue);
destroy_workqueue(ar->workqueue);

flush_workqueue(ar->workqueue_aux);
destroy_workqueue(ar->workqueue_aux);

flush_workqueue(ar->workqueue_tx_complete);
destroy_workqueue(ar->workqueue_tx_complete);

ath10k_debug_destroy(ar);
Expand Down
6 changes: 3 additions & 3 deletions drivers/net/wireless/ath/ath10k/mac.c
Original file line number Diff line number Diff line change
Expand Up @@ -1052,7 +1052,7 @@ static int ath10k_monitor_vdev_start(struct ath10k *ar, int vdev_id)
arg.channel.min_power = 0;
arg.channel.max_power = channel->max_power * 2;
arg.channel.max_reg_power = channel->max_reg_power * 2;
arg.channel.max_antenna_gain = channel->max_antenna_gain * 2;
arg.channel.max_antenna_gain = channel->max_antenna_gain;

reinit_completion(&ar->vdev_setup_done);
reinit_completion(&ar->vdev_delete_done);
Expand Down Expand Up @@ -1498,7 +1498,7 @@ static int ath10k_vdev_start_restart(struct ath10k_vif *arvif,
arg.channel.min_power = 0;
arg.channel.max_power = chandef->chan->max_power * 2;
arg.channel.max_reg_power = chandef->chan->max_reg_power * 2;
arg.channel.max_antenna_gain = chandef->chan->max_antenna_gain * 2;
arg.channel.max_antenna_gain = chandef->chan->max_antenna_gain;

if (arvif->vdev_type == WMI_VDEV_TYPE_AP) {
arg.ssid = arvif->u.ap.ssid;
Expand Down Expand Up @@ -3426,7 +3426,7 @@ static int ath10k_update_channel_list(struct ath10k *ar)
ch->min_power = 0;
ch->max_power = channel->max_power * 2;
ch->max_reg_power = channel->max_reg_power * 2;
ch->max_antenna_gain = channel->max_antenna_gain * 2;
ch->max_antenna_gain = channel->max_antenna_gain;
ch->reg_class_id = 0; /* FIXME */

/* FIXME: why use only legacy modes, why not any
Expand Down
3 changes: 2 additions & 1 deletion drivers/net/wireless/ath/ath10k/qmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -864,7 +864,8 @@ static void ath10k_qmi_event_server_exit(struct ath10k_qmi *qmi)

ath10k_qmi_remove_msa_permission(qmi);
ath10k_core_free_board_files(ar);
if (!test_bit(ATH10K_SNOC_FLAG_UNREGISTERING, &ar_snoc->flags))
if (!test_bit(ATH10K_SNOC_FLAG_UNREGISTERING, &ar_snoc->flags) &&
!test_bit(ATH10K_SNOC_FLAG_MODEM_STOPPED, &ar_snoc->flags))
ath10k_snoc_fw_crashed_dump(ar);

ath10k_snoc_fw_indication(ar, ATH10K_QMI_EVENT_FW_DOWN_IND);
Expand Down
1 change: 0 additions & 1 deletion drivers/net/wireless/ath/ath10k/sdio.c
Original file line number Diff line number Diff line change
Expand Up @@ -2650,7 +2650,6 @@ static void ath10k_sdio_remove(struct sdio_func *func)

ath10k_core_destroy(ar);

flush_workqueue(ar_sdio->workqueue);
destroy_workqueue(ar_sdio->workqueue);
}

Expand Down
77 changes: 77 additions & 0 deletions drivers/net/wireless/ath/ath10k/snoc.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include <linux/platform_device.h>
#include <linux/property.h>
#include <linux/regulator/consumer.h>
#include <linux/remoteproc/qcom_rproc.h>
#include <linux/of_address.h>
#include <linux/iommu.h>

Expand Down Expand Up @@ -1477,6 +1478,74 @@ void ath10k_snoc_fw_crashed_dump(struct ath10k *ar)
mutex_unlock(&ar->dump_mutex);
}

static int ath10k_snoc_modem_notify(struct notifier_block *nb, unsigned long action,
void *data)
{
struct ath10k_snoc *ar_snoc = container_of(nb, struct ath10k_snoc, nb);
struct ath10k *ar = ar_snoc->ar;
struct qcom_ssr_notify_data *notify_data = data;

switch (action) {
case QCOM_SSR_BEFORE_POWERUP:
ath10k_dbg(ar, ATH10K_DBG_SNOC, "received modem starting event\n");
clear_bit(ATH10K_SNOC_FLAG_MODEM_STOPPED, &ar_snoc->flags);
break;

case QCOM_SSR_AFTER_POWERUP:
ath10k_dbg(ar, ATH10K_DBG_SNOC, "received modem running event\n");
break;

case QCOM_SSR_BEFORE_SHUTDOWN:
ath10k_dbg(ar, ATH10K_DBG_SNOC, "received modem %s event\n",
notify_data->crashed ? "crashed" : "stopping");
if (!notify_data->crashed)
set_bit(ATH10K_SNOC_FLAG_MODEM_STOPPED, &ar_snoc->flags);
else
clear_bit(ATH10K_SNOC_FLAG_MODEM_STOPPED, &ar_snoc->flags);
break;

case QCOM_SSR_AFTER_SHUTDOWN:
ath10k_dbg(ar, ATH10K_DBG_SNOC, "received modem offline event\n");
break;

default:
ath10k_err(ar, "received unrecognized event %lu\n", action);
break;
}

return NOTIFY_OK;
}

static int ath10k_modem_init(struct ath10k *ar)
{
struct ath10k_snoc *ar_snoc = ath10k_snoc_priv(ar);
void *notifier;
int ret;

ar_snoc->nb.notifier_call = ath10k_snoc_modem_notify;

notifier = qcom_register_ssr_notifier("mpss", &ar_snoc->nb);
if (IS_ERR(notifier)) {
ret = PTR_ERR(notifier);
ath10k_err(ar, "failed to initialize modem notifier: %d\n", ret);
return ret;
}

ar_snoc->notifier = notifier;

return 0;
}

static void ath10k_modem_deinit(struct ath10k *ar)
{
int ret;
struct ath10k_snoc *ar_snoc = ath10k_snoc_priv(ar);

ret = qcom_unregister_ssr_notifier(ar_snoc->notifier, &ar_snoc->nb);
if (ret)
ath10k_err(ar, "error %d unregistering notifier\n", ret);
}

static int ath10k_setup_msa_resources(struct ath10k *ar, u32 msa_size)
{
struct device *dev = ar->dev;
Expand Down Expand Up @@ -1740,10 +1809,17 @@ static int ath10k_snoc_probe(struct platform_device *pdev)
goto err_fw_deinit;
}

ret = ath10k_modem_init(ar);
if (ret)
goto err_qmi_deinit;

ath10k_dbg(ar, ATH10K_DBG_SNOC, "snoc probe\n");

return 0;

err_qmi_deinit:
ath10k_qmi_deinit(ar);

err_fw_deinit:
ath10k_fw_deinit(ar);

Expand Down Expand Up @@ -1771,6 +1847,7 @@ static int ath10k_snoc_free_resources(struct ath10k *ar)
ath10k_fw_deinit(ar);
ath10k_snoc_free_irq(ar);
ath10k_snoc_release_resource(ar);
ath10k_modem_deinit(ar);
ath10k_qmi_deinit(ar);
ath10k_core_destroy(ar);

Expand Down
5 changes: 5 additions & 0 deletions drivers/net/wireless/ath/ath10k/snoc.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
#ifndef _SNOC_H_
#define _SNOC_H_

#include <linux/notifier.h>

#include "hw.h"
#include "ce.h"
#include "qmi.h"
Expand Down Expand Up @@ -45,6 +47,7 @@ struct ath10k_snoc_ce_irq {
enum ath10k_snoc_flags {
ATH10K_SNOC_FLAG_REGISTERED,
ATH10K_SNOC_FLAG_UNREGISTERING,
ATH10K_SNOC_FLAG_MODEM_STOPPED,
ATH10K_SNOC_FLAG_RECOVERY,
ATH10K_SNOC_FLAG_8BIT_HOST_CAP_QUIRK,
};
Expand Down Expand Up @@ -75,6 +78,8 @@ struct ath10k_snoc {
struct clk_bulk_data *clks;
size_t num_clks;
struct ath10k_qmi *qmi;
struct notifier_block nb;
void *notifier;
unsigned long flags;
bool xo_cal_supported;
u32 xo_cal_data;
Expand Down
3 changes: 3 additions & 0 deletions drivers/net/wireless/ath/ath10k/wmi.h
Original file line number Diff line number Diff line change
Expand Up @@ -2066,7 +2066,9 @@ struct wmi_channel {
union {
__le32 reginfo1;
struct {
/* note: power unit is 1 dBm */
u8 antenna_max;
/* note: power unit is 0.5 dBm */
u8 max_tx_power;
} __packed;
} __packed;
Expand All @@ -2086,6 +2088,7 @@ struct wmi_channel_arg {
u32 min_power;
u32 max_power;
u32 max_reg_power;
/* note: power unit is 1 dBm */
u32 max_antenna_gain;
u32 reg_class_id;
enum wmi_phy_mode mode;
Expand Down
Loading

0 comments on commit d1a3f40

Please sign in to comment.