summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/iwlwifi/iwl3945-base.c
AgeCommit message (Collapse)Author
2008-05-01iwlwifi: fix debug messages during scanningBill Moss
direct_mask will be set when we are not associated and requesting a direct scan. The second debug print will be confusing as priv->essid is not set at that time and it will thus print "<hidden>" while it is known to which AP a direct scan is requested - as previous debug message also indicates. Now make all debugging consistent. Signed-off-by: Bill Moss <bmoss@clemson.edu> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-05-01iwlwifi: fix current channel is not scannedGuy Cohen
All channels should be scanned, including the current channel when the client is associated. Removed also unused flag to scan only active channels. Signed-off-by: Guy Cohen <guy.cohen@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-04-23iwlwifi: Don't unlock priv->mutex if it isn't lockedRoland Dreier
Commit b716bb91 ("iwlwifi: Cancel scanning upon association") moved the test of priv->vif in iwl{3945,4964}_mac_config_interface() outside of where priv->mutex is held, but still tries to do mutex_unlock() on return. This is clearly wrong and triggers a nasty lockdep warning when this codepath is triggered. Fix this by removing the mutex_unlock(). Signed-off-by: Roland Dreier <rolandd@cisco.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-04-16iwlwifi: arrange max number of Tx queuesRon Rindjunsky
This patch increases the max possible number of Tx queues, but leaves current used number of queues as HW dependent Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-04-08mac80211: notify mac from low level driver (iwlwifi)Mohamed Abbas
Add new API to MAC80211 to allow low level driver to notify MAC with driver status. Signed-off-by: Mohamed Abbas <mabbas@linux.intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Acked-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-04-08iwlwifi: honour regulatory restrictions in scan codeJohannes Berg
When doing firmware-assisted scanning, iwlwifi drivers do not honour the regulatory control code that might disable channels that are enabled in the EEPROM, for example when the user is visiting another country and adjusted the regulatory domain accordingly. This patch fixes that. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Acked-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-04-08iwlwifi: ensure led registration complete as part of initializationReinette Chatre
After the workqueue is notified the LED code may be accessed. Ensure that LED registration completes completely as part of initialization before anything waiting on this is notified. Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-04-01iwlwifi: Fix synchronous host commandTomas Winkler
This patch replaces static variable from send_cmd_sync with flag in priv->status. It was used for reentrance protection but clearly made it impossible to stuck more cards into the same machine In addition it force check of return values of synchronous commands commands that doesn't requires return value async commands have to be used Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Yi Zhu <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-04-01iwlwifi: move rate registration to module loadReinette Chatre
Having rate registration during module load enables the use of error checking as well as reliable registration/unregistration pairing. Previously this was not possible as rate registration was done during _probe where _probe could be run for more than one device on the system. Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-04-01iwlwifi: fix race condition during driver unloadMohamed Abbas
This patch fixed the OOPS when load the driver while rf-kill is on then unload the driver right after load. a race condition caused the interupt handler to schedule the tasklet which will run right after the driver pci_remove causing invalid poiter OOPS. Signed-off-by: Mohamed Abbas <mabbas@linux.intel.com> Signed-off-by: Joonwoo Park <joonwpark81@gmail.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-27Merge branch 'master' of ↵David S. Miller
git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 Conflicts: drivers/net/usb/rndis_host.c drivers/net/wireless/b43/dma.c net/ipv6/ndisc.c
2008-03-27iwlwifi: iwl_priv - clean up in types of membersTomas Winkler
This patch fix types of is_open and iw_mode members of iwl_priv sturct Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-27iwlwifi: Add led supportMohamed Abbas
This patch add LEDS support to 3965 and 4965 drivers. It is based on led trigger and class. For our drivers we needed to avoid two things. 1- We receive led trigger on/off on each Rx\Tx frame. In our driver we can not call led command like that. In this driver once driver receive a start of traffic it call the led command to start blinking then we count all bytes of Tx and Rx frame, after two second we count the blink rate of last two second then id blink rate changed we call the led commands 2- Since we can call led command very often, we make sure we call the led command after we receive the statistics notification so we don't need to wake up the ucode id it is in sleep state. This patch was tested with 4965 and 3945. Signed-off-by: Mohamed Abbas <mabbas@linux.intel.com> Signed-off-by: Ian Schram<ischram@telenet.be> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-27iwlwifi: do not register bands with no supported channelsJohn W. Linville
Otherwise, b/g-only devices fail in wiphy_register. Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-24iwlwifi: fix __devexit_p points to __devexit functionsReinette Chatre
The iwlxxxx_pci_remove functions are not needed when drivers are not compiled as modules - they can thus be discarded at kernel link time. This is already captured by having them as __devexit_p in the pci_driver struct - these are supposed to be pointers to __devexit functions, but was not. This is now fixed. This problem was reported by Toralf Forster when testing the compilation of 2.6.25-rc6. Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> CC: Toralf Forster <toralf.foerster@gmx.de> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-24iwlwifi: mac start synchronization issueRick Farrington
This patch fixes a synchronization problem on the 4965 and 3945 with the mac start callback routine. The problem is that this function exits BEFORE the 'xxx_alive_start' has completed. This can lead to a problem if a subsequent MAC callback attempts to issue a firmware command. Signed-off-by: Rick Farrington <rickdic@hotmail.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-13iwlwifi: fix bug to show hidden APs during scanReinette Chatre
Indirect scanning ('iwlist scan') should report information about hidden APs. When an AP is hidden it does not respond to active scanning, we thus have to use passive scanning to locate these APs. This fixes http://bughost.org/bugzilla/show_bug.cgi?id=1499 Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Tested-by: Bill Moss <bmoss@clemson.edu> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-13iwlwifi: update copyright yearReinette Chatre
Also fix a copy and paste error in header of iwl-core.c. This file is not dual licensed. Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-07iwlwifi: 3945 split tx_complete to command and packet functionTomas Winkler
This patch 1. removes cmd completion from iwl3945_tx_queue_reclaim and creates iwl3945_cmd_queue_reclaim. 1. removes 11n relevant elements from this function 2. removes call to ieee80211_tx_status_irqsafe and uses ieee80211_tx_status only Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-07iwlwifi: queue functions cleanupTomas Winkler
This patch moves 1. iwl_queue_inc_wrap and int iwl_queue_dec_wrap into iwl-helpers.h these two functions are identical to common for both iwl3956 and iwl4965 2. renames x2_queue_used to iwl3945_x2_queue_used 3. exports iwl3945_queue_space out of iwl3964-base.c Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-07iwlwifi: Cancel scanning upon associationEmmanuel Grumbach
This patch cancels an ongoing HW scan upon association. Not doing this resulted in instability in association. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-07iwlwifi: Take the fw file name from the iwl_cfg.Tomas Winkler
This patch adds fw_name to iwl_cfg. This allows run time selection of needed fw/ucode file Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-07iwlwifi: add struct iwl_cfgTomas Winkler
This patch introduces struct iwl_cfg. struct iwl_cfg defines static configuration for each device type and sku. It is passed as driver_data to the bus probe function. This patch also introduce new common header file iwl-core.h which will represent core functionality of iwlwifi driver 3945ABG uses separate iwl-3945-dev.h header file for now Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-07iwlwifi: extract iwl-csr.hTomas Winkler
This patch extract CSR Register definition into separate header files as most of the definition are commons to both 3945 and 4965. Definitions specific for 3945 and 4965 are properly prefixed Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-06iwlwifi: Fix 52 rate report in rx statusTomas Winkler
This patch fixes reporting rate in RX packets in 52 band. The rate was updated from CCK rate index instead of OFDM rate 6M Most of the patch is collateral clean up Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-06iwlwifi: refactor init geos functionTomas Winkler
This patch refactors init geos function. It also fixes few minor bugs. IWL_MAX_RATE -> IWL_RATE_COUNT (IWL_MAX_RATE included also MCS setting) There are 9 and 13 rates for 4965 in 2.4 and 5.2 respectively (rate 60) Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-06iwlwifi: removing unused priv->configTomas Winkler
This patch removes unused variable in iwlYYYY_priv Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-29iwlwifi: fix name of function in comment (_rx_card_state_notif)Reinette Chatre
iwl_rx_card_state_notif is named iwl3945_rx_card_state_notif and iwl4965_rx_card_state_notif in the two iwlwifi drivers. Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-29mac80211: give burst time in txop rather than 0.1msec unitsJohannes Berg
This changes mac80211 to pass the burst time to conf_tx in txop units rather than 0.1msec units. 0.1msec units are only required by atheros hardware (according to current driver support), all other drivers do other calculations or require the txop value. Therefore, it results in fewer calculations and more precision if we just pass the txop value through to the driver. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Acked-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-29iwlwifi: Update iwlwifi version stamp to 1.2.26Reinette Chatre
We update the version stamp at this time to distinguish the in-kernel driver from the out of tree driver. The out of tree driver currently has version number 1.2.25, but the latest driver code can only be found in this in-kernel driver. Having a later version number will reduce confusion between the two versions as we transition from out of tree to in-kernel. Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-29iwlwifi: remove IWL{4965,3945}_QOSRon Rindjunsky
This patch removes the IWL4965_QOS and IWL3945_QOS defines from Kconfig file along with all uses of it. These defines were relevant for the period QoS code was tested to be stable in driver's flows. Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-29iwlwifi: initialize ieee80211_channel->hw_valueMohamed Abbas
hw_value is being used uninitialized. fix it. Signed-off-by: Mohamed Abbas <mohamed.abbas@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-29cfg80211 API for channels/bitrates, mac80211 and driver conversionJohannes Berg
This patch creates new cfg80211 wiphy API for channel and bitrate registration and converts mac80211 and drivers to the new API. The old mac80211 API is completely ripped out. All drivers (except ath5k) are updated to the new API, in many cases I expect that optimisations can be done. Along with the regulatory code I've also ripped out the IEEE80211_HW_DEFAULT_REG_DOMAIN_CONFIGURED flag, I believe it to be unnecessary if the hardware simply gives us whatever channels it wants to support and we then enable/disable them as required, which is pretty much required for travelling. Additionally, the patch adds proper "basic" rate handling for STA mode interface, AP mode interface will have to have new API added to allow userspace to set the basic rate set, currently it'll be empty... However, the basic rate handling will need to be moved to the BSS conf stuff. I do expect there to be bugs in this, especially wrt. transmit power handling where I'm basically clueless about how it should work. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-15iwlwifi: only check for association id when associating with APReinette Chatre
There is no association process in IBSS mode - so testing the association id is not needed. Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> CC: Richard Scherping <richard@scherping.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-15iwlwifi: reverting 'misc wireless annotations' patch for iwlwifiTomas Winkler
This patch revert commit blow that wrongly suppressed sparse warning in iwlwifi eeprom reading In addtion it suppresses correctly the iwlwifi eeprom register reading anomaly. commit 45883ae47a0a4700c0f4716dc75a255cccdc3a76 misc wireless annotations Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Cc: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-15iwlwifi: earlier rx allocationMohamed Abbas
Value of count is used to decide when to replenish rx buffers. If it is equal or above 8 we replenish the buffers. Ensure there is no starvation by initializing count to 8 - thus forcing replenish at first iteration. This is helpful when rx receives batches of buffers smaller than 8. Signed-off-by: Mohamed Abbas <mabbas@linux.intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-15iwlwifi: Don't send host commands on rfkillGregory Greenman
This patch prevents sending host commands when rfkill is on Signed-off-by: Gregory Greenman <gregory.greenman@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-15iwlwifi: do not clear GEO_CONFIGURED bit when calling _downReinette Chatre
The geos information is set up during probe and should only be removed during pci_remove, not during _down. This is a temporary fix until the setting of the status bits have been cleaned up (to explicitly match all setting with clearing of status bits). Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-05iwl3945-base.c: fix off-by-one errorsAdrian Bunk
This patch fixes two off-by-one errors resulting in array overflows spotted by the Coverity checker. Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-01iwlwifi: fix merge sequence: exit on error before state changeReinette Chatre
The intention behind the original patch: "iwlwifi: fix possible read attempt on ucode that is not available" was to exit before any state is changed. Due to its submission directly to 2.6.24 it was not clear how this relates to the latest iwlwifi work. This patch does exactly the same as the previous patch, just earlier to prevent any state from being changed if there is an error. Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-31wireless: iwlwifi3945/4965 - fix incorrect counting of memoryCyrill Gorcunov
This patch does fix incorrect counting of memory allocated by kmalloc. It seems that could lead to allocated memory overrun and corrupt nearlaid memory area. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com> Acked-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-31iwlwifi: Fix uCode error on associationGregory Greenman
The problem is that priv->assoc_id is set when assoc. resp frame is received. But, when it is set, LQ cmd is still not sent to the uCode, it is done from bg_post_assoc, which is called through a workqueue. On the other hand, when a tx arrives at the moment when this flag is set, but LQ is still not sent, the if condition in tx_skb will not hold and the frame will not be dropped. Thus, it will be sent through which is still not in the sta table in the uCoded. Signed-off-by: Gregory Greenman <gregory.greenman@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-31iwlwifi: do not schedule tasklet when rcv unused irqJoonwoo Park
The nic controller's scheduler interrupt (CSR_INT_BIT_SCD) indicates to the driver that scheduler finished to transmit the frame/frames. This bit is not used and the tasklet should thus not be scheduled upon its receipt. Signed-off-by: Joonwoo Park <joonwpark81@gmail.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-31iwlwifi: cleanup usage of inline functionsReinette Chatre
Be consistent when using inline functions. If the function only used once we move it to where it is used - no need for externs. Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Cc: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-31iwlwifi: initialize geo/channel information during probeReinette Chatre
The geo/channel information is obtained from the EEPROM, which is read during probe. We can thus set up channel information at this time. This helps us to support ioctl commands that rely on this before the interface is brought up. Clearly matches _init_channel_map with _free_channel_map and _init_geos with _free_geos to ensure functions calling these routines can also call their cleanup routines. Fixes a few bugs: - if channel information is not available when ioctl commands are issued then we get a NULL pointer oops. Having channel information set up during probe we can deal with ioctl commands without requiring interface to be brought up. This fixes bug: http://www.bughost.org/bugzilla/show_bug.cgi?id=1552 - Fix potential problem if user triggers probe/remove/probe sequence. The value of priv->channel_count was used to determine if channel map is set up. This value was never reset when channel map was removed. - Fix memory leak: priv->modes need to be freed when device removed. Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-31iwlwifi: Fix an invalid bitmask test in iwl3945 and iwl4965Maarten Lankhorst
Signed-off-by: Maarten Lankhorst <m.b.lankhorst@gmail.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-28iwlwifi: style fixes to usage of << and >> operatorsReinette Chatre
The << and >> operators need space on each side. Cc: Stefano Brivio <stefano.brivio@polimi.it> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Acked-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28iwlwifi: Update iwlwifi version stamp to 1.2.23Zhu Yi
Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28iwlwifi: move uCode helper functions to iwl-helpers.hTomas Winkler
This patch adds iwl_free_fw_desc ucode helper function. It also moves ucode helper functions to iwl-helpers.h. Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28iwlwifi: fix problem when rf_killswitch change during suspend/resumeZhu Yi
After we delay device initialization until interface up, there are more conditions for the hardware rf_kill switch states during suspend and resume. For example, before suspend we can have interface up or down, rf_kill enable or disable; before resume we can have rf_kill enable or disable. So there are totally 2^3 = 8 conditions to handle. This patch addressed this problem and makes sure every condition works correctly. This patch also merges the device suspend and resume handlers with the mac_start and mac_stop code since they are basically doing the same thing. Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>