summaryrefslogtreecommitdiff
path: root/recipes/mamona/cx3110x-770he-0.8.1
diff options
context:
space:
mode:
Diffstat (limited to 'recipes/mamona/cx3110x-770he-0.8.1')
-rw-r--r--recipes/mamona/cx3110x-770he-0.8.1/770_performance_improvements.patch307
-rw-r--r--recipes/mamona/cx3110x-770he-0.8.1/create_sysfs_link_for_wlan0.patch11
-rwxr-xr-xrecipes/mamona/cx3110x-770he-0.8.1/cx3110x37
-rw-r--r--recipes/mamona/cx3110x-770he-0.8.1/cx3110x.patch492
-rw-r--r--recipes/mamona/cx3110x-770he-0.8.1/defconfig1380
-rw-r--r--recipes/mamona/cx3110x-770he-0.8.1/fix_cross_makefile.patch11
-rw-r--r--recipes/mamona/cx3110x-770he-0.8.1/fix_mem_allign.patch94
-rw-r--r--recipes/mamona/cx3110x-770he-0.8.1/fix_mem_corruption.patch53
-rw-r--r--recipes/mamona/cx3110x-770he-0.8.1/fix_opps_while_connecting_with_nm.patch128
-rw-r--r--recipes/mamona/cx3110x-770he-0.8.1/fix_ssid_data_length.patch13
-rw-r--r--recipes/mamona/cx3110x-770he-0.8.1/series7
11 files changed, 2533 insertions, 0 deletions
diff --git a/recipes/mamona/cx3110x-770he-0.8.1/770_performance_improvements.patch b/recipes/mamona/cx3110x-770he-0.8.1/770_performance_improvements.patch
new file mode 100644
index 0000000000..be9be86b82
--- /dev/null
+++ b/recipes/mamona/cx3110x-770he-0.8.1/770_performance_improvements.patch
@@ -0,0 +1,307 @@
+Index: cx3110x-0.8.1/src/sm_drv_spi.c
+===================================================================
+--- cx3110x-0.8.1.orig/src/sm_drv_spi.c 2008-04-28 18:30:22.000000000 -0300
++++ cx3110x-0.8.1/src/sm_drv_spi.c 2008-04-28 18:30:25.000000000 -0300
+@@ -99,10 +99,10 @@
+ struct net_local *lp = dev->priv;
+ uint32_t host_ints, host_ints_ack, target_ints;
+ unsigned long timeout;
+- int result;
++ int result, pass = 1;
+
+ DEBUG(DBG_BH, "w\n");
+-
++again:
+ /* Here we wake the target up */
+ target_ints = SPI_TARGET_INT_WAKEUP;
+ sm_spi_write(dev, SPI_ADRS_ARM_INTERRUPTS,
+@@ -117,6 +117,11 @@
+ if (time_after(jiffies, timeout)) {
+ printk(KERN_WARNING "We haven't got a READY interrupt"
+ " from WAKEUP. (firmware crashed?)\n");
++ if (pass == 1) {
++ printk(KERN_WARNING "Try again...\n");
++ pass = 2;
++ goto again;
++ }
+ lp->device_state = DEVSTATE_DEAD;
+ result = -1;
+ goto exit;
+@@ -131,7 +136,10 @@
+ (unsigned char *)&host_ints_ack, sizeof(host_ints_ack));
+
+ result = 0;
+-
++
++ if (pass == 2) {
++ printk(KERN_WARNING "succeeded!!!\n");
++ }
+ exit:
+ DEBUG(DBG_BH, "W\n");
+ return result;
+@@ -150,49 +158,84 @@
+ return 0;
+ }
+
+-static int sm_drv_spi_rx(struct net_device *dev)
++static int sm_drv_spi_is_rx_frame_available(struct net_device *dev)
++{
++ uint32_t host_ints, host_ints_ack;
++ sm_spi_read(dev, SPI_ADRS_HOST_INTERRUPTS, (unsigned char *)&host_ints, sizeof(host_ints));
++ if ((host_ints & SPI_HOST_INT_UPDATE) || (host_ints & SPI_HOST_INT_SW_UPDATE)) {
++ host_ints_ack = SPI_HOST_INT_UPDATE | SPI_HOST_INT_SW_UPDATE;
++ sm_spi_write(dev, SPI_ADRS_HOST_INT_ACK, (unsigned char *)&host_ints_ack, sizeof(host_ints_ack));
++ return 1;
++ }
++ return 0;
++}
++
++static struct s_ic_msg * sm_drv_spi_alloc_frame_and_start_rx_transfer(struct net_device *dev)
+ {
+ struct net_local *lp = dev->priv;
+- struct spi_hif_local_data *hif_lp = HIF_LP(lp);
+ struct s_sm_frame *frame;
++ unsigned short length;
+ struct s_ic_msg *ic_msg;
++
++ frame = frame_skb_alloc(dev, lp->sm_descr.mtu + lp->sm_descr.rxoffset, 0);
++ if (frame == NULL) return NULL;
++
++ /* dummy read to flush SPI DMA controller bug */
++ sm_spi_read(dev, SPI_ADRS_GEN_PURP_1, (unsigned char *)&length, sizeof(length));
++
++ sm_spi_read(dev, SPI_ADRS_DMA_DATA, (unsigned char *)&length, sizeof(length));
++ DEBUG(DBG_BH, "%s: received frame len=%d\n", DRIVER_NAME, length);
++
++ if (length > SPI_MAX_PACKET_SIZE)
++ length = SPI_MAX_PACKET_SIZE;
++
++ sm_spi_dma_read_start(dev, SPI_ADRS_DMA_DATA, (unsigned char *) frame->data, length);
++
++ ic_msg = FRAME_ICMSG(frame);
++ ic_msg->frame = frame;
++ ic_msg->channel = 0;
++ ic_msg->flags = 0;
++ ic_msg->length = length;
++ ic_msg->address = 0;
++ ic_msg->data = frame->data;
++
++ return ic_msg;
++}
++
++static int sm_drv_spi_rx(struct net_device *dev)
++{
++ struct net_local *lp = dev->priv;
++ struct spi_hif_local_data *hif_lp = HIF_LP(lp);
++ struct s_ic_msg *ic_msg, *ic_msg_next;
+ int result, err;
+- unsigned short length;
+ int32_t callb_mask = 0;
+-
++
+ err = sm_drv_spi_wakeup(dev);
+ if (err < 0) {
+ result = -1;
+ goto exit;
+ }
+
+- frame = frame_skb_alloc(dev, lp->sm_descr.mtu + lp->sm_descr.rxoffset,
+- 0);
+- if (frame != NULL) {
+- ic_msg = FRAME_ICMSG(frame);
+- ic_msg->frame = frame;
+-
+- /* dummy read to flush SPI DMA controller bug */
+- sm_spi_read(dev, SPI_ADRS_GEN_PURP_1, (unsigned char *)&length,
+- sizeof(length));
+-
+- sm_spi_read(dev, SPI_ADRS_DMA_DATA, (unsigned char *)&length,
+- sizeof(length));
+-
+- DEBUG(DBG_BH, "%s: received frame len=%d\n", DRIVER_NAME,
+- length);
+-
+- if (length > SPI_MAX_PACKET_SIZE)
+- length = SPI_MAX_PACKET_SIZE;
++ ic_msg_next = sm_drv_spi_alloc_frame_and_start_rx_transfer(dev);
++ if (ic_msg_next == NULL) {
++ printk("Couldn't allocate RX frame\n");
++ result = -1;
++ goto exit;
++ }
+
+- sm_spi_dma_read(dev, SPI_ADRS_DMA_DATA,
+- (unsigned char *) frame->data, length);
+-
+- ic_msg->channel = 0;
+- ic_msg->flags = 0;
+- ic_msg->length = length;
+- ic_msg->address = 0;
+- ic_msg->data = frame->data;
++ while (ic_msg_next) {
++ sm_spi_dma_read_wait_for_completion();
++ ic_msg = ic_msg_next;
++ ic_msg_next = NULL;
++
++ if (sm_drv_spi_is_rx_frame_available(dev)) {
++ ic_msg_next = sm_drv_spi_alloc_frame_and_start_rx_transfer(dev);
++ if (ic_msg_next == NULL) {
++ printk("Couldn't allocate RX frame\n");
++ result = -1;
++ goto exit;
++ }
++ }
+
+ hif_lp->spi_packets++;
+ spin_lock_bh(&lp->sm_lock);
+@@ -207,13 +250,14 @@
+
+ DEBUG(DBG_IC,"Callback mask: %d\n", callb_mask);
+
+- if(callb_mask < 0)
++ if (callb_mask < 0) {
+ printk(KERN_WARNING "prism_interconnect_message_handle"
+ "returned error %d\n", callb_mask);
+- } else
+- printk("Couldn't allocate RX frame\n");
+-
+- handle_sm_callback(dev, callb_mask);
++ result = -1;
++ goto exit;
++ }
++ handle_sm_callback(dev, callb_mask);
++ }
+
+ result = 0;
+
+Index: cx3110x-0.8.1/src/sm_drv_spi_io.c
+===================================================================
+--- cx3110x-0.8.1.orig/src/sm_drv_spi_io.c 2008-04-28 18:30:25.000000000 -0300
++++ cx3110x-0.8.1/src/sm_drv_spi_io.c 2008-04-28 18:35:59.000000000 -0300
+@@ -120,7 +120,7 @@
+ }
+
+
+-int cx3110x_spi_dma_read(struct net_device *dev, unsigned long address, void * buffer, unsigned int length)
++int cx3110x_spi_dma_read_start(struct net_device *dev, unsigned long address, void * buffer, unsigned int length)
+ {
+ SPI_CS_ON();
+
+@@ -170,13 +170,22 @@
+ omap_start_dma(spi_dma.dma_rx_ch);
+ omap_start_dma(spi_dma.dma_tx_ch);
+
+- /* Wait for reading to complete */
+- while(!spi_dma.dma_rx_done) {
+- udelay(5);
++ return 0;
++}
++
++int cx3110x_spi_dma_read_wait_for_completion()
++{
++ int wait_limit = 15000 * 5;
++ int wait_cycles = 0;
++
++ /* Wait for DMA reading to complete */
++ while ((!spi_dma.dma_rx_done || !spi_dma.dma_tx_done) && wait_cycles < wait_limit) {
++ wait_cycles++;
++ udelay(1);
+ }
+
+- while(!spi_dma.dma_tx_done) {
+- udelay(5);
++ if (wait_cycles >= wait_limit) {
++ printk("McBSP read DMA timeout, spi_dma.dma_rx_done=%d, spi_dma.dma_tx_done=%d\n", spi_dma.dma_rx_done, spi_dma.dma_tx_done);
+ }
+
+ spi_dma.dma_rx_done = 0;
+@@ -184,11 +193,14 @@
+
+ SPI_CS_OFF();
+
+- return 0;
++ return wait_cycles;
+ }
+
+ int cx3110x_spi_dma_write(struct net_device *dev, unsigned long address, void * buffer, unsigned int length)
+ {
++ int wait_limit = 15000 * 5;
++ int wait_cycles = 0;
++
+ SPI_CS_ON();
+
+ omap_mcbsp_spi_master_xmit_word_poll(OMAP_MCBSP2, address << 8);
+@@ -239,16 +251,20 @@
+ omap_start_dma(spi_dma.dma_rx_ch);
+ omap_start_dma(spi_dma.dma_tx_ch);
+
+- /* We don't want to turn CS off before transfer is done */
+-
+- while(!spi_dma.dma_rx_done) {
+- udelay(5);
++ /* Wait for DMA writing to complete */
++ while ((!spi_dma.dma_rx_done || !spi_dma.dma_tx_done) && wait_cycles < wait_limit) {
++ wait_cycles++;
++ udelay(1);
+ }
+
+ while(!spi_dma.dma_tx_done) {
+ udelay(5);
+ }
+
++ if (wait_cycles >= wait_limit) {
++ printk("McBSP write DMA timeout, spi_dma.dma_rx_done=%d, spi_dma.dma_tx_done=%d\n", spi_dma.dma_rx_done, spi_dma.dma_tx_done);
++ }
++
+ spi_dma.dma_rx_done = 0;
+ spi_dma.dma_tx_done = 0;
+
+@@ -320,7 +336,7 @@
+ int cx3110x_spi_start(struct net_device *dev)
+ {
+ struct omap_mcbsp_spi_cfg spi_cfg;
+- int r, div = 1, rate_mhz, max_mhz = 14;
++ int r, div = 1, rate_mhz, max_mhz = 16;
+ struct net_local * lp;
+ struct spi_hif_local_data * spi_lp;
+
+@@ -368,11 +384,11 @@
+
+ cx3110x_hw_reset();
+
+- while(rate_mhz/div >= max_mhz)
++ while(rate_mhz/(div+1) >= max_mhz)
+ div++;
+
+- printk("McBSP2: freq_limit=%dMHz, base_freq=%dMHz, divisor=%d (%d.%dMHz)\n",
+- max_mhz, rate_mhz, div, rate_mhz / div, (rate_mhz * 10 / div) % 10);
++ printk("McBSP2: freq_limit=%dMHz, base_freq=%dMHz, div=%d (%d.%dMHz)\n",
++ max_mhz, rate_mhz, div, rate_mhz / (div+1), (rate_mhz * 10 / (div+1)) % 10);
+
+ spi_dma.dma_tx_done = 0;
+ spi_dma.dma_rx_done = 0;
+Index: cx3110x-0.8.1/src/sm_drv_spi_io.h
+===================================================================
+--- cx3110x-0.8.1.orig/src/sm_drv_spi_io.h 2008-04-28 18:30:22.000000000 -0300
++++ cx3110x-0.8.1/src/sm_drv_spi_io.h 2008-04-28 18:30:25.000000000 -0300
+@@ -27,15 +27,17 @@
+
+ int cx3110x_spi_read(struct net_device * dev, unsigned long address, unsigned char * buffer, unsigned int length);
+ int cx3110x_spi_write(struct net_device * dev, unsigned long address, unsigned char * buffer, unsigned int length);
+-int cx3110x_spi_dma_read(struct net_device *dev, unsigned long address, void * buffer, unsigned int length);
++int cx3110x_spi_dma_read_start(struct net_device *dev, unsigned long address, void * buffer, unsigned int length);
++int cx3110x_spi_dma_read_wait_for_completion(void);
+ int cx3110x_spi_dma_write(struct net_device *dev, unsigned long address, void * buffer, unsigned int length);
+
+ void cx3110x_dump_register(struct net_device * dev);
+
+-#define sm_spi_read(dev, addr, data, len) cx3110x_spi_read(dev, (addr), (data), (len))
++#define sm_spi_read(dev, addr, data, len) cx3110x_spi_read(dev, (addr), (data), (len))
+ #define sm_spi_write(dev, addr, data, len) cx3110x_spi_write(dev, (addr), (data), (len))
+
+-#define sm_spi_dma_read(dev, addr, data, len) cx3110x_spi_dma_read(dev, (addr), (data), (len))
++#define sm_spi_dma_read_start(dev, addr, data, len) cx3110x_spi_dma_read_start(dev, (addr), (data), (len))
++#define sm_spi_dma_read_wait_for_completion() cx3110x_spi_dma_read_wait_for_completion()
+ #define sm_spi_dma_write(dev, addr, data, len) cx3110x_spi_dma_write(dev, (addr), (data), (len))
+
+ #endif
diff --git a/recipes/mamona/cx3110x-770he-0.8.1/create_sysfs_link_for_wlan0.patch b/recipes/mamona/cx3110x-770he-0.8.1/create_sysfs_link_for_wlan0.patch
new file mode 100644
index 0000000000..cf4fa1e96a
--- /dev/null
+++ b/recipes/mamona/cx3110x-770he-0.8.1/create_sysfs_link_for_wlan0.patch
@@ -0,0 +1,11 @@
+--- cx3110x-0.8.1.new/src/sm_drv_spi.c 2008-05-13 10:27:19.000000000 -0300
++++ cx3110x-0.8.1/src/sm_drv_spi.c 2008-05-12 19:02:16.000000000 -0300
+@@ -1067,6 +1067,8 @@
+ goto err_out_4;
+ }
+
++ SET_NETDEV_DEV(dev, &wlan_omap_device.dev);
++
+ register_netdev(dev);
+
+ /* Let's fetch the firmware from userspace */
diff --git a/recipes/mamona/cx3110x-770he-0.8.1/cx3110x b/recipes/mamona/cx3110x-770he-0.8.1/cx3110x
new file mode 100755
index 0000000000..ce2ecdfbe8
--- /dev/null
+++ b/recipes/mamona/cx3110x-770he-0.8.1/cx3110x
@@ -0,0 +1,37 @@
+#!/bin/sh
+
+MODULE="/lib/modules/`uname -r`/cx3110x.ko"
+
+swap_module () {
+ if [ -e $MODULE ]; then
+ # Removing builtin driver
+ rmmod cx3110x
+ # Inserting the new one
+ insmod $MODULE
+ # Setting device options (MAC, default country, etc)
+ if [ -x /mnt/initfs/usr/bin/wlan-cal ]; then
+ chroot /mnt/initfs /usr/bin/wlan-cal
+ fi
+ else
+ echo "OOPS: $MODULE not found, the switch is not possible" 1>&2
+ fi
+}
+
+case "$1" in
+ start)
+ swap_module
+ ;;
+ stop)
+ rmmod cx3110x
+ ;;
+ force-reload | restart)
+ swap_module
+ ;;
+ *)
+ echo "Usage: /etc/init.d/cx3110x {start|stop|restart|force-reload}"
+ exit 1
+ ;;
+esac
+
+exit 0
+
diff --git a/recipes/mamona/cx3110x-770he-0.8.1/cx3110x.patch b/recipes/mamona/cx3110x-770he-0.8.1/cx3110x.patch
new file mode 100644
index 0000000000..06340581d1
--- /dev/null
+++ b/recipes/mamona/cx3110x-770he-0.8.1/cx3110x.patch
@@ -0,0 +1,492 @@
+Index: cx3110x-0.8.1/src/sm_drv_ioctl_umac.c
+===================================================================
+--- cx3110x-0.8.1.orig/src/sm_drv_ioctl_umac.c 2007-10-15 08:56:20.000000000 -0300
++++ cx3110x-0.8.1/src/sm_drv_ioctl_umac.c 2008-04-22 15:50:45.000000000 -0300
+@@ -76,7 +76,7 @@
+ kfree(wrqu.data.pointer);
+ }
+
+-void send_wpa_ie_event(struct net_device *dev, char * bss_addr, char * wpa_ie, size_t wpa_ie_len, uint32_t event)
++void send_wpa_ie_event(struct net_device *dev, char * wpa_ie, size_t wpa_ie_len, uint32_t event)
+ {
+ union iwreq_data wrqu;
+ uint32_t we_event;
+@@ -97,15 +97,12 @@
+ return;
+ }
+
+- wrqu.data.pointer = kzalloc(ETH_ALEN + 1 + wpa_ie_len, GFP_ATOMIC);
++ wrqu.data.pointer = kzalloc(wpa_ie_len, GFP_ATOMIC);
+ if (!wrqu.data.pointer)
+ return;
+
+- memcpy(wrqu.data.pointer, bss_addr, ETH_ALEN);
+- *((char *)(wrqu.data.pointer + ETH_ALEN)) = ':';
+- memcpy(wrqu.data.pointer + ETH_ALEN + 1, wpa_ie, wpa_ie_len);
+-
+- wrqu.data.length = ETH_ALEN + 1 + wpa_ie_len;
++ memcpy(wrqu.data.pointer, wpa_ie, wpa_ie_len);
++ wrqu.data.length = wpa_ie_len;
+
+ wireless_send_event(dev, we_event, &wrqu, wrqu.data.pointer);
+ kfree(wrqu.data.pointer);
+@@ -495,7 +492,7 @@
+ /* We send the event after parsing the association frame */
+ if ((lp->link_state == DOT11_STATE_ASSOCING || lp->link_state == DOT11_STATE_ASSOC)
+ && event)
+- send_wpa_ie_event(dev, bssid, wpa_ie, wpa_ie_len, event);
++ send_wpa_ie_event(dev, wpa_ie, wpa_ie_len, event);
+
+ /* try to use existing entry */
+ list_for_each_entry_safe(bss, safe, &lp->bss_wpa_list, list) {
+@@ -1782,6 +1779,435 @@
+ return sm_drv_oid_set(dev, DOT11_OID_STAKEY, (void *)&key, sizeof(struct obj_stakey));
+ }
+
++static int sm_drv_set_auth(struct net_device *dev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu, char *extra)
++{
++ struct net_local *priv = netdev_priv(dev);
++ struct iw_param *param = &wrqu->param;
++ u32 authen = 0, dot1x = 0;
++ u32 exunencrypt = 0, privinvoked = 0, wpa = 0;
++ u32 old_wpa;
++ int ret = 0;
++
++ DEBUG(DBG_IOCTL, "SET AUTH\n");
++
++ /* first get the flags */
++ down(&priv->wpa_sem);
++ wpa = old_wpa = priv->wpa;
++ up(&priv->wpa_sem);
++ ret = sm_drv_oid_get(dev, DOT11_OID_AUTHENABLE,
++ (void *)&authen, sizeof(uint32_t));
++ ret |= sm_drv_oid_get(dev, DOT11_OID_PRIVACYINVOKED,
++ (void *)&privinvoked, sizeof(uint32_t));
++ ret |= sm_drv_oid_get(dev, DOT11_OID_EXUNENCRYPTED,
++ (void *)&exunencrypt, sizeof(uint32_t));
++ ret |= sm_drv_oid_get(dev, DOT11_OID_DOT1XENABLE,
++ (void *)&dot1x, sizeof(uint32_t));
++
++ if (ret < 0)
++ goto out;
++
++ switch (param->flags & IW_AUTH_INDEX) {
++ case IW_AUTH_CIPHER_PAIRWISE:
++ case IW_AUTH_CIPHER_GROUP:
++ case IW_AUTH_KEY_MGMT:
++ break;
++
++ case IW_AUTH_WPA_ENABLED:
++ /* Do the same thing as IW_AUTH_WPA_VERSION */
++ if (param->value) {
++ wpa = DOT11_PRIV_INV_TKIP;
++ privinvoked = 1; /* For privacy invoked */
++ exunencrypt = 1; /* Filter out all unencrypted frames */
++ dot1x = 0x01; /* To enable eap filter */
++ authen = DOT11_AUTH_OS; /* Only WEP uses _SK and _BOTH */
++ } else {
++ wpa = DOT11_PRIV_INV_NONE;
++ privinvoked = 0;
++ exunencrypt = 0; /* Do not filter un-encrypted data */
++ dot1x = 0;
++ }
++ break;
++
++ case IW_AUTH_WPA_VERSION:
++ if (param->value & IW_AUTH_WPA_VERSION_DISABLED) {
++ wpa = DOT11_PRIV_INV_NONE;
++ privinvoked = 0;
++ exunencrypt = 0; /* Do not filter un-encrypted data */
++ dot1x = 0;
++ } else {
++ if (param->value & IW_AUTH_WPA_VERSION_WPA)
++ wpa = DOT11_PRIV_INV_TKIP;
++ else if (param->value & IW_AUTH_WPA_VERSION_WPA2)
++ wpa = DOT11_PRIV_INV_AES_CCMP;
++ privinvoked = 1; /* For privacy invoked */
++ exunencrypt = 1; /* Filter out all unencrypted frames */
++ dot1x = 0x01; /* To enable eap filter */
++ authen = DOT11_AUTH_OS; /* Only WEP uses _SK and _BOTH */
++ }
++ break;
++
++ case IW_AUTH_RX_UNENCRYPTED_EAPOL:
++ /* dot1x should be the opposite of RX_UNENCRYPTED_EAPOL;
++ * turn off dot1x when allowing receipt of unencrypted EAPOL
++ * frames, turn on dot1x when receipt should be disallowed
++ */
++ dot1x = param->value ? 0 : 0x01;
++ break;
++
++ case IW_AUTH_PRIVACY_INVOKED:
++ privinvoked = param->value ? 1 : 0;
++ break;
++
++ case IW_AUTH_DROP_UNENCRYPTED:
++ exunencrypt = param->value ? 1 : 0;
++ break;
++
++ case IW_AUTH_80211_AUTH_ALG:
++ if (param->value & IW_AUTH_ALG_SHARED_KEY) {
++ /* Only WEP uses _SK and _BOTH */
++ if (wpa > 0) {
++ ret = -EINVAL;
++ goto out;
++ }
++ authen = DOT11_AUTH_SK;
++ } else if (param->value & IW_AUTH_ALG_OPEN_SYSTEM) {
++ authen = DOT11_AUTH_OS;
++ } else {
++ ret = -EINVAL;
++ goto out;
++ }
++ break;
++
++ default:
++ return -EOPNOTSUPP;
++ }
++
++ /* Set all the values */
++ down(&priv->wpa_sem);
++ priv->wpa = wpa;
++ up(&priv->wpa_sem);
++
++ sm_drv_oid_set(dev, DOT11_OID_AUTHENABLE,
++ (void *)&authen, sizeof(uint32_t));
++ sm_drv_oid_set(dev, DOT11_OID_PRIVACYINVOKED,
++ (void *)&privinvoked, sizeof(uint32_t));
++ sm_drv_oid_set(dev, DOT11_OID_EXUNENCRYPTED,
++ (void *)&exunencrypt, sizeof(uint32_t));
++ sm_drv_oid_set(dev, DOT11_OID_DOT1XENABLE,
++ (void *)&dot1x, sizeof(uint32_t));
++
++ out:
++ return ret;
++}
++
++static int sm_drv_get_auth(struct net_device *dev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu, char *extra)
++{
++ struct net_local *priv = netdev_priv(dev);
++ struct iw_param *param = &wrqu->param;
++ u32 authen = 0, dot1x = 0;
++ u32 exunencrypt = 0, privinvoked = 0, wpa = 0;
++ int ret = 0;
++
++ DEBUG(DBG_IOCTL, "GET AUTH\n");
++
++ /* first get the flags */
++ down(&priv->wpa_sem);
++ wpa = priv->wpa;
++ up(&priv->wpa_sem);
++
++ switch (param->flags & IW_AUTH_INDEX) {
++ case IW_AUTH_CIPHER_PAIRWISE:
++ case IW_AUTH_CIPHER_GROUP:
++ case IW_AUTH_KEY_MGMT:
++ /*
++ * wpa_supplicant will control these internally
++ */
++ ret = -EOPNOTSUPP;
++ break;
++
++ case IW_AUTH_WPA_VERSION:
++ switch (wpa) {
++ case DOT11_PRIV_INV_TKIP:
++ param->value = IW_AUTH_WPA_VERSION_WPA;
++ break;
++ case DOT11_PRIV_INV_AES_CCMP:
++ param->value = IW_AUTH_WPA_VERSION_WPA2;
++ break;
++ default:
++ param->value = IW_AUTH_WPA_VERSION_DISABLED;
++ break;
++ }
++ break;
++
++ case IW_AUTH_DROP_UNENCRYPTED:
++ ret = sm_drv_oid_get(dev, DOT11_OID_EXUNENCRYPTED,
++ (void *)&exunencrypt, sizeof(uint32_t));
++ if (ret >= 0)
++ param->value = exunencrypt > 0 ? 1 : 0;
++ break;
++
++ case IW_AUTH_80211_AUTH_ALG:
++ ret = sm_drv_oid_get(dev, DOT11_OID_AUTHENABLE,
++ (void *)&authen, sizeof(uint32_t));
++ if (ret >= 0) {
++ switch (authen) {
++ case DOT11_AUTH_OS:
++ param->value = IW_AUTH_ALG_OPEN_SYSTEM;
++ break;
++ case DOT11_AUTH_BOTH:
++ case DOT11_AUTH_SK:
++ param->value = IW_AUTH_ALG_SHARED_KEY;
++ case DOT11_AUTH_NONE:
++ default:
++ param->value = 0;
++ break;
++ }
++ }
++ break;
++
++ case IW_AUTH_WPA_ENABLED:
++ param->value = wpa > 0 ? 1 : 0;
++ break;
++
++ case IW_AUTH_RX_UNENCRYPTED_EAPOL:
++ ret = sm_drv_oid_get(dev, DOT11_OID_DOT1XENABLE,
++ (void *)&dot1x, sizeof(uint32_t));
++ if (ret >= 0)
++ param->value = dot1x > 0 ? 1 : 0;
++ break;
++
++ case IW_AUTH_PRIVACY_INVOKED:
++ ret = sm_drv_oid_get(dev, DOT11_OID_PRIVACYINVOKED,
++ (void *)&privinvoked, sizeof(uint32_t));
++ if (ret >= 0)
++ param->value = privinvoked > 0 ? 1 : 0;
++ break;
++
++ default:
++ return -EOPNOTSUPP;
++ }
++ return ret;
++}
++
++#define KEY_SIZE_WEP104 13 /* 104/128-bit WEP keys */
++#define KEY_SIZE_WEP40 5 /* 40/64-bit WEP keys */
++#define KEY_SIZE_TKIP 32 /* TKIP keys */
++
++static int sm_drv_set_encodeext(struct net_device *dev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ struct iw_point *encoding = &wrqu->encoding;
++ struct iw_encode_ext *ext = (struct iw_encode_ext *)extra;
++ int idx, alg = ext->alg, set_key = 1;
++ int authen = DOT11_AUTH_OS, invoke = 0, exunencrypt = 0;
++ int ret = 0;
++
++ DEBUG(DBG_IOCTL, "SET ENCODEEXT\n");
++
++ /* Determine and validate the key index */
++ idx = (encoding->flags & IW_ENCODE_INDEX) - 1;
++ if (idx) {
++ if (idx < 0 || idx > 3)
++ return -EINVAL;
++ } else {
++ ret = sm_drv_oid_get(dev, DOT11_OID_DEFKEYID,
++ (void *)&idx, sizeof(uint32_t));
++ if (ret < 0)
++ goto out;
++ }
++
++ if (encoding->flags & IW_ENCODE_DISABLED)
++ alg = IW_ENCODE_ALG_NONE;
++
++ if (ext->ext_flags & IW_ENCODE_EXT_SET_TX_KEY) {
++ /* Only set transmit key index here, actual
++ * key is set below if needed.
++ */
++ ret = sm_drv_oid_set(dev, DOT11_OID_DEFKEYID,
++ (void *)&idx, sizeof(uint32_t));
++ set_key = ext->key_len > 0 ? 1 : 0;
++ }
++
++ if (set_key) {
++ switch (alg) {
++ case IW_ENCODE_ALG_NONE:
++ break;
++ case IW_ENCODE_ALG_WEP: {
++ struct obj_key key = { DOT11_PRIV_WEP, 0, "" };
++ memset(key.key, 0, sizeof(key.key));
++ if (ext->key_len > KEY_SIZE_WEP104) {
++ ret = -EINVAL;
++ goto out;
++ }
++ if (ext->key_len > KEY_SIZE_WEP40)
++ key.length = KEY_SIZE_WEP104;
++ else
++ key.length = KEY_SIZE_WEP40;
++ memcpy(key.key, ext->key, ext->key_len);
++ ret = sm_drv_oid_set(dev, DOT11_OID_DEFKEYID + idx + 1,
++ (void *)&key,
++ sizeof(struct obj_key));
++ break;
++ }
++ case IW_ENCODE_ALG_TKIP:
++ case IW_ENCODE_ALG_CCMP: {
++ struct obj_stakey key;
++ memset(key.key, 0, sizeof(key.key));
++ if (alg == IW_ENCODE_ALG_TKIP)
++ key.type = DOT11_PRIV_TKIP;
++ else
++ key.type = DOT11_PRIV_AES_CCMP;
++ memcpy(key.address, ext->addr.sa_data, ETH_ALEN);
++ key.length = ext->key_len;
++ key.keyid = idx;
++ key.ext = 0;
++ memcpy(key.key, ext->key, ext->key_len);
++ ret = sm_drv_oid_set(dev, DOT11_OID_STAKEY,
++ (void *)&key,
++ sizeof(struct obj_stakey));
++ break;
++ }
++ default:
++ return -EINVAL;
++ }
++
++ if (ret < 0)
++ goto out;
++
++ }
++
++ /* Read the flags */
++ if (encoding->flags & IW_ENCODE_DISABLED) {
++ /* Encoding disabled,
++ * authen = DOT11_AUTH_OS;
++ * invoke = 0;
++ * exunencrypt = 0; */
++ }
++ if (encoding->flags & IW_ENCODE_OPEN) {
++ /* Encode but accept non-encoded packets. No auth */
++ invoke = 1;
++ }
++ if (encoding->flags & IW_ENCODE_RESTRICTED) {
++ /* Refuse non-encoded packets. Auth */
++ authen = DOT11_AUTH_BOTH;
++ invoke = 1;
++ exunencrypt = 1;
++ }
++
++ /* do the change if requested */
++ if (encoding->flags & IW_ENCODE_MODE) {
++ sm_drv_oid_set(dev, DOT11_OID_AUTHENABLE,
++ (void *)&authen, sizeof(uint32_t));
++ sm_drv_oid_set(dev, DOT11_OID_PRIVACYINVOKED,
++ (void *)&invoke, sizeof(uint32_t));
++ sm_drv_oid_set(dev, DOT11_OID_EXUNENCRYPTED,
++ (void *)&exunencrypt, sizeof(uint32_t));
++ }
++
++ out:
++ return ret;
++}
++
++
++static int sm_drv_get_encodeext(struct net_device *dev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ struct net_local *priv = netdev_priv(dev);
++ struct iw_point *encoding = &wrqu->encoding;
++ struct iw_encode_ext *ext = (struct iw_encode_ext *)extra;
++ int idx, max_key_len;
++ int authen = DOT11_AUTH_OS, invoke = 0, exunencrypt = 0, wpa = 0;
++ int ret = 0;
++
++ DEBUG(DBG_IOCTL, "GET ENCODEEXT\n");
++
++ /* first get the flags */
++ ret = sm_drv_oid_get(dev, DOT11_OID_AUTHENABLE,
++ (void *)&authen, sizeof(uint32_t));
++ ret |= sm_drv_oid_get(dev, DOT11_OID_PRIVACYINVOKED,
++ (void *)&invoke, sizeof(uint32_t));
++ ret |= sm_drv_oid_get(dev, DOT11_OID_EXUNENCRYPTED,
++ (void *)&exunencrypt, sizeof(uint32_t));
++ if (ret < 0)
++ goto out;
++
++ max_key_len = encoding->length - sizeof(*ext);
++ if (max_key_len < 0)
++ return -EINVAL;
++
++ idx = (encoding->flags & IW_ENCODE_INDEX) - 1;
++ if (idx) {
++ if (idx < 0 || idx > 3)
++ return -EINVAL;
++ } else {
++ ret = sm_drv_oid_get(dev, DOT11_OID_DEFKEYID,
++ (void *)&idx, sizeof(uint32_t));
++ if (ret < 0)
++ goto out;
++ }
++
++ encoding->flags = idx + 1;
++ memset(ext, 0, sizeof(*ext));
++
++ switch (authen) {
++ case DOT11_AUTH_BOTH:
++ case DOT11_AUTH_SK:
++ wrqu->encoding.flags |= IW_ENCODE_RESTRICTED;
++ case DOT11_AUTH_OS:
++ default:
++ wrqu->encoding.flags |= IW_ENCODE_OPEN;
++ break;
++ }
++
++ down(&priv->wpa_sem);
++ wpa = priv->wpa;
++ up(&priv->wpa_sem);
++
++ if (authen == DOT11_AUTH_OS && !exunencrypt && !invoke && !wpa) {
++ /* No encryption */
++ ext->alg = IW_ENCODE_ALG_NONE;
++ ext->key_len = 0;
++ wrqu->encoding.flags |= IW_ENCODE_DISABLED;
++ } else {
++ struct obj_key *key;
++
++ ret = sm_drv_oid_get(dev, DOT11_OID_DEFKEYID + idx + 1,
++ (void *)&key, sizeof(struct obj_key));
++ if (ret < 0)
++ goto out;
++ if (max_key_len < key->length) {
++ ret = -E2BIG;
++ goto out;
++ }
++ memcpy(ext->key, key->key, key->length);
++ ext->key_len = key->length;
++
++ switch (key->type) {
++ case DOT11_PRIV_TKIP:
++ ext->alg = IW_ENCODE_ALG_TKIP;
++ break;
++ case DOT11_PRIV_AES_CCMP:
++ ext->alg = IW_ENCODE_ALG_CCMP;
++ break;
++ default:
++ case DOT11_PRIV_WEP:
++ ext->alg = IW_ENCODE_ALG_WEP;
++ break;
++ }
++ wrqu->encoding.flags |= IW_ENCODE_ENABLED;
++ }
++
++ out:
++ return ret;
++}
+
+ /* Private handlers */
+
+@@ -2155,10 +2581,10 @@
+ (iw_handler) NULL, /* -- hole -- */
+ (iw_handler) sm_drv_set_genie, /* SIOCSIWGENIE*/
+ (iw_handler) NULL, /* SIOCGIWGENIE */
+- (iw_handler) NULL, /* SIOCSIWAUTH */
+- (iw_handler) NULL, /* SIOCGIWAUTH */
+- (iw_handler) NULL, /* SIOCSIWENCODEEXT */
+- (iw_handler) NULL, /* SIOCGIWENCODEEXT */
++ (iw_handler) sm_drv_set_auth, /* SIOCSIWAUTH */
++ (iw_handler) sm_drv_get_auth, /* SIOCGIWAUTH */
++ (iw_handler) sm_drv_set_encodeext, /* SIOCSIWENCODEEXT */
++ (iw_handler) sm_drv_get_encodeext, /* SIOCGIWENCODEEXT */
+ (iw_handler) sm_drv_set_pmk, /* SIOCSIWPMKSA */
+ };
+
diff --git a/recipes/mamona/cx3110x-770he-0.8.1/defconfig b/recipes/mamona/cx3110x-770he-0.8.1/defconfig
new file mode 100644
index 0000000000..7119b50f34
--- /dev/null
+++ b/recipes/mamona/cx3110x-770he-0.8.1/defconfig
@@ -0,0 +1,1380 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.16.27-omap1
+# Fri Apr 18 16:19:13 2008
+#
+CONFIG_ARM=y
+CONFIG_MMU=y
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+
+#
+# Code maturity level options
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_BROKEN_ON_SMP=y
+CONFIG_LOCK_KERNEL=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
+
+#
+# General setup
+#
+CONFIG_LOCALVERSION=""
+# CONFIG_LOCALVERSION_AUTO is not set
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+CONFIG_POSIX_MQUEUE=y
+# CONFIG_BSD_PROCESS_ACCT is not set
+CONFIG_SYSCTL=y
+# CONFIG_AUDIT is not set
+# CONFIG_IKCONFIG is not set
+CONFIG_INITRAMFS_SOURCE=""
+CONFIG_UID16=y
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+# CONFIG_EMBEDDED is not set
+CONFIG_KALLSYMS=y
+# CONFIG_KALLSYMS_ALL is not set
+# CONFIG_KALLSYMS_EXTRA_PASS is not set
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+CONFIG_ELF_CORE=y
+CONFIG_BASE_FULL=y
+CONFIG_FUTEX=y
+CONFIG_EPOLL=y
+CONFIG_SHMEM=y
+CONFIG_CC_ALIGN_FUNCTIONS=0
+CONFIG_CC_ALIGN_LABELS=0
+CONFIG_CC_ALIGN_LOOPS=0
+CONFIG_CC_ALIGN_JUMPS=0
+CONFIG_SLAB=y
+# CONFIG_TINY_SHMEM is not set
+CONFIG_BASE_SMALL=0
+# CONFIG_SLOB is not set
+
+#
+# Loadable module support
+#
+CONFIG_MODULES=y
+CONFIG_MODULE_UNLOAD=y
+# CONFIG_MODULE_FORCE_UNLOAD is not set
+CONFIG_OBSOLETE_MODPARM=y
+# CONFIG_MODVERSIONS is not set
+# CONFIG_MODULE_SRCVERSION_ALL is not set
+# CONFIG_KMOD is not set
+
+#
+# Block layer
+#
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+# CONFIG_IOSCHED_AS is not set
+# CONFIG_IOSCHED_DEADLINE is not set
+CONFIG_IOSCHED_CFQ=y
+# CONFIG_DEFAULT_AS is not set
+# CONFIG_DEFAULT_DEADLINE is not set
+CONFIG_DEFAULT_CFQ=y
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED="cfq"
+
+#
+# System Type
+#
+# CONFIG_ARCH_CLPS7500 is not set
+# CONFIG_ARCH_CLPS711X is not set
+# CONFIG_ARCH_CO285 is not set
+# CONFIG_ARCH_EBSA110 is not set
+# CONFIG_ARCH_FOOTBRIDGE is not set
+# CONFIG_ARCH_INTEGRATOR is not set
+# CONFIG_ARCH_IOP3XX is not set
+# CONFIG_ARCH_IXP4XX is not set
+# CONFIG_ARCH_IXP2000 is not set
+# CONFIG_ARCH_L7200 is not set
+# CONFIG_ARCH_PXA is not set
+# CONFIG_ARCH_RPC is not set
+# CONFIG_ARCH_SA1100 is not set
+# CONFIG_ARCH_S3C2410 is not set
+# CONFIG_ARCH_SHARK is not set
+# CONFIG_ARCH_LH7A40X is not set
+CONFIG_ARCH_OMAP=y
+# CONFIG_ARCH_VERSATILE is not set
+# CONFIG_ARCH_REALVIEW is not set
+# CONFIG_ARCH_IMX is not set
+# CONFIG_ARCH_H720X is not set
+# CONFIG_ARCH_AAEC2000 is not set
+# CONFIG_ARCH_AT91RM9200 is not set
+
+#
+# TI OMAP Implementations
+#
+CONFIG_ARCH_OMAP_OTG=y
+CONFIG_ARCH_OMAP1=y
+# CONFIG_ARCH_OMAP2 is not set
+
+#
+# OMAP Feature Selections
+#
+CONFIG_OMAP_RESET_CLOCKS=y
+CONFIG_OMAP_BOOT_TAG=y
+CONFIG_OMAP_BOOT_REASON=y
+CONFIG_OMAP_COMPONENT_VERSION=y
+CONFIG_OMAP_GPIO_SWITCH=y
+# CONFIG_OMAP_MUX is not set
+CONFIG_OMAP_STI=y
+CONFIG_OMAP_STI_CONSOLE=y
+# CONFIG_OMAP_MPU_TIMER is not set
+CONFIG_OMAP_32K_TIMER=y
+CONFIG_OMAP_32K_TIMER_HZ=128
+CONFIG_OMAP_DM_TIMER=y
+CONFIG_OMAP_LL_DEBUG_UART1=y
+# CONFIG_OMAP_LL_DEBUG_UART2 is not set
+# CONFIG_OMAP_LL_DEBUG_UART3 is not set
+
+#
+# OMAP Core Type
+#
+# CONFIG_ARCH_OMAP730 is not set
+# CONFIG_ARCH_OMAP15XX is not set
+CONFIG_ARCH_OMAP16XX=y
+
+#
+# OMAP Board Type
+#
+# CONFIG_MACH_OMAP_INNOVATOR is not set
+# CONFIG_MACH_OMAP_H2 is not set
+# CONFIG_MACH_OMAP_H3 is not set
+# CONFIG_MACH_OMAP_OSK is not set
+CONFIG_MACH_NOKIA770=y
+# CONFIG_MACH_OMAP_GENERIC is not set
+
+#
+# OMAP CPU Speed
+#
+CONFIG_OMAP_CLOCKS_SET_BY_BOOTLOADER=y
+CONFIG_OMAP_ARM_216MHZ=y
+# CONFIG_OMAP_ARM_192MHZ is not set
+# CONFIG_OMAP_ARM_168MHZ is not set
+# CONFIG_OMAP_ARM_120MHZ is not set
+# CONFIG_OMAP_ARM_60MHZ is not set
+# CONFIG_OMAP_ARM_30MHZ is not set
+CONFIG_OMAP_DSP=y
+# CONFIG_OMAP_DSP_MBCMD_VERBOSE is not set
+CONFIG_OMAP_DSP_TASK_MULTIOPEN=y
+CONFIG_OMAP_DSP_FBEXPORT=y
+
+#
+# Processor Type
+#
+CONFIG_CPU_32=y
+CONFIG_CPU_ARM926T=y
+CONFIG_CPU_32v5=y
+CONFIG_CPU_ABRT_EV5TJ=y
+CONFIG_CPU_CACHE_VIVT=y
+CONFIG_CPU_COPY_V4WB=y
+CONFIG_CPU_TLB_V4WBI=y
+
+#
+# Processor Features
+#
+CONFIG_ARM_THUMB=y
+# CONFIG_CPU_ICACHE_DISABLE is not set
+# CONFIG_CPU_DCACHE_DISABLE is not set
+# CONFIG_CPU_DCACHE_WRITETHROUGH is not set
+# CONFIG_CPU_CACHE_ROUND_ROBIN is not set
+
+#
+# Bus support
+#
+
+#
+# PCCARD (PCMCIA/CardBus) support
+#
+# CONFIG_PCCARD is not set
+
+#
+# Kernel Features
+#
+CONFIG_PREEMPT=y
+CONFIG_NO_IDLE_HZ=y
+CONFIG_AEABI=y
+CONFIG_OABI_COMPAT=y
+# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
+CONFIG_SELECT_MEMORY_MODEL=y
+CONFIG_FLATMEM_MANUAL=y
+# CONFIG_DISCONTIGMEM_MANUAL is not set
+# CONFIG_SPARSEMEM_MANUAL is not set
+CONFIG_FLATMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+# CONFIG_SPARSEMEM_STATIC is not set
+CONFIG_SPLIT_PTLOCK_CPUS=4096
+# CONFIG_LEDS is not set
+CONFIG_ALIGNMENT_TRAP=y
+
+#
+# Boot options
+#
+CONFIG_ZBOOT_ROM_TEXT=0x0
+CONFIG_ZBOOT_ROM_BSS=0x0
+CONFIG_CMDLINE="root=1f03 rootfstype=jffs2 time"
+# CONFIG_XIP_KERNEL is not set
+
+#
+# CPU Frequency scaling
+#
+# CONFIG_CPU_FREQ is not set
+
+#
+# Floating point emulation
+#
+
+#
+# At least one emulation must be selected
+#
+CONFIG_FPE_NWFPE=y
+# CONFIG_FPE_NWFPE_XP is not set
+# CONFIG_FPE_FASTFPE is not set
+# CONFIG_VFP is not set
+
+#
+# Userspace binary formats
+#
+CONFIG_BINFMT_ELF=y
+# CONFIG_BINFMT_AOUT is not set
+# CONFIG_BINFMT_MISC is not set
+
+#
+# Power management options
+#
+CONFIG_PM=y
+# CONFIG_PM_LEGACY is not set
+# CONFIG_PM_DEBUG is not set
+# CONFIG_APM is not set
+
+#
+# Networking
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+# CONFIG_NETDEBUG is not set
+CONFIG_PACKET=y
+# CONFIG_PACKET_MMAP is not set
+CONFIG_UNIX=y
+# CONFIG_NET_KEY is not set
+CONFIG_INET=y
+CONFIG_IP_MULTICAST=y
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_FIB_HASH=y
+# CONFIG_IP_PNP is not set
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_IP_MROUTE is not set
+# CONFIG_ARPD is not set
+# CONFIG_SYN_COOKIES is not set
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_INET_IPCOMP is not set
+# CONFIG_INET_TUNNEL is not set
+# CONFIG_INET_DIAG is not set
+# CONFIG_TCP_CONG_ADVANCED is not set
+CONFIG_TCP_CONG_BIC=y
+
+#
+# IP: Virtual Server Configuration
+#
+# CONFIG_IP_VS is not set
+# CONFIG_IPV6 is not set
+CONFIG_NETFILTER=y
+# CONFIG_NETFILTER_DEBUG is not set
+
+#
+# Core Netfilter Configuration
+#
+CONFIG_NETFILTER_NETLINK=y
+# CONFIG_NETFILTER_NETLINK_QUEUE is not set
+# CONFIG_NETFILTER_NETLINK_LOG is not set
+# CONFIG_NF_CONNTRACK is not set
+CONFIG_NETFILTER_XTABLES=y
+# CONFIG_NETFILTER_XT_TARGET_CLASSIFY is not set
+# CONFIG_NETFILTER_XT_TARGET_MARK is not set
+# CONFIG_NETFILTER_XT_TARGET_NFQUEUE is not set
+# CONFIG_NETFILTER_XT_MATCH_COMMENT is not set
+# CONFIG_NETFILTER_XT_MATCH_DCCP is not set
+# CONFIG_NETFILTER_XT_MATCH_LENGTH is not set
+# CONFIG_NETFILTER_XT_MATCH_LIMIT is not set
+# CONFIG_NETFILTER_XT_MATCH_MAC is not set
+# CONFIG_NETFILTER_XT_MATCH_MARK is not set
+# CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set
+# CONFIG_NETFILTER_XT_MATCH_REALM is not set
+# CONFIG_NETFILTER_XT_MATCH_SCTP is not set
+# CONFIG_NETFILTER_XT_MATCH_STRING is not set
+# CONFIG_NETFILTER_XT_MATCH_TCPMSS is not set
+
+#
+# IP: Netfilter Configuration
+#
+# CONFIG_IP_NF_CONNTRACK is not set
+# CONFIG_IP_NF_QUEUE is not set
+CONFIG_IP_NF_IPTABLES=y
+# CONFIG_IP_NF_MATCH_IPRANGE is not set
+# CONFIG_IP_NF_MATCH_MULTIPORT is not set
+# CONFIG_IP_NF_MATCH_TOS is not set
+# CONFIG_IP_NF_MATCH_RECENT is not set
+# CONFIG_IP_NF_MATCH_ECN is not set
+# CONFIG_IP_NF_MATCH_DSCP is not set
+# CONFIG_IP_NF_MATCH_AH_ESP is not set
+# CONFIG_IP_NF_MATCH_TTL is not set
+# CONFIG_IP_NF_MATCH_OWNER is not set
+# CONFIG_IP_NF_MATCH_ADDRTYPE is not set
+# CONFIG_IP_NF_MATCH_HASHLIMIT is not set
+CONFIG_IP_NF_FILTER=y
+# CONFIG_IP_NF_TARGET_REJECT is not set
+# CONFIG_IP_NF_TARGET_LOG is not set
+# CONFIG_IP_NF_TARGET_ULOG is not set
+# CONFIG_IP_NF_TARGET_TCPMSS is not set
+CONFIG_IP_NF_TARGET_IDLETIMER=y
+# CONFIG_IP_NF_MANGLE is not set
+# CONFIG_IP_NF_RAW is not set
+# CONFIG_IP_NF_ARPTABLES is not set
+
+#
+# DCCP Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_DCCP is not set
+
+#
+# SCTP Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_SCTP is not set
+
+#
+# TIPC Configuration (EXPERIMENTAL)
+#
+# CONFIG_TIPC is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_NET_DIVERT is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+
+#
+# QoS and/or fair queueing
+#
+# CONFIG_NET_SCHED is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_HAMRADIO is not set
+# CONFIG_IRDA is not set
+CONFIG_BT=y
+CONFIG_BT_L2CAP=y
+CONFIG_BT_SCO=m
+CONFIG_BT_RFCOMM=y
+CONFIG_BT_RFCOMM_TTY=y
+CONFIG_BT_BNEP=m
+# CONFIG_BT_BNEP_MC_FILTER is not set
+# CONFIG_BT_BNEP_PROTO_FILTER is not set
+CONFIG_BT_HIDP=y
+
+#
+# Bluetooth device drivers
+#
+# CONFIG_BT_HCIUSB is not set
+# CONFIG_BT_HCIUART is not set
+# CONFIG_BT_HCIBCM203X is not set
+# CONFIG_BT_HCIBPA10X is not set
+# CONFIG_BT_HCIBFUSB is not set
+CONFIG_BT_HCIBRF6150=y
+# CONFIG_BT_HCIVHCI is not set
+# CONFIG_IEEE80211 is not set
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_STANDALONE=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+CONFIG_FW_LOADER=y
+# CONFIG_DEBUG_DRIVER is not set
+
+#
+# Connector - unified userspace <-> kernelspace linker
+#
+CONFIG_CONNECTOR=y
+# CONFIG_PROC_EVENTS is not set
+
+#
+# Memory Technology Devices (MTD)
+#
+CONFIG_MTD=y
+# CONFIG_MTD_DEBUG is not set
+# CONFIG_MTD_CONCAT is not set
+CONFIG_MTD_PARTITIONS=y
+# CONFIG_MTD_REDBOOT_PARTS is not set
+CONFIG_MTD_CMDLINE_PARTS=y
+# CONFIG_MTD_AFS_PARTS is not set
+
+#
+# User Modules And Translation Layers
+#
+CONFIG_MTD_CHAR=y
+CONFIG_MTD_BLOCK=y
+# CONFIG_FTL is not set
+# CONFIG_NFTL is not set
+# CONFIG_INFTL is not set
+# CONFIG_RFD_FTL is not set
+
+#
+# RAM/ROM/Flash chip drivers
+#
+# CONFIG_MTD_CFI is not set
+# CONFIG_MTD_JEDECPROBE is not set
+CONFIG_MTD_MAP_BANK_WIDTH_1=y
+CONFIG_MTD_MAP_BANK_WIDTH_2=y
+CONFIG_MTD_MAP_BANK_WIDTH_4=y
+# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
+CONFIG_MTD_CFI_I1=y
+CONFIG_MTD_CFI_I2=y
+# CONFIG_MTD_CFI_I4 is not set
+# CONFIG_MTD_CFI_I8 is not set
+# CONFIG_MTD_RAM is not set
+# CONFIG_MTD_ROM is not set
+# CONFIG_MTD_ABSENT is not set
+# CONFIG_MTD_OBSOLETE_CHIPS is not set
+
+#
+# Mapping drivers for chip access
+#
+# CONFIG_MTD_COMPLEX_MAPPINGS is not set
+# CONFIG_MTD_PLATRAM is not set
+
+#
+# Self-contained MTD device drivers
+#
+# CONFIG_MTD_DATAFLASH is not set
+# CONFIG_MTD_M25P80 is not set
+# CONFIG_MTD_SLRAM is not set
+# CONFIG_MTD_PHRAM is not set
+# CONFIG_MTD_MTDRAM is not set
+# CONFIG_MTD_BLKMTD is not set
+# CONFIG_MTD_BLOCK2MTD is not set
+
+#
+# Disk-On-Chip Device Drivers
+#
+# CONFIG_MTD_DOC2000 is not set
+# CONFIG_MTD_DOC2001 is not set
+# CONFIG_MTD_DOC2001PLUS is not set
+
+#
+# NAND Flash Device Drivers
+#
+CONFIG_MTD_NAND=y
+# CONFIG_MTD_NAND_VERIFY_WRITE is not set
+# CONFIG_MTD_NAND_TOTO is not set
+CONFIG_MTD_NAND_IDS=y
+# CONFIG_MTD_NAND_DISKONCHIP is not set
+# CONFIG_MTD_NAND_NANDSIM is not set
+CONFIG_MTD_NAND_OMAP_HW=y
+
+#
+# OneNAND Flash Device Drivers
+#
+# CONFIG_MTD_ONENAND is not set
+# CONFIG_MTD_ONENAND_SYNC_READ is not set
+
+#
+# Parallel port support
+#
+# CONFIG_PARPORT is not set
+
+#
+# Plug and Play support
+#
+
+#
+# Block devices
+#
+# CONFIG_BLK_DEV_COW_COMMON is not set
+CONFIG_BLK_DEV_LOOP=y
+# CONFIG_BLK_DEV_CRYPTOLOOP is not set
+# CONFIG_BLK_DEV_NBD is not set
+# CONFIG_BLK_DEV_UB is not set
+# CONFIG_BLK_DEV_RAM is not set
+CONFIG_BLK_DEV_RAM_COUNT=16
+# CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_ATA_OVER_ETH is not set
+
+#
+# SCSI device support
+#
+# CONFIG_RAID_ATTRS is not set
+CONFIG_SCSI=m
+# CONFIG_SCSI_PROC_FS is not set
+
+#
+# SCSI support type (disk, tape, CD-ROM)
+#
+CONFIG_BLK_DEV_SD=m
+# CONFIG_CHR_DEV_ST is not set
+# CONFIG_CHR_DEV_OSST is not set
+# CONFIG_BLK_DEV_SR is not set
+# CONFIG_CHR_DEV_SG is not set
+# CONFIG_CHR_DEV_SCH is not set
+
+#
+# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
+#
+# CONFIG_SCSI_MULTI_LUN is not set
+# CONFIG_SCSI_CONSTANTS is not set
+# CONFIG_SCSI_LOGGING is not set
+
+#
+# SCSI Transport Attributes
+#
+# CONFIG_SCSI_SPI_ATTRS is not set
+# CONFIG_SCSI_FC_ATTRS is not set
+# CONFIG_SCSI_ISCSI_ATTRS is not set
+# CONFIG_SCSI_SAS_ATTRS is not set
+
+#
+# SCSI low-level drivers
+#
+# CONFIG_ISCSI_TCP is not set
+# CONFIG_SCSI_SATA is not set
+# CONFIG_SCSI_DEBUG is not set
+
+#
+# Multi-device support (RAID and LVM)
+#
+# CONFIG_MD is not set
+
+#
+# Fusion MPT device support
+#
+# CONFIG_FUSION is not set
+
+#
+# IEEE 1394 (FireWire) support
+#
+
+#
+# I2O device support
+#
+
+#
+# Network device support
+#
+CONFIG_NETDEVICES=y
+# CONFIG_DUMMY is not set
+# CONFIG_BONDING is not set
+# CONFIG_EQUALIZER is not set
+CONFIG_TUN=y
+
+#
+# PHY device support
+#
+# CONFIG_PHYLIB is not set
+
+#
+# Ethernet (10 or 100Mbit)
+#
+CONFIG_NET_ETHERNET=y
+CONFIG_MII=y
+# CONFIG_SMC91X is not set
+# CONFIG_DM9000 is not set
+
+#
+# Ethernet (1000 Mbit)
+#
+
+#
+# Ethernet (10000 Mbit)
+#
+
+#
+# Token Ring devices
+#
+
+#
+# Wireless LAN (non-hamradio)
+#
+CONFIG_NET_RADIO=y
+
+#
+# Obsolete Wireless cards support (pre-802.11)
+#
+# CONFIG_STRIP is not set
+# CONFIG_ATMEL is not set
+# CONFIG_HOSTAP is not set
+
+#
+# Wan interfaces
+#
+# CONFIG_WAN is not set
+CONFIG_PPP=y
+# CONFIG_PPP_MULTILINK is not set
+CONFIG_PPP_FILTER=y
+CONFIG_PPP_ASYNC=y
+# CONFIG_PPP_SYNC_TTY is not set
+CONFIG_PPP_DEFLATE=y
+CONFIG_PPP_BSDCOMP=y
+# CONFIG_PPP_MPPE is not set
+# CONFIG_PPPOE is not set
+# CONFIG_SLIP is not set
+# CONFIG_SHAPER is not set
+# CONFIG_NETCONSOLE is not set
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
+
+#
+# ISDN subsystem
+#
+# CONFIG_ISDN is not set
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+
+#
+# Userland interfaces
+#
+CONFIG_INPUT_MOUSEDEV=y
+# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
+CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
+# CONFIG_INPUT_JOYDEV is not set
+# CONFIG_INPUT_TSDEV is not set
+CONFIG_INPUT_EVDEV=y
+# CONFIG_INPUT_EVBUG is not set
+
+#
+# Input Device Drivers
+#
+CONFIG_INPUT_KEYBOARD=y
+# CONFIG_KEYBOARD_ATKBD is not set
+# CONFIG_KEYBOARD_SUNKBD is not set
+# CONFIG_KEYBOARD_LKKBD is not set
+# CONFIG_KEYBOARD_XTKBD is not set
+# CONFIG_KEYBOARD_NEWTON is not set
+CONFIG_KEYBOARD_OMAP=y
+# CONFIG_INPUT_MOUSE is not set
+# CONFIG_INPUT_JOYSTICK is not set
+CONFIG_INPUT_TOUCHSCREEN=y
+CONFIG_TOUCHSCREEN_ADS7846=y
+# CONFIG_TOUCHSCREEN_GUNZE is not set
+# CONFIG_TOUCHSCREEN_ELO is not set
+# CONFIG_TOUCHSCREEN_MTOUCH is not set
+# CONFIG_TOUCHSCREEN_MK712 is not set
+# CONFIG_TOUCHSCREEN_OMAP is not set
+# CONFIG_INPUT_MISC is not set
+
+#
+# Hardware I/O ports
+#
+CONFIG_SERIO=y
+CONFIG_SERIO_SERPORT=y
+# CONFIG_SERIO_RAW is not set
+# CONFIG_GAMEPORT is not set
+
+#
+# Character devices
+#
+CONFIG_VT=y
+CONFIG_VT_CONSOLE=y
+CONFIG_HW_CONSOLE=y
+# CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+CONFIG_SERIAL_8250=y
+CONFIG_SERIAL_8250_CONSOLE=y
+CONFIG_SERIAL_8250_NR_UARTS=4
+CONFIG_SERIAL_8250_RUNTIME_UARTS=4
+# CONFIG_SERIAL_8250_EXTENDED is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+CONFIG_UNIX98_PTYS=y
+# CONFIG_LEGACY_PTYS is not set
+
+#
+# IPMI
+#
+# CONFIG_IPMI_HANDLER is not set
+
+#
+# Watchdog Cards
+#
+CONFIG_WATCHDOG=y
+CONFIG_WATCHDOG_NOWAYOUT=y
+
+#
+# Watchdog Device Drivers
+#
+# CONFIG_SOFT_WATCHDOG is not set
+
+#
+# USB-based Watchdog Cards
+#
+# CONFIG_USBPCWATCHDOG is not set
+CONFIG_OMAP_WATCHDOG=y
+CONFIG_OMAP_RNG=y
+# CONFIG_NVRAM is not set
+# CONFIG_RTC is not set
+# CONFIG_OMAP_RTC is not set
+# CONFIG_DTLK is not set
+# CONFIG_R3964 is not set
+
+#
+# Ftape, the floppy tape device driver
+#
+# CONFIG_RAW_DRIVER is not set
+
+#
+# TPM devices
+#
+# CONFIG_TCG_TPM is not set
+# CONFIG_TELCLOCK is not set
+
+#
+# I2C support
+#
+CONFIG_I2C=y
+# CONFIG_I2C_CHARDEV is not set
+
+#
+# I2C Algorithms
+#
+# CONFIG_I2C_ALGOBIT is not set
+# CONFIG_I2C_ALGOPCF is not set
+# CONFIG_I2C_ALGOPCA is not set
+
+#
+# I2C Hardware Bus support
+#
+# CONFIG_I2C_PARPORT_LIGHT is not set
+# CONFIG_I2C_STUB is not set
+# CONFIG_I2C_PCA_ISA is not set
+CONFIG_I2C_OMAP=y
+
+#
+# Miscellaneous I2C Chip support
+#
+# CONFIG_SENSORS_DS1337 is not set
+# CONFIG_SENSORS_DS1374 is not set
+# CONFIG_SENSORS_EEPROM is not set
+# CONFIG_SENSORS_PCF8574 is not set
+# CONFIG_SENSORS_PCA9539 is not set
+# CONFIG_SENSORS_PCF8591 is not set
+# CONFIG_SENSORS_RTC8564 is not set
+# CONFIG_ISP1301_OMAP is not set
+# CONFIG_TPS65010 is not set
+CONFIG_SENSORS_TLV320AIC23=y
+CONFIG_SENSORS_TLV320AIC23_ESD_WORKAROUND=y
+# CONFIG_GPIOEXPANDER_OMAP is not set
+# CONFIG_SENSORS_MAX6875 is not set
+# CONFIG_RTC_X1205_I2C is not set
+# CONFIG_I2C_DEBUG_CORE is not set
+# CONFIG_I2C_DEBUG_ALGO is not set
+# CONFIG_I2C_DEBUG_BUS is not set
+# CONFIG_I2C_DEBUG_CHIP is not set
+
+#
+# SPI support
+#
+CONFIG_SPI=y
+# CONFIG_SPI_DEBUG is not set
+CONFIG_SPI_MASTER=y
+
+#
+# SPI Master Controller Drivers
+#
+CONFIG_SPI_BITBANG=y
+CONFIG_SPI_OMAP_UWIRE=y
+
+#
+# SPI Protocol Masters
+#
+
+#
+# Dallas's 1-wire bus
+#
+# CONFIG_W1 is not set
+
+#
+# Hardware Monitoring support
+#
+# CONFIG_HWMON is not set
+# CONFIG_HWMON_VID is not set
+
+#
+# Misc devices
+#
+CONFIG_NOKIA_OMAP_USBTEST=m
+
+#
+# Multimedia Capabilities Port drivers
+#
+
+#
+# Multimedia devices
+#
+# CONFIG_VIDEO_DEV is not set
+
+#
+# Digital Video Broadcasting Devices
+#
+# CONFIG_DVB is not set
+
+#
+# Graphics support
+#
+CONFIG_FB=y
+# CONFIG_FB_CFB_FILLRECT is not set
+# CONFIG_FB_CFB_COPYAREA is not set
+# CONFIG_FB_CFB_IMAGEBLIT is not set
+# CONFIG_FB_MACMODES is not set
+# CONFIG_FB_MODE_HELPERS is not set
+# CONFIG_FB_TILEBLITTING is not set
+# CONFIG_FB_S1D13XXX is not set
+CONFIG_FB_OMAP=y
+CONFIG_FB_OMAP_LCDC_EXTERNAL=y
+CONFIG_FB_OMAP_LCDC_HWA742=y
+CONFIG_FB_OMAP_MANUAL_UPDATE=y
+CONFIG_FB_OMAP_LCD_MIPID=y
+# CONFIG_FB_OMAP_BOOTLOADER_INIT is not set
+# CONFIG_FB_OMAP_DMA_TUNE is not set
+# CONFIG_FB_VIRTUAL is not set
+
+#
+# Console display driver support
+#
+# CONFIG_VGA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
+# CONFIG_FRAMEBUFFER_CONSOLE is not set
+
+#
+# Logo configuration
+#
+# CONFIG_LOGO is not set
+# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
+
+#
+# Sound
+#
+CONFIG_SOUND=y
+
+#
+# Advanced Linux Sound Architecture
+#
+CONFIG_SND=y
+CONFIG_SND_TIMER=y
+CONFIG_SND_PCM=y
+CONFIG_SND_HWDEP=m
+CONFIG_SND_RAWMIDI=m
+# CONFIG_SND_SEQUENCER is not set
+# CONFIG_SND_MIXER_OSS is not set
+# CONFIG_SND_PCM_OSS is not set
+# CONFIG_SND_DYNAMIC_MINORS is not set
+# CONFIG_SND_SUPPORT_OLD_API is not set
+# CONFIG_SND_VERBOSE_PRINTK is not set
+# CONFIG_SND_DEBUG is not set
+
+#
+# Generic devices
+#
+# CONFIG_SND_DUMMY is not set
+# CONFIG_SND_MTPAV is not set
+# CONFIG_SND_SERIAL_U16550 is not set
+# CONFIG_SND_MPU401 is not set
+
+#
+# ALSA ARM devices
+#
+CONFIG_SND_OMAP_AIC23=y
+# CONFIG_SND_OMAP_TSC2101 is not set
+
+#
+# USB devices
+#
+CONFIG_SND_USB_AUDIO=m
+
+#
+# Open Sound System
+#
+# CONFIG_SOUND_PRIME is not set
+
+#
+# USB support
+#
+CONFIG_USB_ARCH_HAS_HCD=y
+CONFIG_USB_ARCH_HAS_OHCI=y
+CONFIG_USB=y
+# CONFIG_USB_DEBUG is not set
+
+#
+# Miscellaneous USB options
+#
+CONFIG_USB_DEVICEFS=y
+CONFIG_USB_BANDWIDTH=y
+# CONFIG_USB_DYNAMIC_MINORS is not set
+CONFIG_USB_SUSPEND=y
+CONFIG_USB_OTG=y
+# CONFIG_USB_OTG_WHITELIST is not set
+
+#
+# USB Host Controller Drivers
+#
+# CONFIG_USB_ISP116X_HCD is not set
+CONFIG_USB_OHCI_HCD=m
+# CONFIG_USB_OHCI_BIG_ENDIAN is not set
+CONFIG_USB_OHCI_LITTLE_ENDIAN=y
+# CONFIG_USB_SL811_HCD is not set
+
+#
+# USB Device Class drivers
+#
+# CONFIG_OBSOLETE_OSS_USB_DRIVER is not set
+# CONFIG_USB_ACM is not set
+# CONFIG_USB_PRINTER is not set
+
+#
+# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
+#
+
+#
+# may also be needed; see USB_STORAGE Help for more information
+#
+CONFIG_USB_STORAGE=m
+# CONFIG_USB_STORAGE_DEBUG is not set
+# CONFIG_USB_STORAGE_DATAFAB is not set
+# CONFIG_USB_STORAGE_FREECOM is not set
+# CONFIG_USB_STORAGE_DPCM is not set
+# CONFIG_USB_STORAGE_USBAT is not set
+# CONFIG_USB_STORAGE_SDDR09 is not set
+# CONFIG_USB_STORAGE_SDDR55 is not set
+# CONFIG_USB_STORAGE_JUMPSHOT is not set
+# CONFIG_USB_STORAGE_ALAUDA is not set
+# CONFIG_USB_LIBUSUAL is not set
+
+#
+# USB Input Devices
+#
+CONFIG_USB_HID=m
+CONFIG_USB_HIDINPUT=y
+# CONFIG_USB_HIDINPUT_POWERBOOK is not set
+# CONFIG_HID_FF is not set
+# CONFIG_USB_HIDDEV is not set
+
+#
+# USB HID Boot Protocol drivers
+#
+# CONFIG_USB_KBD is not set
+# CONFIG_USB_MOUSE is not set
+# CONFIG_USB_AIPTEK is not set
+# CONFIG_USB_WACOM is not set
+# CONFIG_USB_ACECAD is not set
+# CONFIG_USB_KBTAB is not set
+# CONFIG_USB_POWERMATE is not set
+# CONFIG_USB_MTOUCH is not set
+# CONFIG_USB_ITMTOUCH is not set
+# CONFIG_USB_EGALAX is not set
+# CONFIG_USB_YEALINK is not set
+# CONFIG_USB_XPAD is not set
+# CONFIG_USB_ATI_REMOTE is not set
+# CONFIG_USB_ATI_REMOTE2 is not set
+# CONFIG_USB_KEYSPAN_REMOTE is not set
+# CONFIG_USB_APPLETOUCH is not set
+
+#
+# USB Imaging devices
+#
+# CONFIG_USB_MDC800 is not set
+# CONFIG_USB_MICROTEK is not set
+
+#
+# USB Multimedia devices
+#
+# CONFIG_USB_DABUSB is not set
+
+#
+# Video4Linux support is needed for USB Multimedia device support
+#
+
+#
+# USB Network Adapters
+#
+# CONFIG_USB_CATC is not set
+# CONFIG_USB_KAWETH is not set
+# CONFIG_USB_PEGASUS is not set
+# CONFIG_USB_RTL8150 is not set
+CONFIG_USB_USBNET=m
+CONFIG_USB_NET_AX8817X=m
+CONFIG_USB_NET_CDCETHER=m
+# CONFIG_USB_NET_GL620A is not set
+CONFIG_USB_NET_NET1080=m
+# CONFIG_USB_NET_PLUSB is not set
+# CONFIG_USB_NET_RNDIS_HOST is not set
+# CONFIG_USB_NET_CDC_SUBSET is not set
+CONFIG_USB_NET_ZAURUS=m
+# CONFIG_USB_ZD1201 is not set
+# CONFIG_USB_MON is not set
+
+#
+# USB port drivers
+#
+
+#
+# USB Serial Converter support
+#
+CONFIG_USB_SERIAL=m
+# CONFIG_USB_SERIAL_GENERIC is not set
+# CONFIG_USB_SERIAL_AIRPRIME is not set
+# CONFIG_USB_SERIAL_ANYDATA is not set
+# CONFIG_USB_SERIAL_BELKIN is not set
+# CONFIG_USB_SERIAL_WHITEHEAT is not set
+# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set
+# CONFIG_USB_SERIAL_CP2101 is not set
+# CONFIG_USB_SERIAL_CYPRESS_M8 is not set
+# CONFIG_USB_SERIAL_EMPEG is not set
+# CONFIG_USB_SERIAL_FTDI_SIO is not set
+# CONFIG_USB_SERIAL_VISOR is not set
+# CONFIG_USB_SERIAL_IPAQ is not set
+# CONFIG_USB_SERIAL_IR is not set
+# CONFIG_USB_SERIAL_EDGEPORT is not set
+# CONFIG_USB_SERIAL_EDGEPORT_TI is not set
+# CONFIG_USB_SERIAL_GARMIN is not set
+# CONFIG_USB_SERIAL_IPW is not set
+# CONFIG_USB_SERIAL_KEYSPAN_PDA is not set
+# CONFIG_USB_SERIAL_KEYSPAN is not set
+# CONFIG_USB_SERIAL_KLSI is not set
+# CONFIG_USB_SERIAL_KOBIL_SCT is not set
+# CONFIG_USB_SERIAL_MCT_U232 is not set
+CONFIG_USB_SERIAL_PL2303=m
+# CONFIG_USB_SERIAL_HP4X is not set
+# CONFIG_USB_SERIAL_SAFE is not set
+# CONFIG_USB_SERIAL_TI is not set
+# CONFIG_USB_SERIAL_CYBERJACK is not set
+# CONFIG_USB_SERIAL_XIRCOM is not set
+# CONFIG_USB_SERIAL_OMNINET is not set
+
+#
+# USB Miscellaneous drivers
+#
+# CONFIG_USB_EMI62 is not set
+# CONFIG_USB_EMI26 is not set
+# CONFIG_USB_AUERSWALD is not set
+# CONFIG_USB_RIO500 is not set
+# CONFIG_USB_LEGOTOWER is not set
+# CONFIG_USB_LCD is not set
+# CONFIG_USB_LED is not set
+# CONFIG_USB_CYTHERM is not set
+# CONFIG_USB_PHIDGETKIT is not set
+# CONFIG_USB_PHIDGETSERVO is not set
+# CONFIG_USB_IDMOUSE is not set
+# CONFIG_USB_LD is not set
+# CONFIG_USB_TEST is not set
+
+#
+# USB DSL modem support
+#
+
+#
+# USB Gadget Support
+#
+CONFIG_USB_GADGET=y
+# CONFIG_USB_GADGET_DEBUG_FILES is not set
+CONFIG_USB_GADGET_SELECTED=y
+# CONFIG_USB_GADGET_NET2280 is not set
+# CONFIG_USB_GADGET_PXA2XX is not set
+# CONFIG_USB_GADGET_GOKU is not set
+# CONFIG_USB_GADGET_LH7A40X is not set
+CONFIG_USB_GADGET_OMAP=y
+CONFIG_USB_OMAP=y
+# CONFIG_USB_GADGET_DUMMY_HCD is not set
+# CONFIG_USB_GADGET_DUALSPEED is not set
+# CONFIG_USB_ZERO is not set
+CONFIG_USB_ETH=m
+CONFIG_USB_ETH_RNDIS=y
+# CONFIG_USB_GADGETFS is not set
+CONFIG_USB_FILE_STORAGE=m
+CONFIG_USB_FILE_STORAGE_TEST=y
+# CONFIG_USB_G_SERIAL is not set
+
+#
+# MMC/SD Card support
+#
+CONFIG_MMC=y
+# CONFIG_MMC_DEBUG is not set
+CONFIG_MMC_BLOCK=y
+CONFIG_MMC_BLOCK_BROKEN_RFD=y
+CONFIG_MMC_BULKTRANSFER=y
+CONFIG_MMC_OMAP=y
+
+#
+# Synchronous Serial Interfaces (SSI)
+#
+CONFIG_OMAP_UWIRE=y
+# CONFIG_OMAP_TSC2101 is not set
+
+#
+# CBUS support
+#
+CONFIG_CBUS=y
+CONFIG_CBUS_TAHVO=y
+CONFIG_CBUS_TAHVO_USER=y
+CONFIG_CBUS_TAHVO_USB=y
+# CONFIG_CBUS_TAHVO_USB_HOST_BY_DEFAULT is not set
+CONFIG_CBUS_RETU=y
+CONFIG_CBUS_RETU_USER=y
+CONFIG_CBUS_RETU_POWERBUTTON=y
+CONFIG_CBUS_RETU_RTC=y
+CONFIG_CBUS_RETU_WDT=y
+CONFIG_CBUS_RETU_HEADSET=y
+
+#
+# File systems
+#
+CONFIG_EXT2_FS=m
+# CONFIG_EXT2_FS_XATTR is not set
+# CONFIG_EXT2_FS_XIP is not set
+CONFIG_EXT3_FS=m
+CONFIG_EXT3_FS_XATTR=y
+# CONFIG_EXT3_FS_POSIX_ACL is not set
+# CONFIG_EXT3_FS_SECURITY is not set
+CONFIG_JBD=m
+# CONFIG_JBD_DEBUG is not set
+CONFIG_FS_MBCACHE=m
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+# CONFIG_FS_POSIX_ACL is not set
+# CONFIG_XFS_FS is not set
+# CONFIG_OCFS2_FS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_ROMFS_FS is not set
+CONFIG_INOTIFY=y
+# CONFIG_QUOTA is not set
+CONFIG_DNOTIFY=y
+# CONFIG_AUTOFS_FS is not set
+# CONFIG_AUTOFS4_FS is not set
+# CONFIG_FUSE_FS is not set
+
+#
+# CD-ROM/DVD Filesystems
+#
+# CONFIG_ISO9660_FS is not set
+# CONFIG_UDF_FS is not set
+
+#
+# DOS/FAT/NT Filesystems
+#
+CONFIG_FAT_FS=y
+CONFIG_MSDOS_FS=y
+CONFIG_VFAT_FS=y
+CONFIG_FAT_DEFAULT_CODEPAGE=437
+CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
+# CONFIG_NTFS_FS is not set
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_SYSFS=y
+CONFIG_TMPFS=y
+# CONFIG_HUGETLB_PAGE is not set
+CONFIG_RAMFS=y
+# CONFIG_RELAYFS_FS is not set
+# CONFIG_CONFIGFS_FS is not set
+
+#
+# Miscellaneous filesystems
+#
+# CONFIG_ADFS_FS is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_HFSPLUS_FS is not set
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
+# CONFIG_JFFS_FS is not set
+CONFIG_JFFS2_FS=y
+CONFIG_JFFS2_FS_DEBUG=0
+CONFIG_JFFS2_FS_WRITEBUFFER=y
+CONFIG_JFFS2_SUMMARY=y
+CONFIG_JFFS2_COMPRESSION_OPTIONS=y
+CONFIG_JFFS2_ZLIB=y
+CONFIG_JFFS2_RTIME=y
+# CONFIG_JFFS2_RUBIN is not set
+# CONFIG_JFFS2_CMODE_NONE is not set
+CONFIG_JFFS2_CMODE_PRIORITY=y
+# CONFIG_JFFS2_CMODE_SIZE is not set
+# CONFIG_CRAMFS is not set
+# CONFIG_VXFS_FS is not set
+# CONFIG_HPFS_FS is not set
+# CONFIG_QNX4FS_FS is not set
+# CONFIG_SYSV_FS is not set
+# CONFIG_UFS_FS is not set
+
+#
+# Network File Systems
+#
+# CONFIG_NFS_FS is not set
+# CONFIG_NFSD is not set
+# CONFIG_SMB_FS is not set
+# CONFIG_CIFS is not set
+# CONFIG_NCP_FS is not set
+# CONFIG_CODA_FS is not set
+# CONFIG_AFS_FS is not set
+# CONFIG_9P_FS is not set
+
+#
+# Partition Types
+#
+CONFIG_PARTITION_ADVANCED=y
+# CONFIG_ACORN_PARTITION is not set
+# CONFIG_OSF_PARTITION is not set
+# CONFIG_AMIGA_PARTITION is not set
+# CONFIG_ATARI_PARTITION is not set
+# CONFIG_MAC_PARTITION is not set
+CONFIG_MSDOS_PARTITION=y
+# CONFIG_BSD_DISKLABEL is not set
+# CONFIG_MINIX_SUBPARTITION is not set
+# CONFIG_SOLARIS_X86_PARTITION is not set
+# CONFIG_UNIXWARE_DISKLABEL is not set
+# CONFIG_LDM_PARTITION is not set
+# CONFIG_SGI_PARTITION is not set
+# CONFIG_ULTRIX_PARTITION is not set
+# CONFIG_SUN_PARTITION is not set
+# CONFIG_KARMA_PARTITION is not set
+# CONFIG_EFI_PARTITION is not set
+
+#
+# Native Language Support
+#
+CONFIG_NLS=y
+CONFIG_NLS_DEFAULT="iso8859-1"
+CONFIG_NLS_CODEPAGE_437=y
+# CONFIG_NLS_CODEPAGE_737 is not set
+# CONFIG_NLS_CODEPAGE_775 is not set
+# CONFIG_NLS_CODEPAGE_850 is not set
+CONFIG_NLS_CODEPAGE_852=y
+# CONFIG_NLS_CODEPAGE_855 is not set
+# CONFIG_NLS_CODEPAGE_857 is not set
+# CONFIG_NLS_CODEPAGE_860 is not set
+# CONFIG_NLS_CODEPAGE_861 is not set
+# CONFIG_NLS_CODEPAGE_862 is not set
+# CONFIG_NLS_CODEPAGE_863 is not set
+# CONFIG_NLS_CODEPAGE_864 is not set
+# CONFIG_NLS_CODEPAGE_865 is not set
+# CONFIG_NLS_CODEPAGE_866 is not set
+# CONFIG_NLS_CODEPAGE_869 is not set
+# CONFIG_NLS_CODEPAGE_936 is not set
+# CONFIG_NLS_CODEPAGE_950 is not set
+# CONFIG_NLS_CODEPAGE_932 is not set
+# CONFIG_NLS_CODEPAGE_949 is not set
+# CONFIG_NLS_CODEPAGE_874 is not set
+# CONFIG_NLS_ISO8859_8 is not set
+# CONFIG_NLS_CODEPAGE_1250 is not set
+# CONFIG_NLS_CODEPAGE_1251 is not set
+# CONFIG_NLS_ASCII is not set
+CONFIG_NLS_ISO8859_1=y
+# CONFIG_NLS_ISO8859_2 is not set
+# CONFIG_NLS_ISO8859_3 is not set
+# CONFIG_NLS_ISO8859_4 is not set
+# CONFIG_NLS_ISO8859_5 is not set
+# CONFIG_NLS_ISO8859_6 is not set
+# CONFIG_NLS_ISO8859_7 is not set
+# CONFIG_NLS_ISO8859_9 is not set
+# CONFIG_NLS_ISO8859_13 is not set
+# CONFIG_NLS_ISO8859_14 is not set
+CONFIG_NLS_ISO8859_15=y
+# CONFIG_NLS_KOI8_R is not set
+# CONFIG_NLS_KOI8_U is not set
+CONFIG_NLS_UTF8=y
+
+#
+# Profiling support
+#
+# CONFIG_PROFILING is not set
+
+#
+# Kernel hacking
+#
+# CONFIG_PRINTK_TIME is not set
+CONFIG_MAGIC_SYSRQ=y
+CONFIG_DEBUG_KERNEL=y
+CONFIG_LOG_BUF_SHIFT=14
+CONFIG_DETECT_SOFTLOCKUP=y
+# CONFIG_SCHEDSTATS is not set
+# CONFIG_DEBUG_SLAB is not set
+# CONFIG_DEBUG_PREEMPT is not set
+# CONFIG_DEBUG_MUTEXES is not set
+# CONFIG_DEBUG_SPINLOCK is not set
+# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
+# CONFIG_DEBUG_KOBJECT is not set
+CONFIG_DEBUG_BUGVERBOSE=y
+# CONFIG_DEBUG_INFO is not set
+# CONFIG_DEBUG_FS is not set
+# CONFIG_DEBUG_VM is not set
+CONFIG_FRAME_POINTER=y
+CONFIG_FORCED_INLINING=y
+# CONFIG_RCU_TORTURE_TEST is not set
+# CONFIG_DEBUG_USER is not set
+# CONFIG_DEBUG_WAITQ is not set
+CONFIG_DEBUG_ERRORS=y
+# CONFIG_DEBUG_LL is not set
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+CONFIG_SECURITY=y
+# CONFIG_SECURITY_NETWORK is not set
+# CONFIG_SECURITY_CAPABILITIES is not set
+# CONFIG_SECURITY_ROOTPLUG is not set
+# CONFIG_SECURITY_SECLVL is not set
+CONFIG_SECURITY_LOWMEM=y
+
+#
+# Cryptographic options
+#
+# CONFIG_CRYPTO is not set
+
+#
+# Hardware crypto devices
+#
+
+#
+# Library routines
+#
+CONFIG_CRC_CCITT=y
+# CONFIG_CRC16 is not set
+CONFIG_CRC32=y
+# CONFIG_LIBCRC32C is not set
+CONFIG_ZLIB_INFLATE=y
+CONFIG_ZLIB_DEFLATE=y
diff --git a/recipes/mamona/cx3110x-770he-0.8.1/fix_cross_makefile.patch b/recipes/mamona/cx3110x-770he-0.8.1/fix_cross_makefile.patch
new file mode 100644
index 0000000000..1f75f094b8
--- /dev/null
+++ b/recipes/mamona/cx3110x-770he-0.8.1/fix_cross_makefile.patch
@@ -0,0 +1,11 @@
+Index: cx3110x-0.8.1/src/Makefile
+===================================================================
+--- cx3110x-0.8.1.orig/src/Makefile 2008-04-28 15:58:24.000000000 -0300
++++ cx3110x-0.8.1/src/Makefile 2008-04-28 15:58:28.000000000 -0300
+@@ -1,5 +1,5 @@
+ ifeq ($(KERNELRELEASE),)
+-STRIP = arm-linux-strip
++STRIP = $(CROSS_COMPILE)strip
+ PWD := $(shell pwd)
+
+ .PHONY: modules clean
diff --git a/recipes/mamona/cx3110x-770he-0.8.1/fix_mem_allign.patch b/recipes/mamona/cx3110x-770he-0.8.1/fix_mem_allign.patch
new file mode 100644
index 0000000000..6c452196aa
--- /dev/null
+++ b/recipes/mamona/cx3110x-770he-0.8.1/fix_mem_allign.patch
@@ -0,0 +1,94 @@
+Index: cx3110x-0.8.1/src/sm_drv_spi_io.c
+===================================================================
+--- cx3110x-0.8.1.orig/src/sm_drv_spi_io.c 2008-04-22 14:54:42.000000000 -0300
++++ cx3110x-0.8.1/src/sm_drv_spi_io.c 2008-04-22 15:00:07.000000000 -0300
+@@ -240,18 +240,21 @@
+ omap_start_dma(spi_dma.dma_tx_ch);
+
+ /* We don't want to turn CS off before transfer is done */
+-
++
++ while(!spi_dma.dma_rx_done) {
++ udelay(5);
++ }
++
+ while(!spi_dma.dma_tx_done) {
+ udelay(5);
+ }
+
++ spi_dma.dma_rx_done = 0;
+ spi_dma.dma_tx_done = 0;
+
+ /* UMAC may send us odd number of bytes long frames */
+ if (length % 2) {
+- u16 last_word;
+-
+- last_word = *(uint16_t *)(buffer + length - 1);
++ u16 last_word = *((uint8_t *)buffer + length - 1);
+ omap_mcbsp_spi_master_xmit_word_poll(OMAP_MCBSP2, last_word);
+ }
+
+@@ -264,7 +267,6 @@
+ int cx3110x_spi_read(struct net_device *dev, unsigned long address, unsigned char * buffer, unsigned int length)
+ {
+ int i;
+- u16 * short_buffer = (u16 *) buffer;
+ unsigned int r_length = length >> 1;
+
+ DEBUG(DBG_SPI_IO, "omap_wlan_spi_read\n");
+@@ -274,8 +276,13 @@
+ omap_mcbsp_spi_master_xmit_word_poll(OMAP_MCBSP2,
+ (address << 8) | ADDR_READ_BIT_15);
+
+- for (i = 0 ; i < r_length ; i++)
+- omap_mcbsp_spi_master_recv_word_poll(OMAP_MCBSP2, (u32*)(short_buffer + i));
++ for (i = 0 ; i < r_length ; i++) {
++ u32 tmp;
++ omap_mcbsp_spi_master_recv_word_poll(OMAP_MCBSP2, &tmp);
++ /* Assume little endian byte order */
++ buffer[i * 2 + 0] = tmp & 0xFF;
++ buffer[i * 2 + 1] = (tmp >> 8) & 0xFF;
++ }
+
+ SPI_CS_OFF();
+ return 0;
+@@ -285,24 +292,22 @@
+ int cx3110x_spi_write(struct net_device *dev, unsigned long address, unsigned char * buffer, unsigned int length)
+ {
+ int i;
+- u16 * short_buffer = (u16 *) buffer;
+ unsigned int w_length = length >> 1;
+
+-
+ DEBUG(DBG_SPI_IO, "omap_wlan_spi_write (%d bytes @ 0x%lx)\n", length, address << 8);
+
+ SPI_CS_ON();
+
+ omap_mcbsp_spi_master_xmit_word_poll(OMAP_MCBSP2, address << 8);
+
+- for (i = 0 ; i < w_length ; i++)
+- omap_mcbsp_spi_master_xmit_word_poll(OMAP_MCBSP2, short_buffer[i]);
++ for (i = 0 ; i < w_length ; i++) {
++ /* Assume little endian byte order */
++ omap_mcbsp_spi_master_xmit_word_poll(OMAP_MCBSP2, (u32)buffer[i * 2] | ((u32)buffer[i * 2 + 1] << 8));
++ }
+
+ /* UMAC may send us odd number of bytes long frames */
+ if (length % 2) {
+- u16 last_word;
+-
+- last_word = buffer[length - 1];
++ u16 last_word = buffer[length - 1];
+ omap_mcbsp_spi_master_xmit_word_poll(OMAP_MCBSP2, last_word);
+ }
+
+@@ -366,6 +371,9 @@
+ while(rate_mhz/div >= max_mhz)
+ div++;
+
++ printk("McBSP2: freq_limit=%dMHz, base_freq=%dMHz, divisor=%d (%d.%dMHz)\n",
++ max_mhz, rate_mhz, div, rate_mhz / div, (rate_mhz * 10 / div) % 10);
++
+ spi_dma.dma_tx_done = 0;
+ spi_dma.dma_rx_done = 0;
+
diff --git a/recipes/mamona/cx3110x-770he-0.8.1/fix_mem_corruption.patch b/recipes/mamona/cx3110x-770he-0.8.1/fix_mem_corruption.patch
new file mode 100644
index 0000000000..ae3e87f427
--- /dev/null
+++ b/recipes/mamona/cx3110x-770he-0.8.1/fix_mem_corruption.patch
@@ -0,0 +1,53 @@
+Index: cx3110x-0.8.1/src/sm_drv_spi_io.c
+===================================================================
+--- cx3110x-0.8.1.orig/src/sm_drv_spi_io.c 2007-10-15 08:56:20.000000000 -0300
++++ cx3110x-0.8.1/src/sm_drv_spi_io.c 2008-04-22 14:53:49.000000000 -0300
+@@ -91,7 +91,7 @@
+ int dma_tx_done;
+ int dma_rx_done;
+
+- uint16_t recv_buffer;
++ uint16_t *recv_buffer;
+ };
+
+ static struct omap_wlan_spi_dma spi_dma;
+@@ -142,7 +142,7 @@
+ omap_set_dma_src_params(spi_dma.dma_tx_ch,
+ OMAP_DMA_PORT_EMIFF,
+ OMAP_DMA_AMODE_CONSTANT,
+- virt_to_phys(&spi_dma.recv_buffer),
++ virt_to_phys(spi_dma.recv_buffer),
+ 0, 0);
+
+ /* Prepare for reading */
+@@ -208,7 +208,7 @@
+ omap_set_dma_dest_params(spi_dma.dma_rx_ch,
+ OMAP_DMA_PORT_EMIFF,
+ OMAP_DMA_AMODE_CONSTANT,
+- virt_to_phys(&spi_dma.recv_buffer),
++ virt_to_phys(spi_dma.recv_buffer),
+ 0, 0);
+
+
+@@ -319,6 +319,12 @@
+ struct net_local * lp;
+ struct spi_hif_local_data * spi_lp;
+
++ spi_dma.recv_buffer = kmalloc(sizeof(*spi_dma.recv_buffer), GFP_ATOMIC);
++ if (!spi_dma.recv_buffer) {
++ printk("spi_dma.recv_buffer allocation failed\n");
++ return -1;
++ }
++
+ lp = dev->priv;
+ spi_lp = HIF_LP(lp);
+
+@@ -411,6 +417,8 @@
+ omap_free_gpio(wlan_config->irq_gpio);
+ omap_free_dma(spi_dma.dma_tx_ch);
+ omap_free_dma(spi_dma.dma_rx_ch);
++
++ kfree(spi_dma.recv_buffer);
+ }
+
+
diff --git a/recipes/mamona/cx3110x-770he-0.8.1/fix_opps_while_connecting_with_nm.patch b/recipes/mamona/cx3110x-770he-0.8.1/fix_opps_while_connecting_with_nm.patch
new file mode 100644
index 0000000000..c73564535f
--- /dev/null
+++ b/recipes/mamona/cx3110x-770he-0.8.1/fix_opps_while_connecting_with_nm.patch
@@ -0,0 +1,128 @@
+Index: cx3110x-0.8.1/src/sm_drv_ioctl_umac.c
+===================================================================
+--- cx3110x-0.8.1.orig/src/sm_drv_ioctl_umac.c
++++ cx3110x-0.8.1/src/sm_drv_ioctl_umac.c
+@@ -1085,28 +1085,31 @@ static int sm_drv_get_wap(struct net_dev
+ static int sm_drv_set_scan(struct net_device *dev, struct iw_request_info *info,
+ struct iw_point *vwrq, char *extra)
+ {
+- int ret = 0;
++ int ret = 0, l, msecs;
+ struct obj_ssid essid;
+ int16_t scan = -1;
+ uint32_t scan_mode, flush_bss_list = 1;
+ struct net_local *lp = dev->priv;
+ uint32_t bgr_scan_disable = 1;
+
++ memset(essid.octets, 0, sizeof(essid.octets));
++
+ if (vwrq == NULL)
+ return -EINVAL;
+
+ /* First we flush the UMAC's AP list*/
+- ret = sm_drv_oid_set(dev, DOT11_OID_BSSLISTFLUSH, (void*)&flush_bss_list, sizeof(uint32_t));
++ ret = sm_drv_oid_set(dev, DOT11_OID_BSSLISTFLUSH,
++ (void*)&flush_bss_list, sizeof(uint32_t));
+ if (ret < 0)
+ return ret;
+
+ if (vwrq->flags & IW_SCAN_THIS_ESSID) {
+ if (vwrq->length > 0) {
+- essid.length = vwrq->length - 1;
+- memcpy(essid.octets, vwrq->pointer, essid.length + 1);
++ l = vwrq->length;
++ essid.length = min(l, IW_ESSID_MAX_SIZE);
++ memcpy(essid.octets, vwrq->pointer, essid.length);
+ } else {
+ essid.length = 0;
+- memset(essid.octets, 0, sizeof(essid.octets));
+ }
+ scan_mode = SCAN_MODE_ACTIVE;
+ } else {
+@@ -1114,48 +1117,76 @@ static int sm_drv_set_scan(struct net_de
+ scan_mode = SCAN_MODE_PASSIVE;
+ }
+
+- ret = sm_drv_oid_set(dev, DOT11_OID_SCANMODE, (void*)&scan_mode, sizeof(uint32_t));
++ ret = sm_drv_oid_set(dev, DOT11_OID_SCANMODE, (void*)&scan_mode,
++ sizeof(uint32_t));
+ if (ret < 0)
+ return ret;
+
+- ret = sm_drv_oid_set(dev, DOT11_OID_SCANSSID, (void*)&essid, sizeof(struct obj_ssid));
++ ret = sm_drv_oid_set(dev, DOT11_OID_SCANSSID, (void*)&essid,
++ sizeof(struct obj_ssid));
+ if (ret < 0)
+ return ret;
++
++ spin_lock_bh(&lp->sm_lock);
+
+ /* We let the background scanning work a bit...*/
+- if (scan_mode == SCAN_MODE_PASSIVE && lp->link_state != DOT11_STATE_ASSOC)
+- msleep(2000);
++ if (scan_mode == SCAN_MODE_PASSIVE
++ && lp->link_state != DOT11_STATE_ASSOC)
++ msecs = 2000;
++ else
++ /* for active scan, the delay can be smaller */
++ msecs = 30;
++
++ spin_unlock_bh(&lp->sm_lock);
++
++ msleep(msecs);
++
++ spin_lock_bh(&lp->sm_lock);
+
+- /* Let's start the scan timer in case UMAC doesn't trap the scan event */
++ /*
++ * Let's start the scan timer in case UMAC doesn't trap the scan
++ * event
++ */
+ mod_timer(&lp->scan_timer, jiffies + 4 * HZ);
+
+ if (lp->link_state != DOT11_STATE_ASSOC &&
+ lp->bss_type != DOT11_BSSTYPE_IBSS) {
++ spin_unlock_bh(&lp->sm_lock);
+ ret = sm_drv_oid_set(dev, DOT11_OID_AUTOSCANDISABLE,
+ (void*)&bgr_scan_disable,
+ sizeof(uint32_t));
++ spin_lock_bh(&lp->sm_lock);
+ if (ret < 0)
+ return ret;
+ }
++ spin_unlock_bh(&lp->sm_lock);
+
+ /* And finally we send the scan request */
+- ret = sm_drv_oid_set(dev, DOT11_OID_SCAN, (void*)&scan, sizeof(int16_t));
++ ret = sm_drv_oid_set(dev, DOT11_OID_SCAN, (void*)&scan,
++ sizeof(int16_t));
++
+ if (ret < 0) {
+ /*
+ * If we're associated, we haven't disable bgr scan,
+ * so we don't need to go there.
+ */
++ spin_lock_bh(&lp->sm_lock);
+ if (lp->link_state != DOT11_STATE_ASSOC &&
+- lp->bss_type != DOT11_BSSTYPE_IBSS)
++ lp->bss_type != DOT11_BSSTYPE_IBSS) {
++ spin_unlock_bh(&lp->sm_lock);
+ goto scan_err_out;
++ }
++ spin_unlock_bh(&lp->sm_lock);
+ }
+-
++
+ return 0;
+
+ scan_err_out:
+- DEBUG(DBG_ALL, "Scanning failed (err: %d), turning background scanning on\n", ret);
++ DEBUG(DBG_ALL, "scanning failed (%d), enabling background scan.",
++ ret);
+ bgr_scan_disable = 0;
+- sm_drv_oid_set(dev, DOT11_OID_AUTOSCANDISABLE, (void*)&bgr_scan_disable, sizeof(uint32_t));
++ sm_drv_oid_set(dev, DOT11_OID_AUTOSCANDISABLE,
++ (void*)&bgr_scan_disable, sizeof(uint32_t));
+
+ return ret;
+ }
diff --git a/recipes/mamona/cx3110x-770he-0.8.1/fix_ssid_data_length.patch b/recipes/mamona/cx3110x-770he-0.8.1/fix_ssid_data_length.patch
new file mode 100644
index 0000000000..a9e36ce6dd
--- /dev/null
+++ b/recipes/mamona/cx3110x-770he-0.8.1/fix_ssid_data_length.patch
@@ -0,0 +1,13 @@
+Index: cx3110x-0.8.1/src/sm_drv_ioctl_umac.c
+===================================================================
+--- cx3110x-0.8.1.orig/src/sm_drv_ioctl_umac.c 2008-04-28 15:59:37.000000000 -0300
++++ cx3110x-0.8.1/src/sm_drv_ioctl_umac.c 2008-04-28 15:59:57.000000000 -0300
+@@ -171,7 +171,7 @@
+ /* The following entries will be displayed in the same order we give them */
+
+ /* The ESSID. */
+- iwe.u.data.length = strlen(bss->ssid);
++ iwe.u.data.length = strlen(bss->ssid + 1);
+ iwe.u.data.flags = 1;
+ iwe.cmd = SIOCGIWESSID;
+ current_ev = iwe_stream_add_point(current_ev, end_buf,
diff --git a/recipes/mamona/cx3110x-770he-0.8.1/series b/recipes/mamona/cx3110x-770he-0.8.1/series
new file mode 100644
index 0000000000..fa690cb729
--- /dev/null
+++ b/recipes/mamona/cx3110x-770he-0.8.1/series
@@ -0,0 +1,7 @@
+fix_mem_corruption.patch
+fix_mem_allign.patch
+cx3110x.patch
+fix_cross_makefile.patch
+fix_ssid_data_length.patch
+770_performance_improvements.patch
+create_sysfs_link_for_wlan0.patch