Linux wireless drivers development
 help / color / mirror / Atom feed
* [PATCH] rtl818x: move rtl8180 and rtl8187 to separate subdirectories
From: John W. Linville @ 2010-12-20 20:22 UTC (permalink / raw)
  To: linux-wireless
  Cc: Herton Ronaldo Krzesinski, Hin-Tak Leung, Larry Finger,
	John W. Linville

These drivers share one header file, but nothing else.  Worse, both
drivers use the rtl8225 part with different register settings.  The
results has been some ugly naming -- let's simplify that.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
---
 drivers/net/wireless/rtl818x/Makefile              |    9 ++-------
 drivers/net/wireless/rtl818x/rtl8180/Makefile      |    5 +++++
 .../rtl818x/{rtl8180_dev.c => rtl8180/dev.c}       |    8 ++++----
 .../{rtl8180_grf5101.c => rtl8180/grf5101.c}       |    2 +-
 .../{rtl8180_grf5101.h => rtl8180/grf5101.h}       |    0
 .../{rtl8180_max2820.c => rtl8180/max2820.c}       |    2 +-
 .../{rtl8180_max2820.h => rtl8180/max2820.h}       |    0
 .../net/wireless/rtl818x/{ => rtl8180}/rtl8180.h   |    0
 .../{rtl8180_rtl8225.c => rtl8180/rtl8225.c}       |    2 +-
 .../{rtl8180_rtl8225.h => rtl8180/rtl8225.h}       |    0
 .../rtl818x/{rtl8180_sa2400.c => rtl8180/sa2400.c} |    2 +-
 .../rtl818x/{rtl8180_sa2400.h => rtl8180/sa2400.h} |    0
 drivers/net/wireless/rtl818x/rtl8187/Makefile      |    5 +++++
 .../rtl818x/{rtl8187_dev.c => rtl8187/dev.c}       |    6 +++---
 .../rtl818x/{rtl8187_leds.c => rtl8187/leds.c}     |    2 +-
 .../rtl818x/{rtl8187_leds.h => rtl8187/leds.h}     |    0
 .../rtl818x/{rtl8187_rfkill.c => rtl8187/rfkill.c} |    2 +-
 .../rtl818x/{rtl8187_rfkill.h => rtl8187/rfkill.h} |    0
 .../net/wireless/rtl818x/{ => rtl8187}/rtl8187.h   |    2 +-
 .../{rtl8187_rtl8225.c => rtl8187/rtl8225.c}       |    2 +-
 .../{rtl8187_rtl8225.h => rtl8187/rtl8225.h}       |    0
 21 files changed, 27 insertions(+), 22 deletions(-)
 create mode 100644 drivers/net/wireless/rtl818x/rtl8180/Makefile
 rename drivers/net/wireless/rtl818x/{rtl8180_dev.c => rtl8180/dev.c} (99%)
 rename drivers/net/wireless/rtl818x/{rtl8180_grf5101.c => rtl8180/grf5101.c} (99%)
 rename drivers/net/wireless/rtl818x/{rtl8180_grf5101.h => rtl8180/grf5101.h} (100%)
 rename drivers/net/wireless/rtl818x/{rtl8180_max2820.c => rtl8180/max2820.c} (99%)
 rename drivers/net/wireless/rtl818x/{rtl8180_max2820.h => rtl8180/max2820.h} (100%)
 rename drivers/net/wireless/rtl818x/{ => rtl8180}/rtl8180.h (100%)
 rename drivers/net/wireless/rtl818x/{rtl8180_rtl8225.c => rtl8180/rtl8225.c} (99%)
 rename drivers/net/wireless/rtl818x/{rtl8180_rtl8225.h => rtl8180/rtl8225.h} (100%)
 rename drivers/net/wireless/rtl818x/{rtl8180_sa2400.c => rtl8180/sa2400.c} (99%)
 rename drivers/net/wireless/rtl818x/{rtl8180_sa2400.h => rtl8180/sa2400.h} (100%)
 create mode 100644 drivers/net/wireless/rtl818x/rtl8187/Makefile
 rename drivers/net/wireless/rtl818x/{rtl8187_dev.c => rtl8187/dev.c} (99%)
 rename drivers/net/wireless/rtl818x/{rtl8187_leds.c => rtl8187/leds.c} (99%)
 rename drivers/net/wireless/rtl818x/{rtl8187_leds.h => rtl8187/leds.h} (100%)
 rename drivers/net/wireless/rtl818x/{rtl8187_rfkill.c => rtl8187/rfkill.c} (98%)
 rename drivers/net/wireless/rtl818x/{rtl8187_rfkill.h => rtl8187/rfkill.h} (100%)
 rename drivers/net/wireless/rtl818x/{ => rtl8187}/rtl8187.h (99%)
 rename drivers/net/wireless/rtl818x/{rtl8187_rtl8225.c => rtl8187/rtl8225.c} (99%)
 rename drivers/net/wireless/rtl818x/{rtl8187_rtl8225.h => rtl8187/rtl8225.h} (100%)

diff --git a/drivers/net/wireless/rtl818x/Makefile b/drivers/net/wireless/rtl818x/Makefile
index 93cbfbe..9975690 100644
--- a/drivers/net/wireless/rtl818x/Makefile
+++ b/drivers/net/wireless/rtl818x/Makefile
@@ -1,7 +1,2 @@
-rtl8180-objs		:= rtl8180_dev.o rtl8180_rtl8225.o rtl8180_sa2400.o rtl8180_max2820.o rtl8180_grf5101.o
-rtl8187-objs		:= rtl8187_dev.o rtl8187_rtl8225.o rtl8187_leds.o rtl8187_rfkill.o
-
-obj-$(CONFIG_RTL8180)	+= rtl8180.o
-obj-$(CONFIG_RTL8187)	+= rtl8187.o
-
-
+obj-$(CONFIG_RTL8180)	+= rtl8180/
+obj-$(CONFIG_RTL8187)	+= rtl8187/
diff --git a/drivers/net/wireless/rtl818x/rtl8180/Makefile b/drivers/net/wireless/rtl818x/rtl8180/Makefile
new file mode 100644
index 0000000..cb4fb85
--- /dev/null
+++ b/drivers/net/wireless/rtl818x/rtl8180/Makefile
@@ -0,0 +1,5 @@
+rtl8180-objs		:= dev.o rtl8225.o sa2400.o max2820.o grf5101.o
+
+obj-$(CONFIG_RTL8180)	+= rtl8180.o
+
+ccflags-y += -Idrivers/net/wireless/rtl818x
diff --git a/drivers/net/wireless/rtl818x/rtl8180_dev.c b/drivers/net/wireless/rtl818x/rtl8180/dev.c
similarity index 99%
rename from drivers/net/wireless/rtl818x/rtl8180_dev.c
rename to drivers/net/wireless/rtl818x/rtl8180/dev.c
index 707c688..5851cbc 100644
--- a/drivers/net/wireless/rtl818x/rtl8180_dev.c
+++ b/drivers/net/wireless/rtl818x/rtl8180/dev.c
@@ -24,10 +24,10 @@
 #include <net/mac80211.h>
 
 #include "rtl8180.h"
-#include "rtl8180_rtl8225.h"
-#include "rtl8180_sa2400.h"
-#include "rtl8180_max2820.h"
-#include "rtl8180_grf5101.h"
+#include "rtl8225.h"
+#include "sa2400.h"
+#include "max2820.h"
+#include "grf5101.h"
 
 MODULE_AUTHOR("Michael Wu <flamingice@sourmilk.net>");
 MODULE_AUTHOR("Andrea Merello <andreamrl@tiscali.it>");
diff --git a/drivers/net/wireless/rtl818x/rtl8180_grf5101.c b/drivers/net/wireless/rtl818x/rtl8180/grf5101.c
similarity index 99%
rename from drivers/net/wireless/rtl818x/rtl8180_grf5101.c
rename to drivers/net/wireless/rtl818x/rtl8180/grf5101.c
index 5cab9df..5ee7589 100644
--- a/drivers/net/wireless/rtl818x/rtl8180_grf5101.c
+++ b/drivers/net/wireless/rtl818x/rtl8180/grf5101.c
@@ -25,7 +25,7 @@
 #include <net/mac80211.h>
 
 #include "rtl8180.h"
-#include "rtl8180_grf5101.h"
+#include "grf5101.h"
 
 static const int grf5101_encode[] = {
 	0x0, 0x8, 0x4, 0xC,
diff --git a/drivers/net/wireless/rtl818x/rtl8180_grf5101.h b/drivers/net/wireless/rtl818x/rtl8180/grf5101.h
similarity index 100%
rename from drivers/net/wireless/rtl818x/rtl8180_grf5101.h
rename to drivers/net/wireless/rtl818x/rtl8180/grf5101.h
diff --git a/drivers/net/wireless/rtl818x/rtl8180_max2820.c b/drivers/net/wireless/rtl818x/rtl8180/max2820.c
similarity index 99%
rename from drivers/net/wireless/rtl818x/rtl8180_max2820.c
rename to drivers/net/wireless/rtl818x/rtl8180/max2820.c
index 16c4655..667b336 100644
--- a/drivers/net/wireless/rtl818x/rtl8180_max2820.c
+++ b/drivers/net/wireless/rtl818x/rtl8180/max2820.c
@@ -24,7 +24,7 @@
 #include <net/mac80211.h>
 
 #include "rtl8180.h"
-#include "rtl8180_max2820.h"
+#include "max2820.h"
 
 static const u32 max2820_chan[] = {
 	12, /* CH 1 */
diff --git a/drivers/net/wireless/rtl818x/rtl8180_max2820.h b/drivers/net/wireless/rtl818x/rtl8180/max2820.h
similarity index 100%
rename from drivers/net/wireless/rtl818x/rtl8180_max2820.h
rename to drivers/net/wireless/rtl818x/rtl8180/max2820.h
diff --git a/drivers/net/wireless/rtl818x/rtl8180.h b/drivers/net/wireless/rtl818x/rtl8180/rtl8180.h
similarity index 100%
rename from drivers/net/wireless/rtl818x/rtl8180.h
rename to drivers/net/wireless/rtl818x/rtl8180/rtl8180.h
diff --git a/drivers/net/wireless/rtl818x/rtl8180_rtl8225.c b/drivers/net/wireless/rtl818x/rtl8180/rtl8225.c
similarity index 99%
rename from drivers/net/wireless/rtl818x/rtl8180_rtl8225.c
rename to drivers/net/wireless/rtl818x/rtl8180/rtl8225.c
index 69e4d47..7c4574b 100644
--- a/drivers/net/wireless/rtl818x/rtl8180_rtl8225.c
+++ b/drivers/net/wireless/rtl818x/rtl8180/rtl8225.c
@@ -21,7 +21,7 @@
 #include <net/mac80211.h>
 
 #include "rtl8180.h"
-#include "rtl8180_rtl8225.h"
+#include "rtl8225.h"
 
 static void rtl8225_write(struct ieee80211_hw *dev, u8 addr, u16 data)
 {
diff --git a/drivers/net/wireless/rtl818x/rtl8180_rtl8225.h b/drivers/net/wireless/rtl818x/rtl8180/rtl8225.h
similarity index 100%
rename from drivers/net/wireless/rtl818x/rtl8180_rtl8225.h
rename to drivers/net/wireless/rtl818x/rtl8180/rtl8225.h
diff --git a/drivers/net/wireless/rtl818x/rtl8180_sa2400.c b/drivers/net/wireless/rtl818x/rtl8180/sa2400.c
similarity index 99%
rename from drivers/net/wireless/rtl818x/rtl8180_sa2400.c
rename to drivers/net/wireless/rtl818x/rtl8180/sa2400.c
index d064fcc..44771a62 100644
--- a/drivers/net/wireless/rtl818x/rtl8180_sa2400.c
+++ b/drivers/net/wireless/rtl818x/rtl8180/sa2400.c
@@ -25,7 +25,7 @@
 #include <net/mac80211.h>
 
 #include "rtl8180.h"
-#include "rtl8180_sa2400.h"
+#include "sa2400.h"
 
 static const u32 sa2400_chan[] = {
 	0x00096c, /* ch1 */
diff --git a/drivers/net/wireless/rtl818x/rtl8180_sa2400.h b/drivers/net/wireless/rtl818x/rtl8180/sa2400.h
similarity index 100%
rename from drivers/net/wireless/rtl818x/rtl8180_sa2400.h
rename to drivers/net/wireless/rtl818x/rtl8180/sa2400.h
diff --git a/drivers/net/wireless/rtl818x/rtl8187/Makefile b/drivers/net/wireless/rtl818x/rtl8187/Makefile
new file mode 100644
index 0000000..7b62992
--- /dev/null
+++ b/drivers/net/wireless/rtl818x/rtl8187/Makefile
@@ -0,0 +1,5 @@
+rtl8187-objs		:= dev.o rtl8225.o leds.o rfkill.o
+
+obj-$(CONFIG_RTL8187)	+= rtl8187.o
+
+ccflags-y += -Idrivers/net/wireless/rtl818x
diff --git a/drivers/net/wireless/rtl818x/rtl8187_dev.c b/drivers/net/wireless/rtl818x/rtl8187/dev.c
similarity index 99%
rename from drivers/net/wireless/rtl818x/rtl8187_dev.c
rename to drivers/net/wireless/rtl818x/rtl8187/dev.c
index eeee244..6b82cac 100644
--- a/drivers/net/wireless/rtl818x/rtl8187_dev.c
+++ b/drivers/net/wireless/rtl818x/rtl8187/dev.c
@@ -29,11 +29,11 @@
 #include <net/mac80211.h>
 
 #include "rtl8187.h"
-#include "rtl8187_rtl8225.h"
+#include "rtl8225.h"
 #ifdef CONFIG_RTL8187_LEDS
-#include "rtl8187_leds.h"
+#include "leds.h"
 #endif
-#include "rtl8187_rfkill.h"
+#include "rfkill.h"
 
 MODULE_AUTHOR("Michael Wu <flamingice@sourmilk.net>");
 MODULE_AUTHOR("Andrea Merello <andreamrl@tiscali.it>");
diff --git a/drivers/net/wireless/rtl818x/rtl8187_leds.c b/drivers/net/wireless/rtl818x/rtl8187/leds.c
similarity index 99%
rename from drivers/net/wireless/rtl818x/rtl8187_leds.c
rename to drivers/net/wireless/rtl818x/rtl8187/leds.c
index 4637337..2e0de2f 100644
--- a/drivers/net/wireless/rtl818x/rtl8187_leds.c
+++ b/drivers/net/wireless/rtl818x/rtl8187/leds.c
@@ -20,7 +20,7 @@
 #include <linux/eeprom_93cx6.h>
 
 #include "rtl8187.h"
-#include "rtl8187_leds.h"
+#include "leds.h"
 
 static void led_turn_on(struct work_struct *work)
 {
diff --git a/drivers/net/wireless/rtl818x/rtl8187_leds.h b/drivers/net/wireless/rtl818x/rtl8187/leds.h
similarity index 100%
rename from drivers/net/wireless/rtl818x/rtl8187_leds.h
rename to drivers/net/wireless/rtl818x/rtl8187/leds.h
diff --git a/drivers/net/wireless/rtl818x/rtl8187_rfkill.c b/drivers/net/wireless/rtl818x/rtl8187/rfkill.c
similarity index 98%
rename from drivers/net/wireless/rtl818x/rtl8187_rfkill.c
rename to drivers/net/wireless/rtl818x/rtl8187/rfkill.c
index 03555e1..3411671 100644
--- a/drivers/net/wireless/rtl818x/rtl8187_rfkill.c
+++ b/drivers/net/wireless/rtl818x/rtl8187/rfkill.c
@@ -18,7 +18,7 @@
 #include <net/mac80211.h>
 
 #include "rtl8187.h"
-#include "rtl8187_rfkill.h"
+#include "rfkill.h"
 
 static bool rtl8187_is_radio_enabled(struct rtl8187_priv *priv)
 {
diff --git a/drivers/net/wireless/rtl818x/rtl8187_rfkill.h b/drivers/net/wireless/rtl818x/rtl8187/rfkill.h
similarity index 100%
rename from drivers/net/wireless/rtl818x/rtl8187_rfkill.h
rename to drivers/net/wireless/rtl818x/rtl8187/rfkill.h
diff --git a/drivers/net/wireless/rtl818x/rtl8187.h b/drivers/net/wireless/rtl818x/rtl8187/rtl8187.h
similarity index 99%
rename from drivers/net/wireless/rtl818x/rtl8187.h
rename to drivers/net/wireless/rtl818x/rtl8187/rtl8187.h
index 9887816..0d7b142 100644
--- a/drivers/net/wireless/rtl818x/rtl8187.h
+++ b/drivers/net/wireless/rtl818x/rtl8187/rtl8187.h
@@ -16,7 +16,7 @@
 #define RTL8187_H
 
 #include "rtl818x.h"
-#include "rtl8187_leds.h"
+#include "leds.h"
 
 #define RTL8187_EEPROM_TXPWR_BASE	0x05
 #define RTL8187_EEPROM_MAC_ADDR		0x07
diff --git a/drivers/net/wireless/rtl818x/rtl8187_rtl8225.c b/drivers/net/wireless/rtl818x/rtl8187/rtl8225.c
similarity index 99%
rename from drivers/net/wireless/rtl818x/rtl8187_rtl8225.c
rename to drivers/net/wireless/rtl818x/rtl8187/rtl8225.c
index 5c6666f..908903f 100644
--- a/drivers/net/wireless/rtl818x/rtl8187_rtl8225.c
+++ b/drivers/net/wireless/rtl818x/rtl8187/rtl8225.c
@@ -21,7 +21,7 @@
 #include <net/mac80211.h>
 
 #include "rtl8187.h"
-#include "rtl8187_rtl8225.h"
+#include "rtl8225.h"
 
 static void rtl8225_write_bitbang(struct ieee80211_hw *dev, u8 addr, u16 data)
 {
diff --git a/drivers/net/wireless/rtl818x/rtl8187_rtl8225.h b/drivers/net/wireless/rtl818x/rtl8187/rtl8225.h
similarity index 100%
rename from drivers/net/wireless/rtl818x/rtl8187_rtl8225.h
rename to drivers/net/wireless/rtl818x/rtl8187/rtl8225.h
-- 
1.7.3.3


^ permalink raw reply related

* [PATCH] rtl818x: move rtl8180 and rtl8187 to separate subdirectories
From: John W. Linville @ 2010-12-20 20:25 UTC (permalink / raw)
  To: linux-wireless
  Cc: Herton Ronaldo Krzesinski, Hin-Tak Leung, Larry Finger,
	John W. Linville

These drivers share one header file, but nothing else.  Worse, both
drivers use the rtl8225 part with different register settings.  The
results has been some ugly naming -- let's simplify that.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
---
 drivers/net/wireless/rtl818x/Makefile              |    9 ++-------
 drivers/net/wireless/rtl818x/rtl8180/Makefile      |    5 +++++
 .../rtl818x/{rtl8180_dev.c => rtl8180/dev.c}       |    8 ++++----
 .../{rtl8180_grf5101.c => rtl8180/grf5101.c}       |    2 +-
 .../{rtl8180_grf5101.h => rtl8180/grf5101.h}       |    0
 .../{rtl8180_max2820.c => rtl8180/max2820.c}       |    2 +-
 .../{rtl8180_max2820.h => rtl8180/max2820.h}       |    0
 .../net/wireless/rtl818x/{ => rtl8180}/rtl8180.h   |    0
 .../{rtl8180_rtl8225.c => rtl8180/rtl8225.c}       |    2 +-
 .../{rtl8180_rtl8225.h => rtl8180/rtl8225.h}       |    0
 .../rtl818x/{rtl8180_sa2400.c => rtl8180/sa2400.c} |    2 +-
 .../rtl818x/{rtl8180_sa2400.h => rtl8180/sa2400.h} |    0
 drivers/net/wireless/rtl818x/rtl8187/Makefile      |    5 +++++
 .../rtl818x/{rtl8187_dev.c => rtl8187/dev.c}       |    6 +++---
 .../rtl818x/{rtl8187_leds.c => rtl8187/leds.c}     |    2 +-
 .../rtl818x/{rtl8187_leds.h => rtl8187/leds.h}     |    0
 .../rtl818x/{rtl8187_rfkill.c => rtl8187/rfkill.c} |    2 +-
 .../rtl818x/{rtl8187_rfkill.h => rtl8187/rfkill.h} |    0
 .../net/wireless/rtl818x/{ => rtl8187}/rtl8187.h   |    2 +-
 .../{rtl8187_rtl8225.c => rtl8187/rtl8225.c}       |    2 +-
 .../{rtl8187_rtl8225.h => rtl8187/rtl8225.h}       |    0
 21 files changed, 27 insertions(+), 22 deletions(-)
 create mode 100644 drivers/net/wireless/rtl818x/rtl8180/Makefile
 rename drivers/net/wireless/rtl818x/{rtl8180_dev.c => rtl8180/dev.c} (99%)
 rename drivers/net/wireless/rtl818x/{rtl8180_grf5101.c => rtl8180/grf5101.c} (99%)
 rename drivers/net/wireless/rtl818x/{rtl8180_grf5101.h => rtl8180/grf5101.h} (100%)
 rename drivers/net/wireless/rtl818x/{rtl8180_max2820.c => rtl8180/max2820.c} (99%)
 rename drivers/net/wireless/rtl818x/{rtl8180_max2820.h => rtl8180/max2820.h} (100%)
 rename drivers/net/wireless/rtl818x/{ => rtl8180}/rtl8180.h (100%)
 rename drivers/net/wireless/rtl818x/{rtl8180_rtl8225.c => rtl8180/rtl8225.c} (99%)
 rename drivers/net/wireless/rtl818x/{rtl8180_rtl8225.h => rtl8180/rtl8225.h} (100%)
 rename drivers/net/wireless/rtl818x/{rtl8180_sa2400.c => rtl8180/sa2400.c} (99%)
 rename drivers/net/wireless/rtl818x/{rtl8180_sa2400.h => rtl8180/sa2400.h} (100%)
 create mode 100644 drivers/net/wireless/rtl818x/rtl8187/Makefile
 rename drivers/net/wireless/rtl818x/{rtl8187_dev.c => rtl8187/dev.c} (99%)
 rename drivers/net/wireless/rtl818x/{rtl8187_leds.c => rtl8187/leds.c} (99%)
 rename drivers/net/wireless/rtl818x/{rtl8187_leds.h => rtl8187/leds.h} (100%)
 rename drivers/net/wireless/rtl818x/{rtl8187_rfkill.c => rtl8187/rfkill.c} (98%)
 rename drivers/net/wireless/rtl818x/{rtl8187_rfkill.h => rtl8187/rfkill.h} (100%)
 rename drivers/net/wireless/rtl818x/{ => rtl8187}/rtl8187.h (99%)
 rename drivers/net/wireless/rtl818x/{rtl8187_rtl8225.c => rtl8187/rtl8225.c} (99%)
 rename drivers/net/wireless/rtl818x/{rtl8187_rtl8225.h => rtl8187/rtl8225.h} (100%)

diff --git a/drivers/net/wireless/rtl818x/Makefile b/drivers/net/wireless/rtl818x/Makefile
index 93cbfbe..9975690 100644
--- a/drivers/net/wireless/rtl818x/Makefile
+++ b/drivers/net/wireless/rtl818x/Makefile
@@ -1,7 +1,2 @@
-rtl8180-objs		:= rtl8180_dev.o rtl8180_rtl8225.o rtl8180_sa2400.o rtl8180_max2820.o rtl8180_grf5101.o
-rtl8187-objs		:= rtl8187_dev.o rtl8187_rtl8225.o rtl8187_leds.o rtl8187_rfkill.o
-
-obj-$(CONFIG_RTL8180)	+= rtl8180.o
-obj-$(CONFIG_RTL8187)	+= rtl8187.o
-
-
+obj-$(CONFIG_RTL8180)	+= rtl8180/
+obj-$(CONFIG_RTL8187)	+= rtl8187/
diff --git a/drivers/net/wireless/rtl818x/rtl8180/Makefile b/drivers/net/wireless/rtl818x/rtl8180/Makefile
new file mode 100644
index 0000000..cb4fb85
--- /dev/null
+++ b/drivers/net/wireless/rtl818x/rtl8180/Makefile
@@ -0,0 +1,5 @@
+rtl8180-objs		:= dev.o rtl8225.o sa2400.o max2820.o grf5101.o
+
+obj-$(CONFIG_RTL8180)	+= rtl8180.o
+
+ccflags-y += -Idrivers/net/wireless/rtl818x
diff --git a/drivers/net/wireless/rtl818x/rtl8180_dev.c b/drivers/net/wireless/rtl818x/rtl8180/dev.c
similarity index 99%
rename from drivers/net/wireless/rtl818x/rtl8180_dev.c
rename to drivers/net/wireless/rtl818x/rtl8180/dev.c
index 707c688..5851cbc 100644
--- a/drivers/net/wireless/rtl818x/rtl8180_dev.c
+++ b/drivers/net/wireless/rtl818x/rtl8180/dev.c
@@ -24,10 +24,10 @@
 #include <net/mac80211.h>
 
 #include "rtl8180.h"
-#include "rtl8180_rtl8225.h"
-#include "rtl8180_sa2400.h"
-#include "rtl8180_max2820.h"
-#include "rtl8180_grf5101.h"
+#include "rtl8225.h"
+#include "sa2400.h"
+#include "max2820.h"
+#include "grf5101.h"
 
 MODULE_AUTHOR("Michael Wu <flamingice@sourmilk.net>");
 MODULE_AUTHOR("Andrea Merello <andreamrl@tiscali.it>");
diff --git a/drivers/net/wireless/rtl818x/rtl8180_grf5101.c b/drivers/net/wireless/rtl818x/rtl8180/grf5101.c
similarity index 99%
rename from drivers/net/wireless/rtl818x/rtl8180_grf5101.c
rename to drivers/net/wireless/rtl818x/rtl8180/grf5101.c
index 5cab9df..5ee7589 100644
--- a/drivers/net/wireless/rtl818x/rtl8180_grf5101.c
+++ b/drivers/net/wireless/rtl818x/rtl8180/grf5101.c
@@ -25,7 +25,7 @@
 #include <net/mac80211.h>
 
 #include "rtl8180.h"
-#include "rtl8180_grf5101.h"
+#include "grf5101.h"
 
 static const int grf5101_encode[] = {
 	0x0, 0x8, 0x4, 0xC,
diff --git a/drivers/net/wireless/rtl818x/rtl8180_grf5101.h b/drivers/net/wireless/rtl818x/rtl8180/grf5101.h
similarity index 100%
rename from drivers/net/wireless/rtl818x/rtl8180_grf5101.h
rename to drivers/net/wireless/rtl818x/rtl8180/grf5101.h
diff --git a/drivers/net/wireless/rtl818x/rtl8180_max2820.c b/drivers/net/wireless/rtl818x/rtl8180/max2820.c
similarity index 99%
rename from drivers/net/wireless/rtl818x/rtl8180_max2820.c
rename to drivers/net/wireless/rtl818x/rtl8180/max2820.c
index 16c4655..667b336 100644
--- a/drivers/net/wireless/rtl818x/rtl8180_max2820.c
+++ b/drivers/net/wireless/rtl818x/rtl8180/max2820.c
@@ -24,7 +24,7 @@
 #include <net/mac80211.h>
 
 #include "rtl8180.h"
-#include "rtl8180_max2820.h"
+#include "max2820.h"
 
 static const u32 max2820_chan[] = {
 	12, /* CH 1 */
diff --git a/drivers/net/wireless/rtl818x/rtl8180_max2820.h b/drivers/net/wireless/rtl818x/rtl8180/max2820.h
similarity index 100%
rename from drivers/net/wireless/rtl818x/rtl8180_max2820.h
rename to drivers/net/wireless/rtl818x/rtl8180/max2820.h
diff --git a/drivers/net/wireless/rtl818x/rtl8180.h b/drivers/net/wireless/rtl818x/rtl8180/rtl8180.h
similarity index 100%
rename from drivers/net/wireless/rtl818x/rtl8180.h
rename to drivers/net/wireless/rtl818x/rtl8180/rtl8180.h
diff --git a/drivers/net/wireless/rtl818x/rtl8180_rtl8225.c b/drivers/net/wireless/rtl818x/rtl8180/rtl8225.c
similarity index 99%
rename from drivers/net/wireless/rtl818x/rtl8180_rtl8225.c
rename to drivers/net/wireless/rtl818x/rtl8180/rtl8225.c
index 69e4d47..7c4574b 100644
--- a/drivers/net/wireless/rtl818x/rtl8180_rtl8225.c
+++ b/drivers/net/wireless/rtl818x/rtl8180/rtl8225.c
@@ -21,7 +21,7 @@
 #include <net/mac80211.h>
 
 #include "rtl8180.h"
-#include "rtl8180_rtl8225.h"
+#include "rtl8225.h"
 
 static void rtl8225_write(struct ieee80211_hw *dev, u8 addr, u16 data)
 {
diff --git a/drivers/net/wireless/rtl818x/rtl8180_rtl8225.h b/drivers/net/wireless/rtl818x/rtl8180/rtl8225.h
similarity index 100%
rename from drivers/net/wireless/rtl818x/rtl8180_rtl8225.h
rename to drivers/net/wireless/rtl818x/rtl8180/rtl8225.h
diff --git a/drivers/net/wireless/rtl818x/rtl8180_sa2400.c b/drivers/net/wireless/rtl818x/rtl8180/sa2400.c
similarity index 99%
rename from drivers/net/wireless/rtl818x/rtl8180_sa2400.c
rename to drivers/net/wireless/rtl818x/rtl8180/sa2400.c
index d064fcc..44771a62 100644
--- a/drivers/net/wireless/rtl818x/rtl8180_sa2400.c
+++ b/drivers/net/wireless/rtl818x/rtl8180/sa2400.c
@@ -25,7 +25,7 @@
 #include <net/mac80211.h>
 
 #include "rtl8180.h"
-#include "rtl8180_sa2400.h"
+#include "sa2400.h"
 
 static const u32 sa2400_chan[] = {
 	0x00096c, /* ch1 */
diff --git a/drivers/net/wireless/rtl818x/rtl8180_sa2400.h b/drivers/net/wireless/rtl818x/rtl8180/sa2400.h
similarity index 100%
rename from drivers/net/wireless/rtl818x/rtl8180_sa2400.h
rename to drivers/net/wireless/rtl818x/rtl8180/sa2400.h
diff --git a/drivers/net/wireless/rtl818x/rtl8187/Makefile b/drivers/net/wireless/rtl818x/rtl8187/Makefile
new file mode 100644
index 0000000..7b62992
--- /dev/null
+++ b/drivers/net/wireless/rtl818x/rtl8187/Makefile
@@ -0,0 +1,5 @@
+rtl8187-objs		:= dev.o rtl8225.o leds.o rfkill.o
+
+obj-$(CONFIG_RTL8187)	+= rtl8187.o
+
+ccflags-y += -Idrivers/net/wireless/rtl818x
diff --git a/drivers/net/wireless/rtl818x/rtl8187_dev.c b/drivers/net/wireless/rtl818x/rtl8187/dev.c
similarity index 99%
rename from drivers/net/wireless/rtl818x/rtl8187_dev.c
rename to drivers/net/wireless/rtl818x/rtl8187/dev.c
index eeee244..6b82cac 100644
--- a/drivers/net/wireless/rtl818x/rtl8187_dev.c
+++ b/drivers/net/wireless/rtl818x/rtl8187/dev.c
@@ -29,11 +29,11 @@
 #include <net/mac80211.h>
 
 #include "rtl8187.h"
-#include "rtl8187_rtl8225.h"
+#include "rtl8225.h"
 #ifdef CONFIG_RTL8187_LEDS
-#include "rtl8187_leds.h"
+#include "leds.h"
 #endif
-#include "rtl8187_rfkill.h"
+#include "rfkill.h"
 
 MODULE_AUTHOR("Michael Wu <flamingice@sourmilk.net>");
 MODULE_AUTHOR("Andrea Merello <andreamrl@tiscali.it>");
diff --git a/drivers/net/wireless/rtl818x/rtl8187_leds.c b/drivers/net/wireless/rtl818x/rtl8187/leds.c
similarity index 99%
rename from drivers/net/wireless/rtl818x/rtl8187_leds.c
rename to drivers/net/wireless/rtl818x/rtl8187/leds.c
index 4637337..2e0de2f 100644
--- a/drivers/net/wireless/rtl818x/rtl8187_leds.c
+++ b/drivers/net/wireless/rtl818x/rtl8187/leds.c
@@ -20,7 +20,7 @@
 #include <linux/eeprom_93cx6.h>
 
 #include "rtl8187.h"
-#include "rtl8187_leds.h"
+#include "leds.h"
 
 static void led_turn_on(struct work_struct *work)
 {
diff --git a/drivers/net/wireless/rtl818x/rtl8187_leds.h b/drivers/net/wireless/rtl818x/rtl8187/leds.h
similarity index 100%
rename from drivers/net/wireless/rtl818x/rtl8187_leds.h
rename to drivers/net/wireless/rtl818x/rtl8187/leds.h
diff --git a/drivers/net/wireless/rtl818x/rtl8187_rfkill.c b/drivers/net/wireless/rtl818x/rtl8187/rfkill.c
similarity index 98%
rename from drivers/net/wireless/rtl818x/rtl8187_rfkill.c
rename to drivers/net/wireless/rtl818x/rtl8187/rfkill.c
index 03555e1..3411671 100644
--- a/drivers/net/wireless/rtl818x/rtl8187_rfkill.c
+++ b/drivers/net/wireless/rtl818x/rtl8187/rfkill.c
@@ -18,7 +18,7 @@
 #include <net/mac80211.h>
 
 #include "rtl8187.h"
-#include "rtl8187_rfkill.h"
+#include "rfkill.h"
 
 static bool rtl8187_is_radio_enabled(struct rtl8187_priv *priv)
 {
diff --git a/drivers/net/wireless/rtl818x/rtl8187_rfkill.h b/drivers/net/wireless/rtl818x/rtl8187/rfkill.h
similarity index 100%
rename from drivers/net/wireless/rtl818x/rtl8187_rfkill.h
rename to drivers/net/wireless/rtl818x/rtl8187/rfkill.h
diff --git a/drivers/net/wireless/rtl818x/rtl8187.h b/drivers/net/wireless/rtl818x/rtl8187/rtl8187.h
similarity index 99%
rename from drivers/net/wireless/rtl818x/rtl8187.h
rename to drivers/net/wireless/rtl818x/rtl8187/rtl8187.h
index 9887816..0d7b142 100644
--- a/drivers/net/wireless/rtl818x/rtl8187.h
+++ b/drivers/net/wireless/rtl818x/rtl8187/rtl8187.h
@@ -16,7 +16,7 @@
 #define RTL8187_H
 
 #include "rtl818x.h"
-#include "rtl8187_leds.h"
+#include "leds.h"
 
 #define RTL8187_EEPROM_TXPWR_BASE	0x05
 #define RTL8187_EEPROM_MAC_ADDR		0x07
diff --git a/drivers/net/wireless/rtl818x/rtl8187_rtl8225.c b/drivers/net/wireless/rtl818x/rtl8187/rtl8225.c
similarity index 99%
rename from drivers/net/wireless/rtl818x/rtl8187_rtl8225.c
rename to drivers/net/wireless/rtl818x/rtl8187/rtl8225.c
index 5c6666f..908903f 100644
--- a/drivers/net/wireless/rtl818x/rtl8187_rtl8225.c
+++ b/drivers/net/wireless/rtl818x/rtl8187/rtl8225.c
@@ -21,7 +21,7 @@
 #include <net/mac80211.h>
 
 #include "rtl8187.h"
-#include "rtl8187_rtl8225.h"
+#include "rtl8225.h"
 
 static void rtl8225_write_bitbang(struct ieee80211_hw *dev, u8 addr, u16 data)
 {
diff --git a/drivers/net/wireless/rtl818x/rtl8187_rtl8225.h b/drivers/net/wireless/rtl818x/rtl8187/rtl8225.h
similarity index 100%
rename from drivers/net/wireless/rtl818x/rtl8187_rtl8225.h
rename to drivers/net/wireless/rtl818x/rtl8187/rtl8225.h
-- 
1.7.3.3


^ permalink raw reply related

* Re: WL1271 chip
From: Elvis Dowson @ 2010-12-20 21:00 UTC (permalink / raw)
  To: Brzezowski, Karen; +Cc: linux-wireless@vger.kernel.org
In-Reply-To: <0826983CC0CB074798C42E77D8ACD07F01AEA8@pdtms1.pdt.com>

Hi Karen,
                   
On Dec 20, 2010, at 9:12 PM, Brzezowski, Karen wrote:

> I looked at arch/arm/mach-omap2/board-zoom-peripherals.c file..
> I didn't see anything specific to SDIO..

I'm attaching a patch that integrates the Murata WL1271 chip with the MMC2 SDIO
controller for the BeagleBoard. You can try to adapt this for you iMX platform.

> I was looking at linux-2.6.36.2..
> Is this the correct version to look at?

You will have to use linux-2.6.37-rc6 or higher for mainline kernel support for the
wl1271 device.

You will also need to ensure that you have the following kernel configuration options
are set:

CONFIG_REGULATOR_FIXED_VOLTAGE = y
CONFIG_WL12XX=m
CONFIG_WL1271=m
CONFIG_WL1271_SDIO=m
CONFIG_WL12XX_PLATFORM_DATA=y

Best regards,

Elvis Dowson


>From e84ded71b45aecd340ec6030a540d0305c43c82d Mon Sep 17 00:00:00 2001
From: Elvis Dowson <elvis.dowson@gmail.com>
Date: Fri, 17 Dec 2010 12:27:23 +0400
Subject: [PATCH] Add support for Murata wl1271 wlan module.

---
arch/arm/mach-omap2/Makefile                 |    1 +
arch/arm/mach-omap2/board-beagle20-wifi.c |   64 ++++++++++++++++++++++++++
arch/arm/mach-omap2/board-beagle20-wifi.h |   24 ++++++++++
arch/arm/mach-omap2/board-omap3beagle.c      |   62 +++++++++++++++++++++++++
4 files changed, 151 insertions(+), 0 deletions(-)
create mode 100644 arch/arm/mach-omap2/board-beagle20-wifi.c
create mode 100644 arch/arm/mach-omap2/board-beagle20-wifi.h

diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index 60e51bc..36f2b69 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -119,6 +119,7 @@ obj-$(CONFIG_MACH_OMAP_2430SDP)		+= board-2430sdp.o \
					   hsmmc.o
obj-$(CONFIG_MACH_OMAP_APOLLON)		+= board-apollon.o
obj-$(CONFIG_MACH_OMAP3_BEAGLE)		+= board-omap3beagle.o \
+					   board-beagle20-wifi.o \
					   hsmmc.o
obj-$(CONFIG_MACH_DEVKIT8000)     	+= board-devkit8000.o \
                                           hsmmc.o
diff --git a/arch/arm/mach-omap2/board-beagle20-wifi.c b/arch/arm/mach-omap2/board-beagle20-wifi.c
new file mode 100644
index 0000000..4f75e2d
--- /dev/null
+++ b/arch/arm/mach-omap2/board-beagle20-wifi.c
@@ -0,0 +1,64 @@
+/*
+ * linux/arch/arm/mach-omap2/board-beagle20-wifi.c
+ *
+ *
+ *
+ * Copyright (C) 2010 Texas Instruments Inc.
+ *
+ * Author :
+ *	Elvis Dowson <elvis.dowson@gmail.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/platform_device.h>
+#include <linux/clk.h>
+#include <linux/debugfs.h>
+#include <linux/delay.h>
+#include <linux/err.h>
+
+#include <linux/mmc/host.h>
+#include <linux/mmc/sdio_ids.h>
+
+#include <linux/gpio.h>
+
+#include "board-beagle20-wifi.h"
+#include "mux.h"
+
+void wlan_mux_init(void)
+{
+    pr_info("%s: Configuring mux settings for wl1271 wlan module\n", __func__);
+
+    /* OMAP_BEAGLE20_WIFI_PMENA_GPIO and OMAP_BEAGLE20_WIFI_IRQ_GPIO */
+	omap_mux_init_gpio(OMAP_BEAGLE20_WIFI_PMENA_GPIO, OMAP_PIN_OUTPUT);
+	omap_mux_init_gpio(OMAP_BEAGLE20_WIFI_IRQ_GPIO,   OMAP_PIN_INPUT_PULLUP);
+
+	/*
+	 * MMC2 pin mux settings.
+	 *
+	 * The pix mux strings can be found in /arch/arm/mach-omap2/mux34xx.c
+	 *
+	 * Refer the TI OMAP 35x Technical Reference Manual (Rev.D), page 840
+	 * for the following example.
+	 *
+	 * If the string name is “xxx.yyy”
+	 * xxx – is the name of the default mode of the pad, usually Mode 0
+	 *       as described in the TRM.
+	 * yyy – is the pin on that pad you want to select.
+	 *
+	 * For example, MMC3 CLK line ("sdmmc3_clk")  can be brought out in
+	 * 2 places ("mcspi1_cs2" and "etk_clk").
+	 *
+	 */
+	omap_mux_init_signal("sdmmc2_clk.sdmmc2_clk", 	OMAP_PIN_INPUT_PULLUP);
+	omap_mux_init_signal("sdmmc2_cmd.sdmmc2_cmd", 	OMAP_PIN_INPUT_PULLUP);
+	omap_mux_init_signal("sdmmc2_dat0.sdmmc2_dat0", OMAP_PIN_INPUT_PULLUP);
+	omap_mux_init_signal("sdmmc2_dat1.sdmmc2_dat1", OMAP_PIN_INPUT_PULLUP);
+	omap_mux_init_signal("sdmmc2_dat2.sdmmc2_dat2", OMAP_PIN_INPUT_PULLUP);
+	omap_mux_init_signal("sdmmc2_dat3.sdmmc2_dat3", OMAP_PIN_INPUT_PULLUP);
+}
+
diff --git a/arch/arm/mach-omap2/board-beagle20-wifi.h b/arch/arm/mach-omap2/board-beagle20-wifi.h
new file mode 100644
index 0000000..5ce7df2
--- /dev/null
+++ b/arch/arm/mach-omap2/board-beagle20-wifi.h
@@ -0,0 +1,24 @@
+/*
+ * linux/arch/arm/mach-omap2/board-beagle20-wifi.h
+ *
+ * 
+ *
+ * Copyright (C) 2010 Texas Instruments Inc.
+ *
+ * Author :
+ *	Elvis Dowson <elvis.dowson@gmail.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#ifndef BOARD_BEAGLE20_WIFI_H_
+#define BOARD_BEAGLE20_WIFI_H_
+
+#define OMAP_BEAGLE20_WIFI_PMENA_GPIO 139     /* Murata TI WL1271 WLAN module enable GPIO */
+#define OMAP_BEAGLE20_WIFI_IRQ_GPIO   137     /* Murata TI WL1271 WLAN module IRQ GPIO */
+
+void wlan_mux_init(void);
+
+#endif /* BOARD_BEAGLE20_WIFI_H_ */
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
index 50af879..6d1fcd6 100644
--- a/arch/arm/mach-omap2/board-omap3beagle.c
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
@@ -30,7 +30,9 @@
#include <linux/mmc/host.h>

#include <linux/regulator/machine.h>
+#include <linux/regulator/fixed.h>
#include <linux/i2c/twl.h>
+#include <linux/wl12xx.h>

#include <mach/hardware.h>
#include <asm/mach-types.h>
@@ -45,6 +47,7 @@
#include <plat/nand.h>
#include <plat/usb.h>

+#include "board-beagle20-wifi.h"
#include "mux.h"
#include "hsmmc.h"
#include "timer-gp.h"
@@ -166,6 +169,14 @@ static struct omap2_hsmmc_info mmc[] = {
		.gpio_cd	= -EINVAL,
		.gpio_wp	= -EINVAL,
	},
+	{
+		.name		= "wl1271",
+		.mmc		= 2,
+		.caps		= MMC_CAP_4_BIT_DATA | MMC_CAP_POWER_OFF_CARD,
+		.gpio_wp	= -EINVAL,
+		.gpio_cd	= -EINVAL,
+		.nonremovable	= true,
+	},
	{}	/* Terminator */
};

@@ -177,6 +188,10 @@ static struct regulator_consumer_supply beagle_vsim_supply = {
	.supply			= "vmmc_aux",
};

+static struct regulator_consumer_supply beagle_vmmc2_supply = {
+	.supply			= "vmmc",
+};
+
static struct gpio_led gpio_leds[];

static int beagle_twl_gpio_setup(struct device *dev,
@@ -187,6 +202,7 @@ static int beagle_twl_gpio_setup(struct device *dev,
	/* link regulators to MMC adapters */
	beagle_vmmc1_supply.dev = mmc[0].dev;
	beagle_vsim_supply.dev = mmc[0].dev;
+	beagle_vmmc2_supply.dev = mmc[1].dev;

	return 0;
}
@@ -217,6 +233,21 @@ static struct regulator_init_data beagle_vmmc1 = {
	.consumer_supplies	= &beagle_vmmc1_supply,
};

+/* VMMC2 for MMC2 card */
+static struct regulator_init_data beagle_vmmc2 = {
+	.constraints = {
+		.min_uV			= 1850000,
+		.max_uV			= 1850000,
+		.apply_uV		= true,
+		.valid_modes_mask	= REGULATOR_MODE_NORMAL
+					| REGULATOR_MODE_STANDBY,
+		.valid_ops_mask		= REGULATOR_CHANGE_MODE
+					| REGULATOR_CHANGE_STATUS,
+	},
+	.num_consumer_supplies  = 1,
+	.consumer_supplies      = &beagle_vmmc2_supply,
+};
+
/* VSIM for MMC1 pins DAT4..DAT7 (2 mA, plus card == max 50 mA) */
static struct regulator_init_data beagle_vsim = {
	.constraints = {
@@ -261,6 +292,31 @@ static struct regulator_init_data beagle_vpll2 = {
	.consumer_supplies	= &beagle_vdvi_supply,
};

+/* Fixed voltage regulator for wlan module */
+static struct fixed_voltage_config beagle_vwlan = {
+	.supply_name		= "vwl1271",
+	.microvolts		= 1850000, /* 1.8V */
+	.gpio			= OMAP_BEAGLE20_WIFI_PMENA_GPIO,
+	.startup_delay		= 70000, /* 70msec */
+	.enable_high		= 1,
+	.enabled_at_boot	= 0,
+	.init_data		= &beagle_vmmc2,
+};
+
+static struct platform_device omap_vwlan_device = {
+	.name		= "reg-fixed-voltage",
+	.id		= 1,
+	.dev = {
+		.platform_data	= &beagle_vwlan,
+	},
+};
+
+struct wl12xx_platform_data omap_beagle_wlan_data __initdata = {
+	.irq = OMAP_GPIO_IRQ(OMAP_BEAGLE20_WIFI_IRQ_GPIO),
+	/* ZOOM ref clock is 26 MHz */
+	.board_ref_clock = 1,
+};
+
static struct twl4030_usb_data beagle_usb_data = {
	.usb_mode	= T2_USB_MODE_ULPI,
};
@@ -455,6 +511,12 @@ static void __init omap3_beagle_init(void)
	omap_mux_init_signal("sdrc_cke1", OMAP_PIN_OUTPUT);

	beagle_display_init();
+
+	/* wl12xx wlan module */
+	wlan_mux_init();
+	if (wl12xx_set_platform_data(&omap_beagle_wlan_data))
+		pr_err("error setting wl12xx data\n");
+	platform_device_register(&omap_vwlan_device);
}

MACHINE_START(OMAP3_BEAGLE, "Custom BeagleBoard 2.0")
-- 
1.7.0.4




^ permalink raw reply related

* WL1271
From: David Lynch Jr. @ 2010-12-20 21:04 UTC (permalink / raw)
  To: linux-wireless
In-Reply-To: <0826983CC0CB074798C42E77D8ACD07F01AEA8@pdtms1.pdt.com>

	I am looking to get the TI WL1271 WiFi working in an Android Froyo
system. 
	I have Linux kernel experience including network and wifi drivers. 
	I am gathering that there are atleast two different efforts to support
the TI1271 one based on the normal Linux kernel development process and
one that seems to be part of the TI Android community. 
	Can anyone comment on the relative merits of these approaches ?

	Is it reasonable to assume that if I add the WL1271 to the Android
2.6.32 kernel tree using compat-wireless that it will properly integrate
with Android ? If not could someone point me towards resources specific
to Android's wireless implimentation ?

Thank You. 




-- 
Dave Lynch                                                  DLA Systems
Software Development:                                    Embedded Linux
717.587.7774           dhlii@dlasys.net    http://www.dlasys.net
Over 25 years' experience in platforms, languages, and technologies too
numerous to list.

"Any intelligent fool can make things bigger and more complex... It
takes a touch of genius - and a lot of courage to move in the opposite
direction."
Albert Einstein



^ permalink raw reply

* Re: [linux-pm] subtle pm_runtime_put_sync race and sdio functions
From: Rafael J. Wysocki @ 2010-12-20 21:17 UTC (permalink / raw)
  To: Alan Stern
  Cc: Ohad Ben-Cohen, linux-pm, Johannes Berg, linux-wireless,
	linux-mmc, Ido Yariv, Kevin Hilman
In-Reply-To: <Pine.LNX.4.44L0.1012192226270.31110-100000@netrider.rowland.org>

On Monday, December 20, 2010, Alan Stern wrote:
> On Sun, 19 Dec 2010, Rafael J. Wysocki wrote:
> 
> > That said, I think we may do something different that perhaps will make your
> > life somewhat easier.
> > 
> > Namely, if your driver doesn't implement any system suspend callbacks
> > (i.e. ->suspend(), ->resume(), ->freeze(), ->thaw() etc.) and it doesn't
> > want the analogous subsystem callbacks to be executed for the device, it will
> > make sense to flag the device as "runtime only", or something like this,
> > which make the PM core skip the device in dpm_suspend() etc.
> > 
> > In that case, if a device if flagged as "runtime only", we can avoid
> > calling pm_runtime_get_noirq() for it in dpm_prepare() and, analogously,
> > calling pm_runtime_put_sync() for it in dpm_complete().  However, we will have
> > to fail system suspend (or hibernation) if a "runtime only" device has the
> > power.runtime_auto flag unset.
> 
> Or more generally, if pm_runtime_suspended() doesn't return 'true' for 
> the device.

That's not necessary, because the device may be suspended using
pm_runtime_suspend() later than we check pm_runtime_suspended().

I'd use the "runtime only" (or perhaps better "no_dpm") flag as a declaration
(if set) that the device is going to be suspended with the help of "runtime"
callbacks and the driver takes the responsibility for getting things right.

> But if the device gets suspended asynchronously, this may 
> very well happen.  For example, an i2c device is originally runtime 
> suspended, but its device_suspend() call occurs at the same time as the 
> call for the RTC device, so the i2c device actually happens to be 
> resumed at that time in order to communicate with the RTC.
> 
> > So, I think we can add a "runtime only" flag working as described above.
> > I guess it will also help in the case I've been discussing with Kevin for some
> > time (i2c device using runtime PM used by an RTC in a semi-transparent
> > fashion).
> > 
> > Alan, what do you think?
> 
> I'm not sure.  In this situation, should we worry more that we usually
> do about the possibility of a runtime resume occurring after the device
> has gone through device_suspend()?  Or just depend on the driver to do
> everything correctly?

The latter.

Thanks,
Rafael

^ permalink raw reply

* Re: new stuff for 2.6.38 needs to be posted _now_
From: Sedat Dilek @ 2010-12-20 21:22 UTC (permalink / raw)
  To: John W. Linville; +Cc: linux-wireless, David Miller
In-Reply-To: <20101220193003.GC10104@tuxdriver.com>

On Mon, Dec 20, 2010 at 8:30 PM, John W. Linville
<linville@tuxdriver.com> wrote:
> You may have noticed that Linus has released 2.6.37-rc6.  So, the
> merge window is around the corner!
>
> For those that need a reminder, the opening of the merge window is a
> _deadline_ for new features.  Once the merge window opens, only fixes
> will be accepted for 2.6.38.  In fact, any non-fix patches need to
> already be in wireless-next-2.6 when the merge window opens if you want
> them in 2.6.38.  That means you need to get them posted _now_, so they
> can be reviewed and I can find time to merge them before the deadline.
>
> You have been warned...this means you!
>
> --
> John W. Linville                Someday the world will need a hero, and you
> linville@tuxdriver.com                  might be all we have.  Be ready.
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

Is it possible to give an overview of the current status of
linux-wireless development going into 2.6.38?
New features, bigger bugfixes, new drivers, etc.?
For the drivers part you could trigger the driver maintainer(s)?
Also, it would be nice to read from user-space news like
wpa_supplicant, iw, crda & wireless-regdb, etc. related to the changes
to linux-wireless (for example you should install iw in version XYZ to
have support for new features of your driver ABC).
I have seen cool overviews from David Miller for net-2.6, regularly
also from rcX to rcX+1.
This is also some sort of documenting the development in your sub-trees.

Personally, I am very interested in power-management topic (my
hardware is ath5k and iwl3945 currently), but I am planning to upgrade
to 802.11N (router and wlan device).

- Sedat -

^ permalink raw reply

* Re: WL1271
From: Elvis Dowson @ 2010-12-20 21:31 UTC (permalink / raw)
  To: David Lynch Jr.; +Cc: linux-wireless
In-Reply-To: <1292879085.20560.6.camel@t-dhlii>

Hi,

On Dec 21, 2010, at 1:04 AM, David Lynch Jr. wrote:

> 	I am looking to get the TI WL1271 WiFi working in an Android Froyo
> system. 
> 	I have Linux kernel experience including network and wifi drivers. 
> 	I am gathering that there are atleast two different efforts to support
> the TI1271 one based on the normal Linux kernel development process and
> one that seems to be part of the TI Android community. 
> 	Can anyone comment on the relative merits of these approaches ?
> 
> 	Is it reasonable to assume that if I add the WL1271 to the Android
> 2.6.32 kernel tree using compat-wireless that it will properly integrate
> with Android ? If not could someone point me towards resources specific
> to Android's wireless implimentation ?

I too am working on the very same subject, which is to get the Murata
TI WL1271 chip working with Android 2.2.1.

Chip integration with the board was verified using the mainline wl1271
drivers (linux-2.6.37-rc6). 

With the proprietary TI drivers, I ran into issues getting it to work with my platform
so, while that issue is being addressed, in parallel, I am going to try to use
the compat-wireless package to get wl1271 working with android-2.6.32 and
android-2.2.1.

The only issue I see is I'm not sure if the mainline wl1271 driver currently supports
the android specific wireless commands, and its integration with wpa_supplicant
WEXT driver in the android repo. One could use the AWEXT wrapper core, in this
case, but it is something that I need to see once I get to that stage, in a couple of days.

Elvis Dowson

^ permalink raw reply

* Re: [PATCH] rtl818x: move rtl8180 and rtl8187 to separate subdirectories
From: Hin-Tak Leung @ 2010-12-20 21:34 UTC (permalink / raw)
  To: linux-wireless, John W. Linville
In-Reply-To: <1292876752-26842-1-git-send-email-linville@tuxdriver.com>

--- On Mon, 20/12/10, John W. Linville <linville@tuxdriver.com> wrote:

> These drivers share one header file,
> but nothing else.  Worse, both
> drivers use the rtl8225 part with different register
> settings.  The
> results has been some ugly naming -- let's simplify that.
> 
> Signed-off-by: John W. Linville <linville@tuxdriver.com>

Acked-by: Hin-Tak Leung <htl10@users.sourceforge.net>


Seems reasonable.


      

^ permalink raw reply

* Re: WL1271
From: Bob Copeland @ 2010-12-20 22:07 UTC (permalink / raw)
  To: David Lynch Jr., elvis.dowson; +Cc: linux-wireless
In-Reply-To: <1292879085.20560.6.camel@t-dhlii>

On Mon, Dec 20, 2010 at 4:04 PM, David Lynch Jr. <dhlii@dlasys.net> wrote:
>        Is it reasonable to assume that if I add the WL1271 to the Android
> 2.6.32 kernel tree using compat-wireless that it will properly integrate
> with Android ?

No; last I checked, Android has all kinds of hacks in the wext layer to
work with their UI.  But in the mainline, new features are added to nl80211
and wext is deprecated.

> If not could someone point me towards resources specific
> to Android's wireless implimentation ?

There's this, but it's a bit out of date:

    http://bobcopeland.com/android_wifi.html

Also I have a few Android ports/makefiles for wireless utitilies here:

    https://github.com/bcopeland

>From there, you can follow github forks and see what the community
is doing with them.

My two cents: it's easier to just use the Android code, but it's worth
a whole lot more in the long run to work towards a mainline-friendly,
nl80211-based wireless system.  That would make support of additional
mainline wireless drivers much easier.

-- 
Bob Copeland %% www.bobcopeland.com

^ permalink raw reply

* Re: [PATCH] rtl818x: move rtl8180 and rtl8187 to separate subdirectories
From: Larry Finger @ 2010-12-20 22:22 UTC (permalink / raw)
  To: htl10; +Cc: linux-wireless, John W. Linville
In-Reply-To: <22404.31613.qm@web29501.mail.ird.yahoo.com>

On 12/20/2010 03:34 PM, Hin-Tak Leung wrote:
> --- On Mon, 20/12/10, John W. Linville <linville@tuxdriver.com> wrote:
> 
>> These drivers share one header file,
>> but nothing else.  Worse, both
>> drivers use the rtl8225 part with different register
>> settings.  The
>> results has been some ugly naming -- let's simplify that.
>>
>> Signed-off-by: John W. Linville <linville@tuxdriver.com>
> 
> Acked-by: Hin-Tak Leung <htl10@users.sourceforge.net>
> 
> 
> Seems reasonable.

To me as well. In fact, this should cure a buglet that I have noticed in that
rtl8180 was rebuilt whenever rtl8187 was changed.

Larry

^ permalink raw reply

* Re: [PATCH] rtl818x: move rtl8180 and rtl8187 to separate subdirectories
From: Larry Finger @ 2010-12-21  0:29 UTC (permalink / raw)
  To: John W. Linville; +Cc: linux-wireless, Herton Ronaldo Krzesinski, Hin-Tak Leung
In-Reply-To: <1292876551-26749-1-git-send-email-linville@tuxdriver.com>

On 12/20/2010 02:22 PM, John W. Linville wrote:
> These drivers share one header file, but nothing else.  Worse, both
> drivers use the rtl8225 part with different register settings.  The
> results has been some ugly naming -- let's simplify that.
> 
> Signed-off-by: John W. Linville <linville@tuxdriver.com>
> ---

This is a good time to change this as I have heard from Realtek that their
RTL8187SE driver that uses mac80211 is running, but not yet stable. When it is,
a decision can be made if it should be in .../rtl818x/rtl8187/ or
.../rtl818x/rtl8187se/.

The new driver will also allow the staging driver to be removed.

Larry


^ permalink raw reply

* Re: [linux-pm] subtle pm_runtime_put_sync race and sdio functions
From: Alan Stern @ 2010-12-21  0:57 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Ohad Ben-Cohen, linux-pm, Johannes Berg, linux-wireless,
	linux-mmc, Ido Yariv, Kevin Hilman
In-Reply-To: <201012202217.09374.rjw@sisk.pl>

On Mon, 20 Dec 2010, Rafael J. Wysocki wrote:

> > > In that case, if a device if flagged as "runtime only", we can avoid
> > > calling pm_runtime_get_noirq() for it in dpm_prepare() and, analogously,
> > > calling pm_runtime_put_sync() for it in dpm_complete().  However, we will have
> > > to fail system suspend (or hibernation) if a "runtime only" device has the
> > > power.runtime_auto flag unset.
> > 
> > Or more generally, if pm_runtime_suspended() doesn't return 'true' for 
> > the device.
> 
> That's not necessary, because the device may be suspended using
> pm_runtime_suspend() later than we check pm_runtime_suspended().

What if the device has a child in the RPM_ACTIVE state?  Then 
pm_runtime_suspend() won't do anything, even if the child really is 
dpm-suspended.

> I'd use the "runtime only" (or perhaps better "no_dpm") flag as a declaration
> (if set) that the device is going to be suspended with the help of "runtime"
> callbacks and the driver takes the responsibility for getting things right.

I'm still not sure about this; the design isn't clear.  Are these
runtime callbacks going to come from the PM core or from the driver?  
If from the driver, how will the driver know when to issue them?  What
about coordinating async suspends (the device must be suspended after
its children and before its parent)?

Alan Stern


^ permalink raw reply

* [PATCH 1/7] wl1251: remove unnecessary import
From: Hauke Mehrtens @ 2010-12-21  1:01 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, Hauke Mehrtens, Kalle Valo
In-Reply-To: <1292893316-26694-1-git-send-email-hauke@hauke-m.de>

No function declared in gpio.h is used here.

CC: Kalle Valo <kvalo@adurom.com>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
 drivers/net/wireless/wl1251/boot.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/drivers/net/wireless/wl1251/boot.c b/drivers/net/wireless/wl1251/boot.c
index 61572df..d729daf 100644
--- a/drivers/net/wireless/wl1251/boot.c
+++ b/drivers/net/wireless/wl1251/boot.c
@@ -19,7 +19,6 @@
  *
  */
 
-#include <linux/gpio.h>
 #include <linux/slab.h>
 
 #include "reg.h"
-- 
1.7.1


^ permalink raw reply related

* [PATCH 0/7] Small patches from compat-wirelss for mainline
From: Hauke Mehrtens @ 2010-12-21  1:01 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, Hauke Mehrtens

These patches were in compat-wirelss and could go upstream, so we do not 
have to maintain them any more.

Hauke Mehrtens (7):
  wl1251: remove unnecessary import
  wl12xx: remove unnecessary import
  ssb: Use pci_is_pcie()
  rt2x00: Use pci_is_pcie()
  ath5k: Use pci_is_pcie()
  ath9k: Use pci_is_pcie()
  rtlwifi: Use pci_pcie_cap()

 drivers/net/wireless/ath/ath5k/attach.c |    2 +-
 drivers/net/wireless/ath/ath5k/reset.c  |    4 ++--
 drivers/net/wireless/ath/ath9k/pci.c    |    2 +-
 drivers/net/wireless/rt2x00/rt2x00pci.c |    2 +-
 drivers/net/wireless/rtlwifi/pci.c      |    2 +-
 drivers/net/wireless/wl1251/boot.c      |    1 -
 drivers/net/wireless/wl12xx/boot.c      |    1 -
 drivers/ssb/scan.c                      |    4 ++--
 8 files changed, 8 insertions(+), 10 deletions(-)


^ permalink raw reply

* [PATCH 2/7] wl12xx: remove unnecessary import
From: Hauke Mehrtens @ 2010-12-21  1:01 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, Hauke Mehrtens, Luciano Coelho
In-Reply-To: <1292893316-26694-1-git-send-email-hauke@hauke-m.de>

No function declared in gpio.h is used here.

CC: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
 drivers/net/wireless/wl12xx/boot.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/drivers/net/wireless/wl12xx/boot.c b/drivers/net/wireless/wl12xx/boot.c
index 4a9f929..4df04f8 100644
--- a/drivers/net/wireless/wl12xx/boot.c
+++ b/drivers/net/wireless/wl12xx/boot.c
@@ -21,7 +21,6 @@
  *
  */
 
-#include <linux/gpio.h>
 #include <linux/slab.h>
 
 #include "acx.h"
-- 
1.7.1


^ permalink raw reply related

* [PATCH 3/7] ssb: Use pci_is_pcie()
From: Hauke Mehrtens @ 2010-12-21  1:01 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, Hauke Mehrtens, Michael Buesch
In-Reply-To: <1292893316-26694-1-git-send-email-hauke@hauke-m.de>

Use function pci_is_pcie() instead of accessing struct member directly.

CC: Michael Buesch <mb@bu3sch.de>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
 drivers/ssb/scan.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/ssb/scan.c b/drivers/ssb/scan.c
index ee079ab..5a0985d 100644
--- a/drivers/ssb/scan.c
+++ b/drivers/ssb/scan.c
@@ -405,10 +405,10 @@ int ssb_bus_scan(struct ssb_bus *bus,
 				/* Ignore PCI cores on PCI-E cards.
 				 * Ignore PCI-E cores on PCI cards. */
 				if (dev->id.coreid == SSB_DEV_PCI) {
-					if (bus->host_pci->is_pcie)
+					if (pci_is_pcie(bus->host_pci))
 						continue;
 				} else {
-					if (!bus->host_pci->is_pcie)
+					if (!pci_is_pcie(bus->host_pci))
 						continue;
 				}
 			}
-- 
1.7.1


^ permalink raw reply related

* [PATCH 4/7] rt2x00: Use pci_is_pcie()
From: Hauke Mehrtens @ 2010-12-21  1:01 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, Hauke Mehrtens, Ivo van Doorn
In-Reply-To: <1292893316-26694-1-git-send-email-hauke@hauke-m.de>

Use function pci_is_pcie() instead of accessing struct member directly.

CC: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
 drivers/net/wireless/rt2x00/rt2x00pci.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/wireless/rt2x00/rt2x00pci.c b/drivers/net/wireless/rt2x00/rt2x00pci.c
index 28e6ff1..73631c6 100644
--- a/drivers/net/wireless/rt2x00/rt2x00pci.c
+++ b/drivers/net/wireless/rt2x00/rt2x00pci.c
@@ -286,7 +286,7 @@ int rt2x00pci_probe(struct pci_dev *pci_dev, const struct pci_device_id *id)
 	rt2x00dev->irq = pci_dev->irq;
 	rt2x00dev->name = pci_name(pci_dev);
 
-	if (pci_dev->is_pcie)
+	if (pci_is_pcie(pci_dev))
 		rt2x00_set_chip_intf(rt2x00dev, RT2X00_CHIP_INTF_PCIE);
 	else
 		rt2x00_set_chip_intf(rt2x00dev, RT2X00_CHIP_INTF_PCI);
-- 
1.7.1


^ permalink raw reply related

* [PATCH 5/7] ath5k: Use pci_is_pcie()
From: Hauke Mehrtens @ 2010-12-21  1:01 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, Hauke Mehrtens, Luis R. Rodriguez
In-Reply-To: <1292893316-26694-1-git-send-email-hauke@hauke-m.de>

Use function pci_is_pcie() instead of accessing struct member directly.

CC: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
 drivers/net/wireless/ath/ath5k/attach.c |    2 +-
 drivers/net/wireless/ath/ath5k/reset.c  |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/ath/ath5k/attach.c b/drivers/net/wireless/ath/ath5k/attach.c
index 9dbc1fa..cdac5cf 100644
--- a/drivers/net/wireless/ath/ath5k/attach.c
+++ b/drivers/net/wireless/ath/ath5k/attach.c
@@ -276,7 +276,7 @@ int ath5k_hw_init(struct ath5k_softc *sc)
 	/*
 	 * Write PCI-E power save settings
 	 */
-	if ((ah->ah_version == AR5K_AR5212) && pdev && (pdev->is_pcie)) {
+	if ((ah->ah_version == AR5K_AR5212) && pdev && (pci_is_pcie(pdev))) {
 		ath5k_hw_reg_write(ah, 0x9248fc00, AR5K_PCIE_SERDES);
 		ath5k_hw_reg_write(ah, 0x24924924, AR5K_PCIE_SERDES);
 
diff --git a/drivers/net/wireless/ath/ath5k/reset.c b/drivers/net/wireless/ath/ath5k/reset.c
index bc84aaa..7297d7b 100644
--- a/drivers/net/wireless/ath/ath5k/reset.c
+++ b/drivers/net/wireless/ath/ath5k/reset.c
@@ -537,7 +537,7 @@ int ath5k_hw_on_hold(struct ath5k_hw *ah)
 	 * we ingore that flag for PCI-E cards. On PCI cards
 	 * this flag gets cleared after 64 PCI clocks.
 	 */
-	bus_flags = (pdev && pdev->is_pcie) ? 0 : AR5K_RESET_CTL_PCI;
+	bus_flags = (pdev && pci_is_pcie(pdev)) ? 0 : AR5K_RESET_CTL_PCI;
 
 	if (ah->ah_version == AR5K_AR5210) {
 		ret = ath5k_hw_nic_reset(ah, AR5K_RESET_CTL_PCU |
@@ -594,7 +594,7 @@ int ath5k_hw_nic_wakeup(struct ath5k_hw *ah, int flags, bool initial)
 	 * we ingore that flag for PCI-E cards. On PCI cards
 	 * this flag gets cleared after 64 PCI clocks.
 	 */
-	bus_flags = (pdev && pdev->is_pcie) ? 0 : AR5K_RESET_CTL_PCI;
+	bus_flags = (pdev && pci_is_pcie(pdev)) ? 0 : AR5K_RESET_CTL_PCI;
 
 	if (ah->ah_version == AR5K_AR5210) {
 		ret = ath5k_hw_nic_reset(ah, AR5K_RESET_CTL_PCU |
-- 
1.7.1


^ permalink raw reply related

* [PATCH 6/7] ath9k: Use pci_is_pcie()
From: Hauke Mehrtens @ 2010-12-21  1:01 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, Hauke Mehrtens, Luis R. Rodriguez
In-Reply-To: <1292893316-26694-1-git-send-email-hauke@hauke-m.de>

Use function pci_is_pcie() instead of accessing struct member directly.

CC: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
 drivers/net/wireless/ath/ath9k/pci.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/pci.c b/drivers/net/wireless/ath/ath9k/pci.c
index 7ca8499..2136242 100644
--- a/drivers/net/wireless/ath/ath9k/pci.c
+++ b/drivers/net/wireless/ath/ath9k/pci.c
@@ -96,7 +96,7 @@ static void ath_pci_bt_coex_prep(struct ath_common *common)
 	struct pci_dev *pdev = to_pci_dev(sc->dev);
 	u8 aspm;
 
-	if (!pdev->is_pcie)
+	if (!pci_is_pcie(pdev))
 		return;
 
 	pci_read_config_byte(pdev, ATH_PCIE_CAP_LINK_CTRL, &aspm);
-- 
1.7.1


^ permalink raw reply related

* [PATCH 7/7] rtlwifi: Use pci_pcie_cap()
From: Hauke Mehrtens @ 2010-12-21  1:01 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, Hauke Mehrtens, Larry Finger
In-Reply-To: <1292893316-26694-1-git-send-email-hauke@hauke-m.de>

Use function pci_pcie_cap() instead of accessing struct member directly.

CC: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
 drivers/net/wireless/rtlwifi/pci.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/wireless/rtlwifi/pci.c b/drivers/net/wireless/rtlwifi/pci.c
index bf3b574..353e203 100644
--- a/drivers/net/wireless/rtlwifi/pci.c
+++ b/drivers/net/wireless/rtlwifi/pci.c
@@ -1608,7 +1608,7 @@ static bool _rtl_pci_find_adapter(struct pci_dev *pdev,
 		pcipriv->ndis_adapter.pcibridge_funcnum =
 		    PCI_FUNC(bridge_pdev->devfn);
 		pcipriv->ndis_adapter.pcibridge_pciehdr_offset =
-		    bridge_pdev->pcie_cap;
+		    pci_pcie_cap(bridge_pdev);
 		pcipriv->ndis_adapter.pcicfg_addrport =
 		    (pcipriv->ndis_adapter.pcibridge_busnum << 16) |
 		    (pcipriv->ndis_adapter.pcibridge_devnum << 11) |
-- 
1.7.1


^ permalink raw reply related

* [PATCH v2] rt2x00: Fix panic on frame padding for rt2800 usb devices
From: Ismael Luceno @ 2010-12-21  2:41 UTC (permalink / raw)
  To: linux-wireless; +Cc: Ivo Van Doorn, Gertjan van Wingerde, Ismael Luceno

Backtrace:
  rt2800usb_write_tx_data
  rt2x00queue_write_tx_frame
  rt2x00mac_tx
  invoke_tx_handlers
  __ieee80211_tx
  ieee80211_tx
  virt_to_head_page
  ieee80211_xmit
  ieee80211_tx_skb
  ieee80211_scan_work
  schedule
  ieee80211_scan_work
  process_one_work
  ...

It tried to expand the skb past it's end using skb_put. So I replaced it
with a call to skb_padto, which takes the issue into account.

Signed-off-by: Ismael Luceno <ismael.luceno@gmail.com>
---
 drivers/net/wireless/rt2x00/rt2800usb.c |   16 ++++++++++++----
 1 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/drivers/net/wireless/rt2x00/rt2800usb.c b/drivers/net/wireless/rt2x00/rt2800usb.c
index 3e0205d..b97a4a5 100644
--- a/drivers/net/wireless/rt2x00/rt2800usb.c
+++ b/drivers/net/wireless/rt2x00/rt2800usb.c
@@ -369,7 +369,10 @@ static void rt2800usb_write_tx_desc(struct queue_entry *entry,
 static void rt2800usb_write_tx_data(struct queue_entry *entry,
 					struct txentry_desc *txdesc)
 {
-	u8 padding_len;
+	unsigned int len;
+	int err;
+
+	rt2800_write_tx_data(entry, txdesc);
 
 	/*
 	 * pad(1~3 bytes) is added after each 802.11 payload.
@@ -378,9 +381,14 @@ static void rt2800usb_write_tx_data(struct queue_entry *entry,
 	 * | TXINFO | TXWI | 802.11 header | L2 pad | payload | pad | USB end pad |
 	 *                 |<------------- tx_pkt_len ------------->|
 	 */
-        rt2800_write_tx_data(entry, txdesc);
-        padding_len = roundup(entry->skb->len + 4, 4) - entry->skb->len;
-        memset(skb_put(entry->skb, padding_len), 0, padding_len);
+	len = roundup(entry->skb->len, 4) + 4;
+	err = skb_padto(entry->skb, len);
+	if (unlikely(err)) {
+		WARNING(entry->queue->rt2x00dev, "TX SKB padding error, out of memory\n");
+		return;
+	}
+
+	entry->skb->len = len;
 }
 
 /*
-- 
1.7.3.4


^ permalink raw reply related

* Re: rtl8192 does not see N networks in my building
From: Larry Finger @ 2010-12-21  3:07 UTC (permalink / raw)
  To: Amos Blanton; +Cc: linux-wireless
In-Reply-To: <AANLkTinWZ_1EQTJsWrPmUJEqFpEg8JEOkcOtKZXbqJr7@mail.gmail.com>

On 12/20/2010 09:49 AM, Amos Blanton wrote:
> Ok, I did the lwist scan properly this time. And wow, we have a lot of
> wifi here - 96 cells in fact.
> The list has most of the visible networks that others can see in the
> area with the exception of MIT N, which is the one that works decently
> well.  There's also MIT Secure N, which it doesn't see either. So I
> guess the device is not finding any N networks?
> 
> Would this be something I should report to RealTek?
> Thanks very much for your help with this.

You probably should report it to Reaktek. I'm not sure what response you might get.

If you find another Linux system that has connected to one of these routers
using an 802.11 b/g card, I would be interested in seeing the output of iwconfig
for that computer.

Larry


^ permalink raw reply

* Re: [PATCH 7/7] rtlwifi: Use pci_pcie_cap()
From: Larry Finger @ 2010-12-21  3:48 UTC (permalink / raw)
  To: Hauke Mehrtens; +Cc: linville, linux-wireless
In-Reply-To: <1292893316-26694-8-git-send-email-hauke@hauke-m.de>

On 12/20/2010 07:01 PM, Hauke Mehrtens wrote:
> Use function pci_pcie_cap() instead of accessing struct member directly.
> 
> CC: Larry Finger <Larry.Finger@lwfinger.net>
> Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
> ---

Is this change really necessary? The inline routine expands exactly to the code
that you replaced. The change just adds one extra layer of obscurity.

If this really is a desirable change, then add
Tested-by: Larry Finger <Larry.Finger@lwfinger.net>

Larry

^ permalink raw reply

* [patch -next] ath9k: unlock on error path in ath9k_change_interface()
From: Dan Carpenter @ 2010-12-21  3:59 UTC (permalink / raw)
  To: Luis R. Rodriguez
  Cc: Jouni Malinen, Vasanthakumar Thiagarajan, Senthil Balasubramanian,
	John W. Linville, linux-wireless, ath9k-devel, kernel-janitors

There is a missing unlock when we hit the "No beacon slot available"
error condition.

Signed-off-by: Dan Carpenter <error27@gmail.com>

diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index cb53fbb..0ffa115 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -1481,6 +1481,7 @@ static int ath9k_change_interface(struct ieee80211_hw *hw,
 	struct ath_wiphy *aphy = hw->priv;
 	struct ath_softc *sc = aphy->sc;
 	struct ath_common *common = ath9k_hw_common(sc->sc_ah);
+	int ret = 0;
 
 	ath_dbg(common, ATH_DBG_CONFIG, "Change Interface\n");
 	mutex_lock(&sc->mutex);
@@ -1490,7 +1491,8 @@ static int ath9k_change_interface(struct ieee80211_hw *hw,
 	case NL80211_IFTYPE_ADHOC:
 		if (sc->nbcnvifs >= ATH_BCBUF) {
 			ath_err(common, "No beacon slot available\n");
-			return -ENOBUFS;
+			ret = -ENOBUFS;
+			goto out;
 		}
 		break;
 	case NL80211_IFTYPE_STATION:
@@ -1504,14 +1506,15 @@ static int ath9k_change_interface(struct ieee80211_hw *hw,
 	default:
 		ath_err(common, "Interface type %d not yet supported\n",
 				vif->type);
-		mutex_unlock(&sc->mutex);
-		return -ENOTSUPP;
+		ret = -ENOTSUPP;
+		goto out;
 	}
 	vif->type = new_type;
 	vif->p2p = p2p;
 
+out:
 	mutex_unlock(&sc->mutex);
-	return 0;
+	return ret;
 }
 
 static void ath9k_remove_interface(struct ieee80211_hw *hw,

^ permalink raw reply related

* [patch -next] wl12xx: use after free in debug code
From: Dan Carpenter @ 2010-12-21  4:00 UTC (permalink / raw)
  To: John W. Linville
  Cc: Luciano Coelho, Shahar Levi, linux-wireless, kernel-janitors

If debugging is turned on, then wl1271_dump() dereferences a freed
variable.

Signed-off-by: Dan Carpenter <error27@gmail.com>

diff --git a/drivers/net/wireless/wl12xx/spi.c b/drivers/net/wireless/wl12xx/spi.c
index 4671491..8f7ea2c 100644
--- a/drivers/net/wireless/wl12xx/spi.c
+++ b/drivers/net/wireless/wl12xx/spi.c
@@ -110,9 +110,9 @@ static void wl1271_spi_reset(struct wl1271 *wl)
 	spi_message_add_tail(&t, &m);
 
 	spi_sync(wl_to_spi(wl), &m);
-	kfree(cmd);
 
 	wl1271_dump(DEBUG_SPI, "spi reset -> ", cmd, WSPI_INIT_CMD_LEN);
+	kfree(cmd);
 }
 
 static void wl1271_spi_init(struct wl1271 *wl)

^ permalink raw reply related


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox