rt2x00: rt2x00_rev() should return u32
PATCH 1/3 rt2x00: rt2x00_rev() should return u32
The "rev" field in chipset definition is an u32, which means that rt2x00_rev() which returns that field should be of the same type.
--- drivers/net/wireless/rt2x00/rt2x00.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/net/wireless/rt2x00/rt2x00.h +1 -1
@@ -868,7 +868,7 @@ static inline char rt2x00_rf(const struct rt2x00_chip *chipset, const u16 chip)return (chipset->rf == chip); } -static inline u16 rt2x00_rev (const struct rt2x00_chip *chipset) +static inline u32 rt2x00_rev (const struct rt2x00_chip *chipset) {return chipset->rev; }
Signature · 1 line
1.5.6.1
PATCH 2/3 rt2x00: Restrict firmware file lengths
Add extra security to the drivers for firmware loading, check the firmware file length before uploading it to the hardware. Incorrect lengths might indicate a firmware upgrade (which is not yet supported by the driver) or otherwise incorrect firmware.
--- drivers/net/wireless/rt2x00/rt61pci.c | 5 +++++ drivers/net/wireless/rt2x00/rt73usb.c | 5 +++++ 2 files changed, 10 insertions(+), 0 deletions(-)
drivers/net/wireless/rt2x00/rt61pci.c +5 -0
@@ -1199,6 +1199,11 @@ static int rt61pci_load_firmware(struct rt2x00_dev *rt2x00dev, const void *data,int i;u32 reg; +if (len !=8192 ) { +ERROR (rt2x00dev,"Invalid firmware file length (len=%zu)\n" , len); +return -ENOENT ; + } +/* * Wait for stable hardware. */
drivers/net/wireless/rt2x00/rt73usb.c +5 -0
@@ -1085,6 +1085,11 @@ static int rt73usb_load_firmware(struct rt2x00_dev *rt2x00dev, const void *data,int status;u32 reg; +if (len !=2048 ) { +ERROR (rt2x00dev,"Invalid firmware file length (len=%zu)\n" , len); +return -ENOENT ; + } +/* * Wait for stable hardware. */
Signature · 1 line
1.5.6.1
PATCH 3/3 rt2x00: Simplify suspend/resume handling
With mac80211 handling all open interfaces during
suspend and resume we can simplify suspend/resume
within rt2x00lib.
The only thing rt2x00 needs to do is free up memory during suspend and bring back the minimal required components during resume.
--- drivers/net/wireless/rt2x00/rt2x00.h | 1 - drivers/net/wireless/rt2x00/rt2x00dev.c | 93 ++----------------------------- 2 files changed, 5 insertions(+), 89 deletions(-)
drivers/net/wireless/rt2x00/rt2x00.h +0 -1
@@ -575,7 +575,6 @@ enum rt2x00_flags {DEVICE_STATE_REGISTERED_HW ,DEVICE_STATE_INITIALIZED ,DEVICE_STATE_STARTED , -DEVICE_STATE_STARTED_SUSPEND ,DEVICE_STATE_ENABLED_RADIO , DEVICE_STATE_DISABLED_RADIO_HW,
drivers/net/wireless/rt2x00/rt2x00dev.c +5 -88
137 lines not on this page · raw message
Signature · 1 line
1.5.6.1