summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwmc3200wifi
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'master' of ↵David S. Miller2009-08-121-0/+1
|\ | | | | | | | | | | | | master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 Conflicts: arch/microblaze/include/asm/socket.h
| * drivers/net/wireless: introduce missing kfreeJulia Lawall2009-08-031-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Error handling code following a kzalloc should free the allocated data. The semantic match that finds the problem is as follows: (http://www.emn.fr/x-info/coccinelle/) // <smpl> @r exists@ local idexpression x; statement S; expression E; identifier f,f1,l; position p1,p2; expression *ptr != NULL; @@ x@p1 = \(kmalloc\|kzalloc\|kcalloc\)(...); ... if (x == NULL) S <... when != x when != if (...) { <+...x...+> } ( x->f1 = E | (x->f1 == NULL || ...) | f(...,x->f1,...) ) ...> ( return \(0\|<+...x...+>\|ptr\); | return@p2 ...; ) @script:python@ p1 << r.p1; p2 << r.p2; @@ print "* file: %s kmalloc %s return %s" % (p1[0].file,p1[0].line,p2[0].line) // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | iwmc3200wifi: avoid setting default key for 802.1X and RSNAZhu Yi2009-08-041-13/+26
| | | | | | | | | | | | | | | | | | UMAC only allows us to set default key for WEP and auth type is not 802.1X or RSNA. This patch fixes iwmc3200wifi for 802.1X with WEP104. Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | iwmc3200wifi: set WEP key static flag correctlyZhu Yi2009-08-041-2/+8
| | | | | | | | | | | | | | | | We should only set the static_key flag for open and legacy authentication types. It should not be set for 802.1X and TKIP. Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | iwmc3200wifi: fix set_wpa_version and set_auth_type orderZhu Yi2009-08-041-2/+7
| | | | | | | | | | | | | | | | | | iwm->umac_profile->sec.flags is set by iwm_set_wpa_version and checked by iwm_set_auth_type. The patch changes the order to make the flag used correctly. Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | Merge branch 'master' of ↵David S. Miller2009-07-305-192/+1
|\ \ | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6
| * | cfg80211: self-contained wext handling where possibleJohannes Berg2009-07-295-100/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Finally! This is what you've all been waiting for! This patch makes cfg80211 take care of wext emulation _completely_ by itself, drivers that don't need things cfg80211 doesn't do yet don't even need to be aware of wireless extensions. This means we can also clean up mac80211's and iwm's Kconfig and make it possible to build them w/o wext now! RIP wext. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * | cfg80211: combine IWESSID handlersJohannes Berg2009-07-291-34/+2
| | | | | | | | | | | | | | | | | | | | | | | | Since we now have handlers IWESSID for all modes, we can combine them into one. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * | cfg80211: combine IWAP handlersJohannes Berg2009-07-291-32/+2
| | | | | | | | | | | | | | | | | | | | | | | | Since we now have IWAP handlers for all modes, we can combine them into one. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * | cfg80211: combine iwfreq implementationsJohannes Berg2009-07-291-32/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Until now we implemented iwfreq for managed mode, we needed to keep the implementations separate, but now that we have all versions implemented we can combine them and export just one handler. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | | Merge branch 'master' of ↵David S. Miller2009-07-301-4/+2
|\ \ \ | |/ / |/| / | |/ | | | | | | | | | | master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 Conflicts: drivers/net/wireless/iwlwifi/iwl-3945.h drivers/net/wireless/iwlwifi/iwl-tx.c drivers/net/wireless/iwlwifi/iwl3945-base.c
| * wireless: ERR_PTR vs nullDan Carpenter2009-07-271-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | iwm_wdev_alloc() returns an ERR_PTR on failure and not null. It also prints its own dev_err() message so I removed that as well. Compile tested only. Sorry. Found by smatch (http://repo.or.cz/w/smatch.git). Signed-off-by: Dan Carpenter <error27@gmail.com> Acked-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | imwc3200: move iwmc3200 SDIO ids to sdio_ids.hTomas Winkler2009-07-262-4/+3
| | | | | | | | | | | | | | | | 1. add intel's sdio vendor id to sdio_ids.h 2. move iwmc3200 sdio devices' ids to sdio_ids.h Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | iwmc3200wifi: fix a use-after-free bugZhu Yi2009-07-241-7/+9
| | | | | | | | | | | | | | | | The patch fixes a use-after-free bug for cmd->seq_num; Reported-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | iwmc3200wifi: fix cfg80211_connect_result is called in IBSSZhu Yi2009-07-241-4/+9
| | | | | | | | | | | | | | Avoid calling cfg80211_connect_result() in IBSS mode. Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | iwmc3200wifi: use cfg80211_connect_result to send req/resp IEZhu Yi2009-07-243-13/+35
| | | | | | | | | | | | | | | | | | cfg80211_connect_result() let us specify associate request and response IEs as parameters after we are connected. We use this capability instead of doing it ourselves with WEXT. Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | iwmc3200wifi: remove key caches in driverZhu Yi2009-07-242-70/+2
| | | | | | | | | | | | | | | | cfg80211 now guarantees keys are set after connecting. We can remove the key cache code from the driver now. Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | iwmc3200wifi: make iwm_send_wifi_if_cmd return 0 on successZhu Yi2009-07-241-14/+13
| | | | | | | | | | | | | | | | | | | | We used to return the result of wait_event_interruptible_timeout() which is the remaining timeout on success. But this information is not used by any of its callers. So we just return 0 on success. This fixed a erroneous return value bug for iwm_set_key(). Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | iwmc3200wifi: remove setting WEP keys before setting essid supportZhu Yi2009-07-241-26/+0
| | | | | | | | | | | | | | | | | | | | The recent cfg80211 "rework key operation" patch from Johannes Berg makes sure keys are set only after the connection has been established. So we can remove the setting WEP keys before essid support from the driver. Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | iwmc3200wifi: cfg80211 managed mode portSamuel Ortiz2009-07-243-292/+239
| | | | | | | | | | | | | | | | This patch ports iwmc3200wifi to the cfg80211 managed mode API. Signed-off-by: Samuel Ortiz <samuel.ortiz@intel.com> Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | iwmc3200wifi: use correct debug levelZhu Yi2009-07-241-16/+16
| | | | | | | | | | | | | | | | This patch uses TX and RX instead of NTF debug levels in some hot paths. Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | iwmc3200wifi: set cipher_suites before registering wiphyZhu Yi2009-07-241-0/+10
| | | | | | | | | | | | | | | | | | We need to specify all the cipher suites we supported. Otherwise cfg80211_validate_key_settings() will fail when we are setting keys. Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | iwmc3200wifi: hardware does not support IP checksumZhu Yi2009-07-241-1/+1
| | | | | | | | | | | | | | | | The iwmc3200wifi hardware doesn't support IP checksum. So mark the skb->ip_summed to CHECKSUM_NONE instead of CHECKSUM_UNNECESSARY. Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | iwmc3200wifi: fix UMAC INIT_COMPLETE notification handlingZhu Yi2009-07-242-1/+6
| | | | | | | | | | | | | | | | The patch fixes the missing UMAC iwm_umac_wifi_in_hdr header in the UMAC INIT_COMPLETE (iwm_umac_notif_init_complete) notification. Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | Merge branch 'master' of ↵David S. Miller2009-07-231-1/+1
|\| | | | | | | | | | | | | | | master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 Conflicts: drivers/net/wireless/iwmc3200wifi/netdev.c net/wireless/scan.c
| * iwmc3200wifi: fix NULL pointer dereference in iwm_if_freeZhu Yi2009-07-211-1/+1
| | | | | | | | | | | | | | | | | | | | The driver private data is now based on wiphy. So we should not touch the private data after wiphy_free() is called. The patch fixes the potential NULL pointer dereference by making the iwm_wdev_free() the last one on the interface removal path. Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | iwmc3200wifi: remove B0 hardware supportZhu Yi2009-07-105-29/+0
| | | | | | | | | | | | | | The patch removes B0 hardware support. Nobody is using it anyway. Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | iwmc3200wifi: simplify calibration mapZhu Yi2009-07-104-15/+17
| | | | | | | | | | | | | | | | | | | | The patch simplifies calibration map by combining the init_calib_map and periodic_calib_map into one calib_map in struct iwm_conf. Now the initial calibration map is stored in the lower 16 bits of calib_map and the periodic calibration map is stored in the higher 16 bits. Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | iwmc3200wifi: replace netif_rx with netif_rx_niZhu Yi2009-07-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | The patch uses netif_rx_ni() over netif_rx() to post buffers to upper network code because it is always scheduled in a workqueue. The problem was first observed from a dynamic ticks warning: "NOHZ: local_softirq_pending ..." Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | cfg80211: implement iwpowerJohannes Berg2009-07-102-45/+24
| | | | | | | | | | | | | | | | | | Just on/off and timeout, and with a hacky cfg80211 method until we figure out what we want, though this is probably sufficient as we want to use pm_qos for wifi everywhere. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | iwmc3200wifi: rfkill cleanupZhu Yi2009-07-106-32/+39
| | | | | | | | | | | | | | | | | | | | The patch cleans up the unused rfkill related structures and flags. It also adds wext and cfg80211 handlers for txpower auto and off so that software rfkill could be issued by user space. Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: Samuel Ortiz <samuel.ortiz@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | iwmc3200wifi: cache keys when interface is downSamuel Ortiz2009-07-103-19/+28
| | | | | | | | | | | | | | | | | | | | | | When the interface is down and one sets a WEP key from userspace, we should be able to simply cache it. Since that implies setting part of the profile's security settings, we now alloc/free the umac_profile at probe/remove time, and no longer at interface bring up/down time. Simply resetting it during the latter is enough. Signed-off-by: Samuel Ortiz <samuel.ortiz@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | iwmc3200wifi: change coexist periodic calibration flagZhu Yi2009-07-102-6/+11
| | | | | | | | | | | | | | | | | | The patch changes coexist periodic calibration priority flag. It also set wireless mode to UMAC and set PM control flag to 0x1. Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: Samuel Ortiz <samuel.ortiz@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | iwmc3200wifi: cfg80211 key hooks implemetationSamuel Ortiz2009-07-106-332/+219
| | | | | | | | | | | | | | | | | | | | This patch implements the new cfg80211 privacy related hooks: add/get/set_key and the set_default_key one. With this implementation we can now call the wext-compat *encode* routines and reduce our own wext code. Signed-off-by: Samuel Ortiz <samuel.ortiz@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | iwmc3200wifi: handling wifi_if_ntfy responsesSamuel Ortiz2009-07-105-15/+31
| | | | | | | | | | | | | | | | | | | | | | | | When we're calling iwm_send_wifi_if_cmd() with the resp flag set, we're currently waiting on the mlme queue, waiting for some flags here and there to show up. This patch adds a wifi_ntfy bitmap, and when we're sending a wifi_if command expecting an answers, we wait synchronously for it to show up, on a dedicated queue. The wifi_ntfy bit is set when we receive the corresponding answer. Signed-off-by: Samuel Ortiz <samuel.ortiz@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | iwmc3200wifi: invalidate keys when changing the BSSIDSamuel Ortiz2009-07-101-1/+18
| | | | | | | | | | | | | | | | While associated, we have to invalidate our key cache if we clear our BSSID through siwap. Signed-off-by: Samuel Ortiz <samuel.ortiz@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | cfg80211: pass netdev to change_virtual_intfJohannes Berg2009-07-101-7/+2
|/ | | | | | | | | If there was a reason I'm passing the ifidx I cannot remember it any more and don't see one now, so let's just pass the pointer itself. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwmc3200wifi: add Kconfig helpSamuel Ortiz2009-07-071-0/+9
| | | | | | | We're missing a Kconfig help for the iwmc3200wifi driver. Signed-off-by: Samuel Ortiz <samuel.ortiz@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwmc3200wifi: add a mutex to protect iwm_reset_workerZhu Yi2009-06-192-6/+49
| | | | | | | | | | | | The patch adds a mutex to protect the iwm_reset_worker against netdev ndo_open and ndo_stop because all of them call iwm_up and iwm_down in the implementation. Note the latter two are already protected by rtnl. So if iwm_reset_worker is not required in the future, the mutex can also be removed. Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: Samuel Ortiz <samuel.ortiz@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwmc3200wifi: fix potential kernel oops on module removalZhu Yi2009-06-191-2/+2
| | | | | | | | | | | | The iwm_if_free() is called before destroy_workqueue for isr_wq on device remove method. But if there is still some pending work in the isr_wq, the required data structures are already freed at this point. This leeds a kernel oops. The patch fixes this problem by moving iwm_if_free after destroy_workqueue. Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: Samuel Ortiz <samuel.ortiz@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwmc3200wifi: add iwm_if_add and iwm_if_removeZhu Yi2009-06-193-12/+31
| | | | | | | | | | | | | We used to do alloc_netdev and register_netdev at the same time in iwm_if_alloc. But some bus related structures will only be initialized after iwm_priv is allocated. This caused a race condition that the netdev might be registered earlier. The patch adds iwm_if_add and iwm_if_remove so that the bus layer could register the device after all initialization is done. Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: Samuel Ortiz <samuel.ortiz@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwmc3200wifi: check for iwm_priv_init errorZhu Yi2009-06-193-7/+23
| | | | | | | | | | We need to check for iwm_priv_init() errors and do proper cleanups. Otherwise we may fail to catch the create_singlethread_workqueue() error which will cause a kernel oops when destroy_workqueue() later. Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: Samuel Ortiz <samuel.ortiz@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* cfg80211: fix Kconfig for users of cfg80211Johannes Berg2009-06-031-1/+1
| | | | | | | | | | * iwm doesn't depend on cfg80211 or wireless extensions * rndis wlan selects cfg80211 - needs to depend * mac80211 selects cfg80211 - needs to depend Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Acked-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwm: port to new cfg80211 rfkillJohannes Berg2009-06-035-99/+1
| | | | | | | | | Which means removing all rfkill code since it only does soft-kill which cfg80211 will now handle in exactly the same way the driver did. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* rfkill: rewriteJohannes Berg2009-06-031-22/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch completely rewrites the rfkill core to address the following deficiencies: * all rfkill drivers need to implement polling where necessary rather than having one central implementation * updating the rfkill state cannot be done from arbitrary contexts, forcing drivers to use schedule_work and requiring lots of code * rfkill drivers need to keep track of soft/hard blocked internally -- the core should do this * the rfkill API has many unexpected quirks, for example being asymmetric wrt. alloc/free and register/unregister * rfkill can call back into a driver from within a function the driver called -- this is prone to deadlocks and generally should be avoided * rfkill-input pointlessly is a separate module * drivers need to #ifdef rfkill functions (unless they want to depend on or select RFKILL) -- rfkill should provide inlines that do nothing if it isn't compiled in * the rfkill structure is not opaque -- drivers need to initialise it correctly (lots of sanity checking code required) -- instead force drivers to pass the right variables to rfkill_alloc() * the documentation is hard to read because it always assumes the reader is completely clueless and contains way TOO MANY CAPS * the rfkill code needlessly uses a lot of locks and atomic operations in locked sections * fix LED trigger to actually change the LED when the radio state changes -- this wasn't done before Tested-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk> Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> [thinkpad] Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwmc3200wifi: shrink calibration lmac nameSamuel Ortiz2009-06-031-1/+1
| | | | | | | | | | | | iwmc3200wifi: trim down calibration firmware name The patch trims down iwmc3200wifi calibration firmware name from iwmc3200wifi-lmac-calib-sdio.bin to iwmc3200wifi-calib-sdio.bin. We can shorten the firmware name because all calibration is done by LMAC. Signed-off-by: Samuel Ortiz <samuel.ortiz@intel.com> Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwmc3200wifi: fix printk formatRandy Dunlap2009-06-031-1/+1
| | | | | | | | | | | Fix printk format for size_t variable: drivers/net/wireless/iwmc3200wifi/fw.c:75: warning: format '%d' expects type 'int', but argument 4 has type 'size_t' Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Cc: ilw@linux.intel.com Acked-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwmc3200wifi: fix fragmentation threshold settingSamuel Ortiz2009-06-031-1/+1
| | | | | | | | | We were sending the fragmentation threshold value to the wrong table, causing an LMAC assert when setting it from wext. Signed-off-by: Samuel Ortiz <samuel.ortiz@intel.com> Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwmc3200wifi: fix link error when CFG80211 is not selectedZhu Yi2009-05-251-1/+2
| | | | | | | | | | The patch makes iwmc3200wifi select CFG80211 instead of LIB80211. This fixed module link error reported by Randy Dunlap <randy.dunlap@oracle.com> when compiling iwmc3200wifi without cfg80211 selected. WIRELESS_EXT is also selected by iwmc3200wifi. Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* iwmc3200wifi: Add new Intel Wireless Multicomm 802.11 driverZhu Yi2009-05-2227-0/+9710
This driver supports Intel's full MAC wireless multicomm 802.11 hardware. Although the hardware is a 802.11agn device, we currently only support 802.11ag, in managed and ad-hoc mode (no AP mode for now). Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: Samuel Ortiz <samuel.ortiz@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>