Skip to content

Commit 8e711f6

Browse files
nehebrobimarko
authored andcommitted
mac80211: rt2x00: remove swap binding
No longer used. If swapping is desired, ralink,mtd-eeprom can be used. Otherwise nvmem. Signed-off-by: Rosen Penev <rosenp@gmail.com> Link: openwrt#22207 Signed-off-by: Robert Marko <robimarko@gmail.com>
1 parent 9269913 commit 8e711f6

3 files changed

Lines changed: 7 additions & 65 deletions

package/kernel/mac80211/patches/rt2x00/602-04-wifi-rt2x00-Support-EEPROM-swap-binding.patch

Lines changed: 0 additions & 44 deletions
This file was deleted.

package/kernel/mac80211/patches/rt2x00/602-05-wifi-rt2x00-support-loading-eeprom-from-NVMEM-cells.patch

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -21,27 +21,15 @@ Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2121

2222
--- a/drivers/net/wireless/ralink/rt2x00/rt2x00eeprom.c
2323
+++ b/drivers/net/wireless/ralink/rt2x00/rt2x00eeprom.c
24-
@@ -15,10 +15,10 @@
24+
@@ -15,6 +15,7 @@
2525
#include <linux/mtd/mtd.h>
2626
#include <linux/mtd/partitions.h>
2727
#endif
2828
+#include <linux/nvmem-consumer.h>
2929

3030
#include "rt2x00.h"
3131

32-
-#if IS_ENABLED(CONFIG_MTD)
33-
static void rt2800lib_eeprom_swap(struct rt2x00_dev *rt2x00dev)
34-
{
35-
struct device_node *np = rt2x00dev->dev->of_node;
36-
@@ -32,6 +32,7 @@ static void rt2800lib_eeprom_swap(struct
37-
rt2x00dev->eeprom[i] = swab16(rt2x00dev->eeprom[i]);
38-
}
39-
40-
+#if IS_ENABLED(CONFIG_MTD)
41-
static int rt2800lib_read_eeprom_mtd(struct rt2x00_dev *rt2x00dev)
42-
{
43-
struct device_node *np = rt2x00dev->dev->of_node, *mtd_np = NULL;
44-
@@ -85,6 +86,40 @@ static int rt2800lib_read_eeprom_mtd(str
32+
@@ -70,6 +71,38 @@ static int rt2800lib_read_eeprom_mtd(str
4533
}
4634
#endif
4735

@@ -72,8 +60,6 @@ Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
7260
+
7361
+ memcpy(rt2x00dev->eeprom, data, len);
7462
+
75-
+ rt2800lib_eeprom_swap(rt2x00dev);
76-
+
7763
+exit:
7864
+ kfree(data);
7965
+ return ret;
@@ -82,7 +68,7 @@ Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
8268
static const char *
8369
rt2x00lib_get_eeprom_file_name(struct rt2x00_dev *rt2x00dev)
8470
{
85-
@@ -152,6 +187,10 @@ int rt2x00lib_read_eeprom(struct rt2x00_
71+
@@ -137,6 +170,10 @@ int rt2x00lib_read_eeprom(struct rt2x00_
8672
return 0;
8773
#endif
8874

package/kernel/mac80211/patches/rt2x00/603-wifi-rt2x00-Add-support-for-loading-EEPROM-from-devicetree-embedded-data.patch

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ Signed-off-by: Coia Prant <coiaprant@gmail.com>
3535

3636
--- a/drivers/net/wireless/ralink/rt2x00/rt2x00eeprom.c
3737
+++ b/drivers/net/wireless/ralink/rt2x00/rt2x00eeprom.c
38-
@@ -32,6 +32,27 @@ static void rt2800lib_eeprom_swap(struct
39-
rt2x00dev->eeprom[i] = swab16(rt2x00dev->eeprom[i]);
40-
}
38+
@@ -19,6 +19,27 @@
39+
40+
#include "rt2x00.h"
4141

4242
+static int rt2800lib_read_eeprom_data(struct rt2x00_dev *rt2x00dev)
4343
+{
@@ -63,7 +63,7 @@ Signed-off-by: Coia Prant <coiaprant@gmail.com>
6363
#if IS_ENABLED(CONFIG_MTD)
6464
static int rt2800lib_read_eeprom_mtd(struct rt2x00_dev *rt2x00dev)
6565
{
66-
@@ -181,6 +202,10 @@ int rt2x00lib_read_eeprom(struct rt2x00_
66+
@@ -164,6 +185,10 @@ int rt2x00lib_read_eeprom(struct rt2x00_
6767
{
6868
int ret;
6969

0 commit comments

Comments
 (0)