r4639 - developers/werner/wlan-spi/patches

werner at docs.openmoko.org werner at docs.openmoko.org
Wed Sep 10 02:27:08 CEST 2008


Author: werner
Date: 2008-09-10 02:27:07 +0200 (Wed, 10 Sep 2008)
New Revision: 4639

Added:
   developers/werner/wlan-spi/patches/ar6k-essid-one-and-32.patch
   developers/werner/wlan-spi/patches/gta02-no-glamo-mmc.patch
   developers/werner/wlan-spi/patches/hack-trigger-on-mmc.patch
Modified:
   developers/werner/wlan-spi/patches/series
Log:
ar6k-essid-one-and-32.patch: included that band-aid patch here so that I
  don't forget about it.
hack-trigger-on-mmc.patch: switch GPB1 (blue LED) on when sending the
  mmc.core.trigger'th MMC command. This triggers a scope which then
  records the message.
gta02-no-glamo-mmc.patch: prevent build failure when CONFIG_MFD_GLAMO_MCI is 
  not enabled.
series: added ar6k-essid-one-and-32.patch, hack-trigger-on-mmc.patch, and
  gta02-no-glamo-mmc.patch



Added: developers/werner/wlan-spi/patches/ar6k-essid-one-and-32.patch
===================================================================
--- developers/werner/wlan-spi/patches/ar6k-essid-one-and-32.patch	                        (rev 0)
+++ developers/werner/wlan-spi/patches/ar6k-essid-one-and-32.patch	2008-09-10 00:27:07 UTC (rev 4639)
@@ -0,0 +1,34 @@
+ar6k-essid-one-and-32.patch
+
+This patch allows ESSID with length 1, which were rejected because the
+stack assumed iwconfig used a different format in the ioctl's payload.
+
+It also refuses ESSIDs longer than 31 bytes, because there is some
+buffer overrun issue buried somewhere else in the stack. In principle,
+32 bytes should be fine.
+
+Open issues:
+- are we sure we can't get any old-style (NUL included in length) ioctls ?
+- where's the 32 bytes overrun ?
+
+Not-Yet-Signed-off-by: Werner Almesberger <werner at openmoko.org>
+
+--- kernel/drivers/ar6000/ar6000/wireless_ext.c	2008-08-12 21:28:33.000000000 -0300
++++ korig/drivers/ar6000/ar6000/wireless_ext.c	2008-09-08 20:10:10.000000000 -0300
+@@ -264,12 +264,11 @@ ar6000_ioctl_siwessid(struct net_device 
+     }
+ 
+     /*
+-     * iwconfig passes a null terminated string with length including this
+-     * so we need to account for this
++     * iwconfig passes a string with length excluding any trailing NUL.
++     * FIXME: we should be able to set an ESSID of 32 bytes, yet things fall
++     * over badly if we do. So we limit the ESSID to 31 bytes.
+      */
+-    if (data->flags && (!data->length || (data->length == 1) ||
+-        ((data->length - 1) > sizeof(ar->arSsid))))
+-    {
++    if (data->flags && (!data->length || data->length >= sizeof(ar->arSsid))) {
+         /*
+          * ssid is invalid
+          */

Added: developers/werner/wlan-spi/patches/gta02-no-glamo-mmc.patch
===================================================================
--- developers/werner/wlan-spi/patches/gta02-no-glamo-mmc.patch	                        (rev 0)
+++ developers/werner/wlan-spi/patches/gta02-no-glamo-mmc.patch	2008-09-10 00:27:07 UTC (rev 4639)
@@ -0,0 +1,26 @@
+gta02-no-glamo-mmc.patch
+
+If we unconfigure CONFIG_MFD_GLAMO_MCI, mach-gta02.c fails to link
+because glamo_mci_resume is undefined.
+
+Not-Yet-Signed-off-by: Werner Almesberger <werner at openmoko.org>
+
+Index: korig/arch/arm/mach-s3c2440/mach-gta02.c
+===================================================================
+--- korig.orig/arch/arm/mach-s3c2440/mach-gta02.c	2008-09-09 21:18:55.000000000 -0300
++++ korig/arch/arm/mach-s3c2440/mach-gta02.c	2008-09-09 21:20:25.000000000 -0300
+@@ -1476,12 +1476,14 @@
+ 
+ static void gta02_glamo_mci_suspending(struct platform_device *dev)
+ {
++#ifdef CONFIG_MFD_GLAMO_MCI
+ 	void glamo_mci_resume(void *dev); /* little white lies about types */
+ 
+ 	resume_dep_glamo_mci_pcf.callback = glamo_mci_resume;
+ 	resume_dep_glamo_mci_pcf.context = (void *)dev;
+ 	pcf50633_register_resume_dependency(pcf50633_global,
+ 						     &resume_dep_glamo_mci_pcf);
++#endif /* CONFIG_MFD_GLAMO_MCI */
+ }
+ 
+ 

Added: developers/werner/wlan-spi/patches/hack-trigger-on-mmc.patch
===================================================================
--- developers/werner/wlan-spi/patches/hack-trigger-on-mmc.patch	                        (rev 0)
+++ developers/werner/wlan-spi/patches/hack-trigger-on-mmc.patch	2008-09-10 00:27:07 UTC (rev 4639)
@@ -0,0 +1,37 @@
+Index: korig/drivers/mmc/core/core.c
+===================================================================
+--- korig.orig/drivers/mmc/core/core.c	2008-09-09 21:02:31.000000000 -0300
++++ korig/drivers/mmc/core/core.c	2008-09-09 21:06:46.000000000 -0300
+@@ -120,16 +120,31 @@
+ 
+ EXPORT_SYMBOL(mmc_request_done);
+ 
++#include <asm/arch/regs-gpio.h>
++
++static void fire(void)
++{
++	s3c2410_gpio_setpin(S3C2410_GPB1, 1);
++}
++
++static int trigger = -1;
++module_param(trigger, int, 0644)
++
+ static void
+ mmc_start_request(struct mmc_host *host, struct mmc_request *mrq)
+ {
+ #ifdef CONFIG_MMC_DEBUG
+ 	unsigned int i, sz;
+ #endif
++	static int num = 0;
+ 
+-	pr_debug("%s: starting CMD%u arg %08x flags %08x\n",
++	pr_debug("%s: starting CMD%u #%d/%d arg %08x flags %08x\n",
+ 		 mmc_hostname(host), mrq->cmd->opcode,
++		 num, trigger,
+ 		 mrq->cmd->arg, mrq->cmd->flags);
++	if (num == trigger)
++		fire();
++	num++;
+ 
+ 	if (mrq->data) {
+ 		pr_debug("%s:     blksz %d blocks %d flags %08x "

Modified: developers/werner/wlan-spi/patches/series
===================================================================
--- developers/werner/wlan-spi/patches/series	2008-09-09 23:15:52 UTC (rev 4638)
+++ developers/werner/wlan-spi/patches/series	2008-09-10 00:27:07 UTC (rev 4639)
@@ -20,3 +20,6 @@
 gta02-mmc-spi.patch
 s3c-spi-api-update.patch
 config-ar6k-mmc-spi-bitbang.patch
+hack-trigger-on-mmc.patch
+ar6k-essid-one-and-32.patch
+gta02-no-glamo-mmc.patch




More information about the commitlog mailing list