2011-03-31 16:22:22

by Hauke Mehrtens

[permalink] [raw]
Subject: [PATCH 1/5] compat-wireless: add support for mwifiex

This adds support for mwifiex into compat-wireless.

This is only compile tested as I do not have such a device.

CC: Bing Zhao <[email protected]>
Signed-off-by: Hauke Mehrtens <[email protected]>
---
config.mk | 4 +
patches/01-netdev.patch | 11 ++++
patches/25-multicast-list_head.patch | 42 ++++++++++++--
patches/26-sdio-quirks.patch | 12 ++++
patches/29-libertas_sdio_no_suspend.patch | 34 -----------
patches/29-sdio_no_suspend.patch | 86 +++++++++++++++++++++++++++++
scripts/admin-update.sh | 1 +
7 files changed, 151 insertions(+), 39 deletions(-)
delete mode 100644 patches/29-libertas_sdio_no_suspend.patch
create mode 100644 patches/29-sdio_no_suspend.patch

diff --git a/config.mk b/config.mk
index 92b5fad..a66fd5a 100644
--- a/config.mk
+++ b/config.mk
@@ -530,6 +530,8 @@ endif #CONFIG_COMPAT_KERNEL_32

endif #CONFIG_CRC7

+CONFIG_MWIFIEX_SDIO=m
+
ifdef CONFIG_COMPAT_KERNEL_27
CONFIG_LIBERTAS_SDIO=n
NEED_LIBERTAS=n
@@ -609,6 +611,8 @@ CONFIG_COMPAT_WL12XX=m
CONFIG_WL12XX_HT=y
endif #CONFIG_CRC7

+CONFIG_MWIFIEX=m
+
ifdef CONFIG_COMPAT_KERNEL_27
CONFIG_LIBERTAS=n
else #CONFIG_COMPAT_KERNEL_27
diff --git a/patches/01-netdev.patch b/patches/01-netdev.patch
index dc5ea98..d11f9af 100644
--- a/patches/01-netdev.patch
+++ b/patches/01-netdev.patch
@@ -265,6 +265,17 @@ without creating a headache on maintenance of the pathes.
dev->destructor = free_netdev;
ether_setup(dev);
dev->tx_queue_len = 0;
+--- a/drivers/net/wireless/mwifiex/main.c
++++ b/drivers/net/wireless/mwifiex/main.c
+@@ -675,7 +675,7 @@ static const struct net_device_ops mwifi
+ static void
+ mwifiex_init_priv_params(struct mwifiex_private *priv, struct net_device *dev)
+ {
+- dev->netdev_ops = &mwifiex_netdev_ops;
++ netdev_attach_ops(dev, &mwifiex_netdev_ops);
+ /* Initialize private structure */
+ init_waitqueue_head(&priv->ioctl_wait_q);
+ init_waitqueue_head(&priv->cmd_wait_q);
--- a/drivers/net/wireless/orinoco/main.c
+++ b/drivers/net/wireless/orinoco/main.c
@@ -2272,14 +2272,18 @@ int orinoco_if_add(struct orinoco_privat
diff --git a/patches/25-multicast-list_head.patch b/patches/25-multicast-list_head.patch
index 6d25c32..087cb0a 100644
--- a/patches/25-multicast-list_head.patch
+++ b/patches/25-multicast-list_head.patch
@@ -329,9 +329,41 @@ This also backport commit 2f787b0b76bf5de2eaa3ca3a29d89123ae03c856

return mc_count;
}
+--- a/drivers/net/wireless/mwifiex/sta_ioctl.c
++++ b/drivers/net/wireless/mwifiex/sta_ioctl.c
+@@ -41,7 +41,11 @@ mwifiex_copy_mcast_addr(struct mwifiex_m
+ struct netdev_hw_addr *ha;
+
+ netdev_for_each_mc_addr(ha, dev)
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35))
+ memcpy(&mlist->mac_list[i++], ha->addr, ETH_ALEN);
++#else
++ memcpy(&mlist->mac_list[i++], ha->dmi_addr, ETH_ALEN);
++#endif
+
+ return i;
+ }
+--- a/drivers/net/wireless/mwifiex/debugfs.c
++++ b/drivers/net/wireless/mwifiex/debugfs.c
+@@ -235,9 +235,15 @@ mwifiex_info_read(struct file *file, cha
+ netdev_for_each_mc_addr(ha, netdev)
+ p += sprintf(p, "multicast_address[%d]="
+ "\"%02x:%02x:%02x:%02x:%02x:%02x\"\n", i++,
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35))
+ ha->addr[0], ha->addr[1],
+ ha->addr[2], ha->addr[3],
+ ha->addr[4], ha->addr[5]);
++#else
++ ha->dmi_addr[0], ha->dmi_addr[1],
++ ha->dmi_addr[2], ha->dmi_addr[3],
++ ha->dmi_addr[4], ha->dmi_addr[5]);
++#endif
+ }
+
+ p += sprintf(p, "num_tx_bytes = %lu\n", priv->stats.tx_bytes);
--- a/drivers/net/wireless/mwl8k.c
+++ b/drivers/net/wireless/mwl8k.c
-@@ -2165,15 +2165,21 @@ struct mwl8k_cmd_mac_multicast_adr {
+@@ -2466,15 +2466,21 @@ struct mwl8k_cmd_mac_multicast_adr {

static struct mwl8k_cmd_pkt *
__mwl8k_cmd_mac_multicast_adr(struct ieee80211_hw *hw, int allmulti,
@@ -353,7 +385,7 @@ This also backport commit 2f787b0b76bf5de2eaa3ca3a29d89123ae03c856

if (allmulti || mc_count > priv->num_mcaddrs) {
allmulti = 1;
-@@ -2194,13 +2200,27 @@ __mwl8k_cmd_mac_multicast_adr(struct iee
+@@ -2495,13 +2501,27 @@ __mwl8k_cmd_mac_multicast_adr(struct iee
if (allmulti) {
cmd->action |= cpu_to_le16(MWL8K_ENABLE_RX_ALL_MULTICAST);
} else if (mc_count) {
@@ -381,7 +413,7 @@ This also backport commit 2f787b0b76bf5de2eaa3ca3a29d89123ae03c856
}
}

-@@ -4130,7 +4150,11 @@ mwl8k_bss_info_changed(struct ieee80211_
+@@ -4642,7 +4662,11 @@ mwl8k_bss_info_changed(struct ieee80211_
}

static u64 mwl8k_prepare_multicast(struct ieee80211_hw *hw,
@@ -393,7 +425,7 @@ This also backport commit 2f787b0b76bf5de2eaa3ca3a29d89123ae03c856
{
struct mwl8k_cmd_pkt *cmd;

-@@ -4141,7 +4165,11 @@ static u64 mwl8k_prepare_multicast(struc
+@@ -4653,7 +4677,11 @@ static u64 mwl8k_prepare_multicast(struc
* we'll end up throwing this packet away and creating a new
* one in mwl8k_configure_filter().
*/
@@ -405,7 +437,7 @@ This also backport commit 2f787b0b76bf5de2eaa3ca3a29d89123ae03c856

return (unsigned long)cmd;
}
-@@ -4263,7 +4291,11 @@ static void mwl8k_configure_filter(struc
+@@ -4775,7 +4803,11 @@ static void mwl8k_configure_filter(struc
*/
if (*total_flags & FIF_ALLMULTI) {
kfree(cmd);
diff --git a/patches/26-sdio-quirks.patch b/patches/26-sdio-quirks.patch
index a802a25..5c78d87 100644
--- a/patches/26-sdio-quirks.patch
+++ b/patches/26-sdio-quirks.patch
@@ -18,3 +18,15 @@ The quirks attribute is not available on older kernels.

card->ioport = sdio_readb(func, IF_SDIO_IOPORT, &ret);
if (ret)
+--- a/drivers/net/wireless/mwifiex/sdio.c
++++ b/drivers/net/wireless/mwifiex/sdio.c
+@@ -60,7 +60,9 @@ mwifiex_sdio_probe(struct sdio_func *fun
+
+ card->func = func;
+
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34))
+ func->card->quirks |= MMC_QUIRK_BLKSZ_FOR_BYTE_MODE;
++#endif
+
+ sdio_claim_host(func);
+ ret = sdio_enable_func(func);
diff --git a/patches/29-libertas_sdio_no_suspend.patch b/patches/29-libertas_sdio_no_suspend.patch
deleted file mode 100644
index 287452a..0000000
--- a/patches/29-libertas_sdio_no_suspend.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-Starting with commit 66fceb69b72ff7e9cd8da2ca70033982d5376e0e
-"libertas: Added callback functions to support SDIO suspend/resume."
-libertas uses new functions from the in kernel sdio framework for
-suspend and resume that are not backported.
-
---- a/drivers/net/wireless/libertas/if_sdio.c
-+++ b/drivers/net/wireless/libertas/if_sdio.c
-@@ -1196,6 +1196,7 @@ static void if_sdio_remove(struct sdio_f
- lbs_deb_leave(LBS_DEB_SDIO);
- }
-
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34))
- static int if_sdio_suspend(struct device *dev)
- {
- struct sdio_func *func = dev_to_sdio_func(dev);
-@@ -1250,15 +1251,18 @@ static const struct dev_pm_ops if_sdio_p
- .suspend = if_sdio_suspend,
- .resume = if_sdio_resume,
- };
-+#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34)) */
-
- static struct sdio_driver if_sdio_driver = {
- .name = "libertas_sdio",
- .id_table = if_sdio_ids,
- .probe = if_sdio_probe,
- .remove = if_sdio_remove,
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34))
- .drv = {
- .pm = &if_sdio_pm_ops,
- },
-+#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34)) */
- };
-
- /*******************************************************************/
diff --git a/patches/29-sdio_no_suspend.patch b/patches/29-sdio_no_suspend.patch
new file mode 100644
index 0000000..e196159
--- /dev/null
+++ b/patches/29-sdio_no_suspend.patch
@@ -0,0 +1,86 @@
+Starting with commit 66fceb69b72ff7e9cd8da2ca70033982d5376e0e
+"libertas: Added callback functions to support SDIO suspend/resume."
+libertas uses new functions from the in kernel sdio framework for
+suspend and resume that are not backported.
+
+--- a/drivers/net/wireless/libertas/if_sdio.c
++++ b/drivers/net/wireless/libertas/if_sdio.c
+@@ -1196,6 +1196,7 @@ static void if_sdio_remove(struct sdio_f
+ lbs_deb_leave(LBS_DEB_SDIO);
+ }
+
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34))
+ static int if_sdio_suspend(struct device *dev)
+ {
+ struct sdio_func *func = dev_to_sdio_func(dev);
+@@ -1250,15 +1251,18 @@ static const struct dev_pm_ops if_sdio_p
+ .suspend = if_sdio_suspend,
+ .resume = if_sdio_resume,
+ };
++#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34)) */
+
+ static struct sdio_driver if_sdio_driver = {
+ .name = "libertas_sdio",
+ .id_table = if_sdio_ids,
+ .probe = if_sdio_probe,
+ .remove = if_sdio_remove,
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34))
+ .drv = {
+ .pm = &if_sdio_pm_ops,
+ },
++#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34)) */
+ };
+
+ /*******************************************************************/
+--- a/drivers/net/wireless/mwifiex/sdio.c
++++ b/drivers/net/wireless/mwifiex/sdio.c
+@@ -107,6 +107,7 @@ mwifiex_sdio_remove(struct sdio_func *fu
+ }
+ }
+
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34))
+ /*
+ * SDIO suspend.
+ *
+@@ -214,6 +215,7 @@ static int mwifiex_sdio_resume(struct de
+
+ return 0;
+ }
++#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34)) */
+
+ /* Device ID for SD8787 */
+ #define SDIO_DEVICE_ID_MARVELL_8787 (0x9119)
+@@ -226,10 +228,12 @@ static const struct sdio_device_id mwifi
+
+ MODULE_DEVICE_TABLE(sdio, mwifiex_ids);
+
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34))
+ static const struct dev_pm_ops mwifiex_sdio_pm_ops = {
+ .suspend = mwifiex_sdio_suspend,
+ .resume = mwifiex_sdio_resume,
+ };
++#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34)) */
+
+ static struct sdio_driver mwifiex_sdio = {
+ .name = "mwifiex_sdio",
+@@ -238,7 +242,9 @@ static struct sdio_driver mwifiex_sdio =
+ .remove = mwifiex_sdio_remove,
+ .drv = {
+ .owner = THIS_MODULE,
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34))
+ .pm = &mwifiex_sdio_pm_ops,
++#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34)) */
+ }
+ };
+
+@@ -1741,8 +1747,10 @@ mwifiex_sdio_cleanup_module(void)
+ if (!adapter || !adapter->priv_num)
+ goto exit;
+
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34))
+ if (adapter->is_suspended)
+ mwifiex_sdio_resume(adapter->dev);
++#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34)) */
+
+ for (i = 0; i < adapter->priv_num; i++)
+ if ((GET_BSS_ROLE(adapter->priv[i]) == MWIFIEX_BSS_ROLE_STA) &&
diff --git a/scripts/admin-update.sh b/scripts/admin-update.sh
index 58f3750..0a1225e 100755
--- a/scripts/admin-update.sh
+++ b/scripts/admin-update.sh
@@ -242,6 +242,7 @@ DRIVERS="$DRIVERS drivers/net/wireless/wl12xx"
DRIVERS="$DRIVERS drivers/net/wireless/wl1251"
DRIVERS="$DRIVERS drivers/net/wireless/iwmc3200wifi"
DRIVERS="$DRIVERS drivers/net/wireless/orinoco"
+DRIVERS="$DRIVERS drivers/net/wireless/mwifiex"

# Staging drivers
STAGING_DRIVERS="drivers/staging/ath6kl"
--
1.7.1



2011-03-31 16:22:26

by Hauke Mehrtens

[permalink] [raw]
Subject: [PATCH 2/5] compat-wireless: backport threaded irq for wl12xx_spi

This backports threaded irq support for kernel < 2.6.31 for wl12xx_spi.
This is only compile tested as I do not have such a device.

Luis please add this into the linux-2.6.39.y branch.

CC: Ido Yariv <[email protected]>
Signed-off-by: Hauke Mehrtens <[email protected]>
---
patches/09-threaded-irq.patch | 61 +++++++++++++++++++++++++++++++++++++++++
1 files changed, 61 insertions(+), 0 deletions(-)

diff --git a/patches/09-threaded-irq.patch b/patches/09-threaded-irq.patch
index f62933e..9822acb 100644
--- a/patches/09-threaded-irq.patch
+++ b/patches/09-threaded-irq.patch
@@ -61,3 +61,64 @@ thread in process context as well.
};

/* Data structure for the WLAN parts (802.11 cores) of the b43 chip. */
+--- a/drivers/net/wireless/wl12xx/spi.c
++++ b/drivers/net/wireless/wl12xx/spi.c
+@@ -408,9 +408,20 @@ static int __devinit wl1271_probe(struct
+ goto out_free;
+ }
+
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,31)
++ ret = compat_request_threaded_irq(&wl->irq_compat, wl->irq,
++ wl1271_hardirq, wl1271_irq,
++ IRQF_TRIGGER_RISING,
++ DRIVER_NAME, wl);
++#else
+ ret = request_threaded_irq(wl->irq, wl1271_hardirq, wl1271_irq,
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,32)
++ IRQF_TRIGGER_RISING,
++#else
+ IRQF_TRIGGER_HIGH | IRQF_ONESHOT,
++#endif
+ DRIVER_NAME, wl);
++#endif
+ if (ret < 0) {
+ wl1271_error("request_irq() failed: %d", ret);
+ goto out_free;
+@@ -431,7 +442,11 @@ static int __devinit wl1271_probe(struct
+ return 0;
+
+ out_irq:
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,31)
++ compat_free_threaded_irq(&wl->irq_compat);
++#else
+ free_irq(wl->irq, wl);
++#endif
+
+ out_free:
+ wl1271_free_hw(wl);
+@@ -444,7 +459,12 @@ static int __devexit wl1271_remove(struc
+ struct wl1271 *wl = dev_get_drvdata(&spi->dev);
+
+ wl1271_unregister_hw(wl);
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,31)
++ compat_free_threaded_irq(&wl->irq_compat);
++ compat_destroy_threaded_irq(&wl->irq_compat);
++#else
+ free_irq(wl->irq, wl);
++#endif
+ wl1271_free_hw(wl);
+
+ return 0;
+--- a/drivers/net/wireless/wl12xx/wl12xx.h
++++ b/drivers/net/wireless/wl12xx/wl12xx.h
+@@ -544,6 +544,10 @@ struct wl1271 {
+
+ /* Quirks of specific hardware revisions */
+ unsigned int quirks;
++
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,31)
++ struct compat_threaded_irq irq_compat;
++#endif
+ };
+
+ struct wl1271_station {
--
1.7.1


2011-03-31 19:23:32

by Luis R. Rodriguez

[permalink] [raw]
Subject: Re: [PATCH 1/5] compat-wireless: add support for mwifiex

On Thu, Mar 31, 2011 at 09:22:03AM -0700, Hauke Mehrtens wrote:
> This adds support for mwifiex into compat-wireless.
>
> This is only compile tested as I do not have such a device.
>
> CC: Bing Zhao <[email protected]>
> Signed-off-by: Hauke Mehrtens <[email protected]>

Applied an pushed all. Applied the 2 patches you
asked to be merged into the linux-2.6.39.y branch.

Thanks!

Luis

2011-03-31 21:34:55

by Bing Zhao

[permalink] [raw]
Subject: RE: [PATCH 1/5] compat-wireless: add support for mwifiex



> -----Original Message-----
> From: Hauke Mehrtens [mailto:[email protected]]
> Sent: Thursday, March 31, 2011 9:22 AM
> To: [email protected]; [email protected]
> Cc: [email protected]; Hauke Mehrtens; Bing Zhao
> Subject: [PATCH 1/5] compat-wireless: add support for mwifiex
>
> This adds support for mwifiex into compat-wireless.
>
> This is only compile tested as I do not have such a device.

Hi Hauke and Luis,

I'm getting an error in "compat-wireless-2.6.39-rc1-3-s/net/wireless/util.c:799" while compiling compat-wireless-2.6.39-rc1-3-s.tar.bz2.


/home/bzhao/git-10.80.114.125/mwifiex-devel/compat-wireless-2.6.39-rc1-3-s/config.mk:204: "WARNING: CONFIG_CFG80211_WEXT will be deactivated or not working because kernel was compiled with CONFIG_WIRELESS_EXT=n. Tools using wext interface like iwconfig will not work. To activate it build your kernel e.g. with CONFIG_LIBIPW=m."

...

/home/bzhao/git-10.80.114.125/mwifiex-devel/compat-wireless-2.6.39-rc1-3-s/net/wireless/util.c: In function 'cfg80211_change_iface':
/home/bzhao/git-10.80.114.125/mwifiex-devel/compat-wireless-2.6.39-rc1-3-s/net/wireless/util.c:799: error: implicit declaration of function 'br_port_exists'
make[3]: *** [/home/bzhao/git-10.80.114.125/mwifiex-devel/compat-wireless-2.6.39-rc1-3-s/net/wireless/util.o] Error 1
make[2]: *** [/home/bzhao/git-10.80.114.125/mwifiex-devel/compat-wireless-2.6.39-rc1-3-s/net/wireless] Error 2
make[1]: *** [_module_/home/bzhao/git-10.80.114.125/mwifiex-devel/compat-wireless-2.6.39-rc1-3-s] Error 2
make: *** [modules] Error 2


I have wireless-testing.git master-2011-03-30 (2.6.39-rc1).

Could you please help?

Thanks,

Bing

>
> CC: Bing Zhao <[email protected]>
> Signed-off-by: Hauke Mehrtens <[email protected]>
> ---
> config.mk | 4 +
> patches/01-netdev.patch | 11 ++++
> patches/25-multicast-list_head.patch | 42 ++++++++++++--
> patches/26-sdio-quirks.patch | 12 ++++
> patches/29-libertas_sdio_no_suspend.patch | 34 -----------
> patches/29-sdio_no_suspend.patch | 86 +++++++++++++++++++++++++++++
> scripts/admin-update.sh | 1 +
> 7 files changed, 151 insertions(+), 39 deletions(-)
> delete mode 100644 patches/29-libertas_sdio_no_suspend.patch
> create mode 100644 patches/29-sdio_no_suspend.patch


2011-03-31 16:22:37

by Hauke Mehrtens

[permalink] [raw]
Subject: [PATCH 3/5] compat-wirless: deactivate PM support for libertas_spi for kernel < 2.6.29

The power management interface changed in kernel 2.6.29 and this breaks
build on older kernels.

CC: Vasily Khoruzhick <[email protected]>
Signed-off-by: Hauke Mehrtens <[email protected]>
---
patches/11-dev-pm-ops.patch | 28 ++++++++++++++++++++++++++++
1 files changed, 28 insertions(+), 0 deletions(-)

diff --git a/patches/11-dev-pm-ops.patch b/patches/11-dev-pm-ops.patch
index 2922f7a..25759f5 100644
--- a/patches/11-dev-pm-ops.patch
+++ b/patches/11-dev-pm-ops.patch
@@ -117,6 +117,34 @@ calls on compat code with only slight modifications.
};

int ath_pci_init(void)
+--- a/drivers/net/wireless/libertas/if_spi.c
++++ b/drivers/net/wireless/libertas/if_spi.c
+@@ -1204,6 +1204,7 @@ static int __devexit libertas_spi_remove
+ return 0;
+ }
+
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,29))
+ static int if_spi_suspend(struct device *dev)
+ {
+ struct spi_device *spi = to_spi_device(dev);
+@@ -1237,6 +1238,7 @@ static const struct dev_pm_ops if_spi_pm
+ .suspend = if_spi_suspend,
+ .resume = if_spi_resume,
+ };
++#endif
+
+ static struct spi_driver libertas_spi_driver = {
+ .probe = if_spi_probe,
+@@ -1245,7 +1247,9 @@ static struct spi_driver libertas_spi_dr
+ .name = "libertas_spi",
+ .bus = &spi_bus_type,
+ .owner = THIS_MODULE,
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,29))
+ .pm = &if_spi_pm_ops,
++#endif
+ },
+ };
+
--- a/drivers/net/wireless/iwlegacy/iwl-core.c
+++ b/drivers/net/wireless/iwlegacy/iwl-core.c
@@ -2048,15 +2048,17 @@ int iwl_legacy_pci_resume(struct device
--
1.7.1


2011-03-31 19:29:03

by Bing Zhao

[permalink] [raw]
Subject: RE: [PATCH 1/5] compat-wireless: add support for mwifiex

Hi Hauke,

> -----Original Message-----
> From: Hauke Mehrtens [mailto:[email protected]]
> Sent: Thursday, March 31, 2011 9:22 AM
> To: [email protected]; [email protected]
> Cc: [email protected]; Hauke Mehrtens; Bing Zhao
> Subject: [PATCH 1/5] compat-wireless: add support for mwifiex
>
> This adds support for mwifiex into compat-wireless.
>
> This is only compile tested as I do not have such a device.

I will test it.

Thanks,

Bing

>
> CC: Bing Zhao <[email protected]>
> Signed-off-by: Hauke Mehrtens <[email protected]>
> ---
> config.mk | 4 +
> patches/01-netdev.patch | 11 ++++
> patches/25-multicast-list_head.patch | 42 ++++++++++++--
> patches/26-sdio-quirks.patch | 12 ++++
> patches/29-libertas_sdio_no_suspend.patch | 34 -----------
> patches/29-sdio_no_suspend.patch | 86 +++++++++++++++++++++++++++++
> scripts/admin-update.sh | 1 +
> 7 files changed, 151 insertions(+), 39 deletions(-)
> delete mode 100644 patches/29-libertas_sdio_no_suspend.patch
> create mode 100644 patches/29-sdio_no_suspend.patch


2011-03-31 16:22:43

by Hauke Mehrtens

[permalink] [raw]
Subject: [PATCH 5/5] compat-wireless: clean up the config file


Signed-off-by: Hauke Mehrtens <[email protected]>
---
config.mk | 13 ++++++-------
1 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/config.mk b/config.mk
index f7b5323..5f861ca 100644
--- a/config.mk
+++ b/config.mk
@@ -204,9 +204,9 @@ else #CONFIG_CFG80211_WEXT
$(warning "WARNING: CONFIG_CFG80211_WEXT will be deactivated or not working because kernel was compiled with CONFIG_WIRELESS_EXT=n. Tools using wext interface like iwconfig will not work. To activate it build your kernel e.g. with CONFIG_LIBIPW=m.")
endif #CONFIG_WIRELESS_EXT

-ifneq ($(CONFIG_STAGING),)
- CONFIG_COMPAT_STAGING=m
-endif
+ifdef CONFIG_STAGING
+CONFIG_COMPAT_STAGING=y
+endif #CONFIG_STAGING

# mac80211 test driver
CONFIG_MAC80211_HWSIM=m
@@ -546,9 +546,8 @@ CONFIG_IWM=m
CONFIG_BT_HCIBTSDIO=m
CONFIG_BT_MRVL_SDIO=m

-ifneq ($(CONFIG_COMPAT_STAGING),)
+ifdef CONFIG_COMPAT_STAGING

-CONFIG_BRCM80211=m
CONFIG_BRCMSMAC=y
# CONFIG_BRCMDBG=y

@@ -567,10 +566,10 @@ CONFIG_ATH6K_LEGACY=m
CONFIG_BRCMFMAC=y

endif #CONFIG_WIRELESS_EXT
-endif #CONFIG_MMC
+endif #CONFIG_COMPAT_STAGING


-endif # end of SDIO driver list
+endif #CONFIG_MMC

CONFIG_RTLWIFI=m
CONFIG_RTL8192C_COMMON=m
--
1.7.1


2011-03-31 16:22:40

by Hauke Mehrtens

[permalink] [raw]
Subject: [PATCH 4/5] compat-wireless: fix compile warning for wl12xx

Only CONFIG_WL12XX_SDIO and CONFIG_WL1251_SDIO are depending on
CONFIG_WL12XX_PLATFORM_DATA, so only these two config options should be
renamed. The other options should still use the normal name. The old
commit did not fix the problem for me.

This fixes compat-wireless commit:
7b4debf48b81d7e7e0e2915b81ad6a4af57cb5d1
compat-wireless: fix compilation warning for wl12xx

Luis please add this into the linux-2.6.39.y branch.

Signed-off-by: Hauke Mehrtens <[email protected]>
---
config.mk | 6 +++---
patches/08-rename-config-options.patch | 18 +++++++++++-------
2 files changed, 14 insertions(+), 10 deletions(-)

diff --git a/config.mk b/config.mk
index a66fd5a..f7b5323 100644
--- a/config.mk
+++ b/config.mk
@@ -497,7 +497,7 @@ ifndef CONFIG_COMPAT_KERNEL_25

ifdef CONFIG_CRC7
CONFIG_WL1251_SPI=m
-CONFIG_COMPAT_WL12XX_SPI=m
+CONFIG_WL12XX_SPI=m
endif #CONFIG_CRC7
CONFIG_P54_SPI=m

@@ -519,7 +519,7 @@ CONFIG_B43_SDIO=y

ifdef CONFIG_CRC7
ifdef CONFIG_WL12XX_PLATFORM_DATA
-CONFIG_WL1251_SDIO=m
+CONFIG_COMPAT_WL1251_SDIO=m
endif #CONFIG_WL12XX_PLATFORM_DATA

ifndef CONFIG_COMPAT_KERNEL_32
@@ -607,7 +607,7 @@ CONFIG_ATH_COMMON=m

ifdef CONFIG_CRC7
CONFIG_WL1251=m
-CONFIG_COMPAT_WL12XX=m
+CONFIG_WL12XX=m
CONFIG_WL12XX_HT=y
endif #CONFIG_CRC7

diff --git a/patches/08-rename-config-options.patch b/patches/08-rename-config-options.patch
index 3232b40..639ee3a 100644
--- a/patches/08-rename-config-options.patch
+++ b/patches/08-rename-config-options.patch
@@ -113,15 +113,11 @@ CONFIG_BT_HIDP does not build with older kernel versions.
hidp-objs := core.o sock.o
--- a/drivers/net/wireless/wl12xx/Makefile
+++ b/drivers/net/wireless/wl12xx/Makefile
-@@ -6,11 +6,11 @@
- wl12xx_sdio_test-objs = sdio_test.o
-
+@@ -8,9 +8,9 @@ wl12xx_sdio_test-objs = sdio_test.o
wl12xx-$(CONFIG_NL80211_TESTMODE) += testmode.o
--obj-$(CONFIG_WL12XX) += wl12xx.o
--obj-$(CONFIG_WL12XX_SPI) += wl12xx_spi.o
+ obj-$(CONFIG_WL12XX) += wl12xx.o
+ obj-$(CONFIG_WL12XX_SPI) += wl12xx_spi.o
-obj-$(CONFIG_WL12XX_SDIO) += wl12xx_sdio.o
-+obj-$(CONFIG_COMPAT_WL12XX) += wl12xx.o
-+obj-$(CONFIG_COMPAT_WL12XX_SPI) += wl12xx_spi.o
+obj-$(CONFIG_COMPAT_WL12XX_SDIO) += wl12xx_sdio.o

-obj-$(CONFIG_WL12XX_SDIO_TEST) += wl12xx_sdio_test.o
@@ -129,3 +125,11 @@ CONFIG_BT_HIDP does not build with older kernel versions.

# small builtin driver bit
obj-$(CONFIG_WL12XX_PLATFORM_DATA) += wl12xx_platform_data.o
+--- a/drivers/net/wireless/wl1251/Makefile
++++ b/drivers/net/wireless/wl1251/Makefile
+@@ -5,4 +5,4 @@ wl1251_sdio-objs += sdio.o
+
+ obj-$(CONFIG_WL1251) += wl1251.o
+ obj-$(CONFIG_WL1251_SPI) += wl1251_spi.o
+-obj-$(CONFIG_WL1251_SDIO) += wl1251_sdio.o
++obj-$(CONFIG_COMPAT_WL1251_SDIO) += wl1251_sdio.o
--
1.7.1


2011-03-31 22:01:51

by Hauke Mehrtens

[permalink] [raw]
Subject: Re: [PATCH 1/5] compat-wireless: add support for mwifiex

Hi Bing,

On 03/31/2011 11:34 PM, Bing Zhao wrote:
>> Subject: [PATCH 1/5] compat-wireless: add support for mwifiex
>>
>> This adds support for mwifiex into compat-wireless.
>>
>> This is only compile tested as I do not have such a device.
>
> Hi Hauke and Luis,
>
> I'm getting an error in "compat-wireless-2.6.39-rc1-3-s/net/wireless/util.c:799" while compiling compat-wireless-2.6.39-rc1-3-s.tar.bz2.

mwifiex is not integrated in the last compat-wireless release from today
it will be in compat-wireless-2011-04-01.
The kernel version number in the compat-wireless release is the version
the code is from. So compat-wireless-2.6.39-rc1-3-s is based on the
source code from kernel version 2.6.39-rc1, it should compile and work
with every kernel from 2.6.24 to 2.6.39.

You could build your own version based on the latest version of
linux-next. It is described at:
http://wireless.kernel.org/en/users/Download/hacking

I created a self made version with the lasted fixes for compat-wireless
and and mwifiex at:
http://hauke-m.de/fileadmin/openwrt/compat-wireless-2011-03-31-1.tar.bz2

> /home/bzhao/git-10.80.114.125/mwifiex-devel/compat-wireless-2.6.39-rc1-3-s/config.mk:204: "WARNING: CONFIG_CFG80211_WEXT will be deactivated or not working because kernel was compiled with CONFIG_WIRELESS_EXT=n. Tools using wext interface like iwconfig will not work. To activate it build your kernel e.g. with CONFIG_LIBIPW=m."

This just says that the wext interface will not work, because your
kernel was compiled with CONFIG_WIRELESS_EXT=n, if you do not need wext
just ignore it otherwise compile your kernel with CONFIG_WIRELESS_EXT
enabled.

> /home/bzhao/git-10.80.114.125/mwifiex-devel/compat-wireless-2.6.39-rc1-3-s/net/wireless/util.c: In function 'cfg80211_change_iface':
> /home/bzhao/git-10.80.114.125/mwifiex-devel/compat-wireless-2.6.39-rc1-3-s/net/wireless/util.c:799: error: implicit declaration of function 'br_port_exists'
> make[3]: *** [/home/bzhao/git-10.80.114.125/mwifiex-devel/compat-wireless-2.6.39-rc1-3-s/net/wireless/util.o] Error 1
> make[2]: *** [/home/bzhao/git-10.80.114.125/mwifiex-devel/compat-wireless-2.6.39-rc1-3-s/net/wireless] Error 2
> make[1]: *** [_module_/home/bzhao/git-10.80.114.125/mwifiex-devel/compat-wireless-2.6.39-rc1-3-s] Error 2
> make: *** [modules] Error 2

This is a bug which will be fixed in the next release. ;-)
Build your own compat-wireless version from git, wait till tomorrow or
use my version at this will be fixed.

Hauke

2011-03-31 22:53:45

by Bing Zhao

[permalink] [raw]
Subject: RE: [PATCH 1/5] compat-wireless: add support for mwifiex

Hi Hauke,

> > I'm getting an error in "compat-wireless-2.6.39-rc1-3-s/net/wireless/util.c:799" while compiling
> compat-wireless-2.6.39-rc1-3-s.tar.bz2.
>
> mwifiex is not integrated in the last compat-wireless release from today
> it will be in compat-wireless-2011-04-01.
> The kernel version number in the compat-wireless release is the version
> the code is from. So compat-wireless-2.6.39-rc1-3-s is based on the
> source code from kernel version 2.6.39-rc1, it should compile and work
> with every kernel from 2.6.24 to 2.6.39.
>
> You could build your own version based on the latest version of
> linux-next. It is described at:
> http://wireless.kernel.org/en/users/Download/hacking

Thanks a lot for the information.

> I created a self made version with the lasted fixes for compat-wireless
> and and mwifiex at:
> http://hauke-m.de/fileadmin/openwrt/compat-wireless-2011-03-31-1.tar.bz2

I tested this tar ball. It passed compilation and mwifiex works fine.

Thanks,

Bing