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

Commit c6920a3c authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge changes Ie1cd3ccf,I3d19fe54 into msm-next

* changes:
  wil6210: add module parameter for alternate interface name
  msm_11ad: Add 11ad platform driver
parents 56be5bb9 d56b4ae5
Loading
Loading
Loading
Loading
+63 −0
Original line number Diff line number Diff line
wil6210 - Qualcomm Technologies Inc. 802.11ad Wireless Driver

wil6210 driver is responsible for managing 802.11ad chipset
connected to MSM over PCIe interface.

The platform data is needed in order to perform proper
bus-scaling and SMMU initialization by the driver.

Required properties:

- compatible: "qcom,wil6210"
- qcom,smmu-support: Boolean flag indicating whether PCIe has SMMU support
- qcom,smmu-s1-en: Boolean flag indicating whether SMMU stage1 should be enabled
- qcom,smmu-fast-map: Boolean flag indicating whether SMMU fast mapping should be enabled
- qcom,smmu-coherent: Boolean flag indicating SMMU dma and page table coherency
- qcom,smmu-mapping: specifies the base address and size of SMMU space
- qcom,pcie-parent: phandle for the PCIe root complex to which 11ad card is connected
- Refer to "Documentation/devicetree/bindings/arm/msm/msm_bus.txt" for
  the below optional properties:
	- qcom,msm-bus,name
	- qcom,msm-bus,num-cases
	- qcom,msm-bus,num-paths
	- qcom,msm-bus,vectors-KBps

Optional properties:
- qcom,sleep-clk-en: GPIO for sleep clock used for low power modes by 11ad card
- qcom,wigig-en: Enable GPIO connected to 11ad card
- qcom,use-ext-supply: Boolean flag to indicate if 11ad SIP uses external power supply
- vdd-supply: phandle to 11ad VDD regulator node
- vddio-supply: phandle to 11ad VDDIO regulator node
- qcom,use-ext-clocks: Boolean flag to indicate if 11ad SIP uses external clocks
- clocks	    : List of phandle and clock specifier pairs
- clock-names       : List of clock input name strings sorted in the same
		      order as the clocks property.
- qcom,keep-radio-on-during-sleep: Boolean flag to indicate if to suspend to d3hot
				   instead of turning off the device

Example:
	wil6210: qcom,wil6210 {
		compatible = "qcom,wil6210";
		qcom,smmu-support;
		qcom,smmu-s1-en;
		qcom,smmu-fast-map;
		qcom,smmu-coherent;
		qcom,smmu-mapping = <0x20000000 0xe0000000>;
		qcom,pcie-parent = <&pcie1>;
		qcom,wigig-en = <&tlmm 94 0>;
		qcom,msm-bus,name = "wil6210";
		qcom,msm-bus,num-cases = <2>;
		qcom,msm-bus,num-paths = <1>;
		qcom,msm-bus,vectors-KBps =
			<100 512 0 0>,
			<100 512 600000 800000>; /* ~4.6Gbps (MCS12) */
		qcom,use-ext-supply;
		vdd-supply= <&pm8998_s7>;
		vddio-supply= <&pm8998_s5>;
		qcom,use-ext-clocks;
		clocks = <&clock_gcc clk_rf_clk3>,
			 <&clock_gcc clk_rf_clk3_pin>;
		clock-names = "rf_clk3_clk", "rf_clk3_pin_clk";
		qcom,keep-radio-on-during-sleep;
	};
+7 −1
Original line number Diff line number Diff line
@@ -14,10 +14,15 @@
 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 */

#include <linux/moduleparam.h>
#include <linux/etherdevice.h>
#include "wil6210.h"
#include "txrx.h"

static bool alt_ifname; /* = false; */
module_param(alt_ifname, bool, 0444);
MODULE_PARM_DESC(alt_ifname, " use an alternate interface name wigigN instead of wlanN");

static int wil_open(struct net_device *ndev)
{
	struct wil6210_priv *wil = ndev_to_wil(ndev);
@@ -114,6 +119,7 @@ void *wil_if_alloc(struct device *dev)
	struct wil6210_priv *wil;
	struct ieee80211_channel *ch;
	int rc = 0;
	const char *ifname = alt_ifname ? "wigig%d" : "wlan%d";

	wdev = wil_cfg80211_init(dev);
	if (IS_ERR(wdev)) {
@@ -138,7 +144,7 @@ void *wil_if_alloc(struct device *dev)
	ch = wdev->wiphy->bands[NL80211_BAND_60GHZ]->channels;
	cfg80211_chandef_create(&wdev->preset_chandef, ch, NL80211_CHAN_NO_HT);

	ndev = alloc_netdev(0, "wlan%d", NET_NAME_UNKNOWN, wil_dev_setup);
	ndev = alloc_netdev(0, ifname, NET_NAME_UNKNOWN, wil_dev_setup);
	if (!ndev) {
		dev_err(dev, "alloc_netdev_mqs failed\n");
		rc = -ENOMEM;
+12 −0
Original line number Diff line number Diff line
@@ -147,4 +147,16 @@ config IPA_UT
	  The user interface to run and control the tests is debugfs file
	  system.

config MSM_11AD
	tristate "Platform driver for 11ad chip"
	depends on PCI
	depends on PCI_MSM
	default n
	---help---
	  This module adds required platform support for wireless adapter based on
	  Qualcomm Technologies, Inc. 11ad chip, integrated into MSM platform

	  If you choose to build it as a module, it will be called
	  msm_11ad_proxy.

endmenu
+1 −0
Original line number Diff line number Diff line
@@ -9,3 +9,4 @@ obj-$(CONFIG_USB_BAM) += usb_bam.o
obj-$(CONFIG_GSI) += gsi/
obj-$(CONFIG_IPA) += ipa/
obj-$(CONFIG_IPA3) += ipa/
obj-$(CONFIG_MSM_11AD) += msm_11ad/
+9 −0
Original line number Diff line number Diff line
obj-$(CONFIG_MSM_11AD) += msm_11ad_proxy.o

msm_11ad_proxy-y := msm_11ad.o
subdir-ccflags-y += -D__CHECK_ENDIAN__

# need to locate wil_platform.h
WIL_11AD_PATH = drivers/net/wireless/ath/wil6210
subdir-ccflags-y += -I$(WIL_11AD_PATH)
Loading