mac80211: remove mtd-cal-data
authorRosen Penev <rosenp@gmail.com>
Sun, 9 Jun 2024 23:04:58 +0000 (16:04 -0700)
committerRobert Marko <robimarko@gmail.com>
Thu, 13 Jun 2024 16:10:27 +0000 (18:10 +0200)
All usages of mtd-cal-data have been removed. To avoid submissions that
rely on this deprecated behavior, remove it.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/15671
Signed-off-by: Robert Marko <robimarko@gmail.com>
package/kernel/mac80211/Makefile
package/kernel/mac80211/patches/ath9k/552-ath9k-ahb_of.patch

index 566cfdd7b2efcb738f16ba049da005ac330a09aa..79ef87b998facd4d48970d345ba6ceb5087b86e1 100644 (file)
@@ -11,7 +11,7 @@ include $(INCLUDE_DIR)/kernel.mk
 PKG_NAME:=mac80211
 
 PKG_VERSION:=6.6.15
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 PKG_LICENSE:=GPL-2.0-only
 PKG_LICENSE_FILES:=COPYING
 
index 637e607e366b5c590de0dffa7da51b46b90b99ba..29e66c070c30065791749678405f4c397d7efb87 100644 (file)
@@ -16,7 +16,7 @@
  
  static const struct platform_device_id ath9k_platform_id_table[] = {
        {
-@@ -69,6 +77,236 @@ static const struct ath_bus_ops ath_ahb_
+@@ -69,6 +77,192 @@ static const struct ath_bus_ops ath_ahb_
        .eeprom_read = ath_ahb_eeprom_read,
  };
  
 +#define QCA955X_DDR_CTL_CONFIG          0x108
 +#define QCA955X_DDR_CTL_CONFIG_ACT_WMAC BIT(23)
 +
-+static int of_get_wifi_cal(struct device_node *np, struct ath9k_platform_data *pdata)
-+{
-+#ifdef CONFIG_MTD
-+      struct device_node *mtd_np = NULL;
-+      size_t retlen;
-+      int size, ret;
-+      struct mtd_info *mtd;
-+      const char *part;
-+      const __be32 *list;
-+      phandle phandle;
-+
-+      list = of_get_property(np, "mtd-cal-data", &size);
-+      if (!list)
-+              return 0;
-+
-+      if (size != (2 * sizeof(*list)))
-+              return 1;
-+
-+      phandle = be32_to_cpup(list++);
-+      if (phandle)
-+              mtd_np = of_find_node_by_phandle(phandle);
-+
-+      if (!mtd_np)
-+              return 1;
-+
-+      part = of_get_property(mtd_np, "label", NULL);
-+      if (!part)
-+              part = mtd_np->name;
-+
-+      mtd = get_mtd_device_nm(part);
-+      if (IS_ERR(mtd))
-+              return 1;
-+
-+      ret = mtd_read(mtd, be32_to_cpup(list), sizeof(pdata->eeprom_data),
-+                      &retlen, (u8*)pdata->eeprom_data);
-+      put_mtd_device(mtd);
-+
-+#endif
-+      return 0;
-+}
-+
 +static int ar913x_wmac_reset(void)
 +{
 +      ath79_device_reset_set(AR913X_RESET_AMBA2WMAC);
 +
 +      pdata->get_mac_revision = data->soc_revision;
 +
-+      if (of_get_wifi_cal(pdev->dev.of_node, pdata))
-+              dev_err(&pdev->dev, "failed to load calibration data from mtd device\n");
-+
 +      return data->dev_id;
 +}
 +#endif