-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mwifiex: pcie: add DMI-based quirk implementation for Surface devices
This commit adds the ability to apply device-specific quirks to the mwifiex driver. It uses DMI matching similar to the quirks brcmfmac uses with dmi.c. We'll add identifiers to match various MS Surface devices, which this is primarily meant for, later. This commit is a slightly modified version of a previous patch sent in by Tsuchiya Yuto. Co-developed-by: Tsuchiya Yuto <kitakar@gmail.com> Signed-off-by: Tsuchiya Yuto <kitakar@gmail.com> Signed-off-by: Jonas Dreßler <verdre@v0yd.nl> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Link: https://lore.kernel.org/r/20210820142050.35741-2-verdre@v0yd.nl
- Loading branch information
Jonas Dreßler
authored and
Kalle Valo
committed
Aug 29, 2021
1 parent
d745ca4
commit 5448bc2
Showing
5 changed files
with
64 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/* | ||
* NXP Wireless LAN device driver: PCIE and platform specific quirks | ||
* | ||
* This software file (the "File") is distributed by NXP | ||
* under the terms of the GNU General Public License Version 2, June 1991 | ||
* (the "License"). You may use, redistribute and/or modify this File in | ||
* accordance with the terms and conditions of the License, a copy of which | ||
* is available by writing to the Free Software Foundation, Inc., | ||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the | ||
* worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. | ||
* | ||
* THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE | ||
* IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE | ||
* ARE EXPRESSLY DISCLAIMED. The License provides additional details about | ||
* this warranty disclaimer. | ||
*/ | ||
|
||
#include <linux/dmi.h> | ||
|
||
#include "pcie_quirks.h" | ||
|
||
/* quirk table based on DMI matching */ | ||
static const struct dmi_system_id mwifiex_quirk_table[] = { | ||
{} | ||
}; | ||
|
||
void mwifiex_initialize_quirks(struct pcie_service_card *card) | ||
{ | ||
struct pci_dev *pdev = card->dev; | ||
const struct dmi_system_id *dmi_id; | ||
|
||
dmi_id = dmi_first_match(mwifiex_quirk_table); | ||
if (dmi_id) | ||
card->quirks = (uintptr_t)dmi_id->driver_data; | ||
|
||
if (!card->quirks) | ||
dev_info(&pdev->dev, "no quirks enabled\n"); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/* | ||
* NXP Wireless LAN device driver: PCIE and platform specific quirks | ||
* | ||
* This software file (the "File") is distributed by NXP | ||
* under the terms of the GNU General Public License Version 2, June 1991 | ||
* (the "License"). You may use, redistribute and/or modify this File in | ||
* accordance with the terms and conditions of the License, a copy of which | ||
* is available by writing to the Free Software Foundation, Inc., | ||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the | ||
* worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. | ||
* | ||
* THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE | ||
* IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE | ||
* ARE EXPRESSLY DISCLAIMED. The License provides additional details about | ||
* this warranty disclaimer. | ||
*/ | ||
|
||
#include "pcie.h" | ||
|
||
void mwifiex_initialize_quirks(struct pcie_service_card *card); |