Update to version 6.14.11 Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
100 lines
2.7 KiB
Diff
100 lines
2.7 KiB
Diff
--- a/drivers/net/wireless/ath/ath9k/ahb.c
|
|
+++ b/drivers/net/wireless/ath/ath9k/ahb.c
|
|
@@ -16,37 +16,21 @@
|
|
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
*/
|
|
|
|
+#include <linux/mod_devicetable.h>
|
|
+#include <linux/module.h>
|
|
#include <linux/nl80211.h>
|
|
+#include <linux/of.h>
|
|
#include <linux/platform_device.h>
|
|
-#include <linux/module.h>
|
|
-#include <linux/mod_devicetable.h>
|
|
+
|
|
#include "ath9k.h"
|
|
|
|
-static const struct platform_device_id ath9k_platform_id_table[] = {
|
|
- {
|
|
- .name = "ath9k",
|
|
- .driver_data = AR5416_AR9100_DEVID,
|
|
- },
|
|
- {
|
|
- .name = "ar933x_wmac",
|
|
- .driver_data = AR9300_DEVID_AR9330,
|
|
- },
|
|
- {
|
|
- .name = "ar934x_wmac",
|
|
- .driver_data = AR9300_DEVID_AR9340,
|
|
- },
|
|
- {
|
|
- .name = "qca955x_wmac",
|
|
- .driver_data = AR9300_DEVID_QCA955X,
|
|
- },
|
|
- {
|
|
- .name = "qca953x_wmac",
|
|
- .driver_data = AR9300_DEVID_AR953X,
|
|
- },
|
|
- {
|
|
- .name = "qca956x_wmac",
|
|
- .driver_data = AR9300_DEVID_QCA956X,
|
|
- },
|
|
+static const struct of_device_id ath9k_of_match_table[] = {
|
|
+ { .compatible = "qca,ar9130-wifi", .data = (void *)AR5416_AR9100_DEVID },
|
|
+ { .compatible = "qca,ar9330-wifi", .data = (void *)AR9300_DEVID_AR9330 },
|
|
+ { .compatible = "qca,ar9340-wifi", .data = (void *)AR9300_DEVID_AR9340 },
|
|
+ { .compatible = "qca,qca9530-wifi", .data = (void *)AR9300_DEVID_AR953X },
|
|
+ { .compatible = "qca,qca9550-wifi", .data = (void *)AR9300_DEVID_QCA955X },
|
|
+ { .compatible = "qca,qca9560-wifi", .data = (void *)AR9300_DEVID_QCA956X },
|
|
{},
|
|
};
|
|
|
|
@@ -71,19 +55,14 @@ static const struct ath_bus_ops ath_ahb_
|
|
|
|
static int ath_ahb_probe(struct platform_device *pdev)
|
|
{
|
|
- void __iomem *mem;
|
|
- struct ath_softc *sc;
|
|
struct ieee80211_hw *hw;
|
|
- const struct platform_device_id *id = platform_get_device_id(pdev);
|
|
- int irq;
|
|
- int ret = 0;
|
|
+ struct ath_softc *sc;
|
|
struct ath_hw *ah;
|
|
+ void __iomem *mem;
|
|
char hw_name[64];
|
|
-
|
|
- if (!dev_get_platdata(&pdev->dev)) {
|
|
- dev_err(&pdev->dev, "no platform data specified\n");
|
|
- return -EINVAL;
|
|
- }
|
|
+ u16 dev_id;
|
|
+ int irq;
|
|
+ int ret;
|
|
|
|
mem = devm_platform_ioremap_resource(pdev, 0);
|
|
if (IS_ERR(mem)) {
|
|
@@ -117,7 +96,8 @@ static int ath_ahb_probe(struct platform
|
|
goto err_free_hw;
|
|
}
|
|
|
|
- ret = ath9k_init_device(id->driver_data, sc, &ath_ahb_bus_ops);
|
|
+ dev_id = (u16)(kernel_ulong_t)of_device_get_match_data(&pdev->dev);
|
|
+ ret = ath9k_init_device(dev_id, sc, &ath_ahb_bus_ops);
|
|
if (ret) {
|
|
dev_err(&pdev->dev, "failed to initialize device\n");
|
|
goto err_irq;
|
|
@@ -167,11 +147,11 @@ static struct platform_driver ath_ahb_dr
|
|
|
|
.driver = {
|
|
.name = "ath9k",
|
|
+ .of_match_table = ath9k_of_match_table,
|
|
},
|
|
- .id_table = ath9k_platform_id_table,
|
|
};
|
|
|
|
-MODULE_DEVICE_TABLE(platform, ath9k_platform_id_table);
|
|
+MODULE_DEVICE_TABLE(of, ath9k_of_match_table);
|
|
|
|
int ath_ahb_init(void)
|
|
{
|