summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* iwlagn: iwl_rx_queue moves to the iwl_trans_pcieEmmanuel Grumbach2011-08-296-144/+184
| | | | | | | | | Since this struct is specific to pcie transport, move it the the pcie specific transport layer. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlagn: transport handler can register debugfs entriesEmmanuel Grumbach2011-08-293-178/+258
| | | | | | | | | Add a handler in iwl_trans_ops to allow it to add entries under debugfs dir given by the upper level. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlagn: add comments to iwl_bus / iwl_transEmmanuel Grumbach2011-08-292-3/+17
| | | | | | | | Rename the recursive inclusion protection in iwl-bus.h while we are at it. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlagn: bus layer chooses its transport layerEmmanuel Grumbach2011-08-2924-170/+226
| | | | | | | | | | | | | | | | | | | | | | | Remove iwl_transport_register which was a W/A. The bus layer knows what transport to use. So now, the bus layer gives the upper layer a pointer to the iwl_trans_ops struct that it wants to use. The upper layer then, allocates the desired transport layer using iwl_trans_ops->alloc function. As a result of this, priv->trans, no longer exists, priv holds a pointer to iwl_shared, which holds a pointer to iwl_trans. This required to change all the calls to the transport layer from upper layer. While we were at it, trans_X inlines have been renamed to iwl_trans_X to avoid confusions, which of course required to rename the functions inside the transport layer because of conflicts in names. So the static API functions inside the transport layer implementation have been renamed to iwl_trans_pcie_X. Until now, the IRQ / Tasklet were initialized in iwl_transport_layer. This is confusing since the registration doesn't mean to request IRQ, so I added a handler for that. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlagn: priv->sta_lock moves to iwl_sharedEmmanuel Grumbach2011-08-299-85/+90
| | | | | | | | Since it is used by all the layers, it needs to move to iwl_shared. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlagn: add IWL_DEBUG_FW_ERRORSEmmanuel Grumbach2011-08-292-2/+3
| | | | | | | | instead of IWL_DEBUG(priv, IWL_DL_FW_ERRORS Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlagn: modify the debug macro to be usable by all the layersEmmanuel Grumbach2011-08-292-19/+21
| | | | | | | | | | Since all the layers need to print debug message, the debug macro cannot suppose that they will be given iwl_priv as a parameter and then dereference it. Use iwl_shared instead. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlagn: priv->mutex moves to iwl_sharedEmmanuel Grumbach2011-08-2916-122/+124
| | | | | | | | Since it is used by all the layers, it needs to move to iwl_shared. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlagn: priv->lock moves to iwl_sharedEmmanuel Grumbach2011-08-2913-60/+61
| | | | | | | | Since it is used by all the layers, it needs to move to iwl_shared. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlagn: priv->status moves to iwl_sharedEmmanuel Grumbach2011-08-2917-171/+177
| | | | | | | | Since it is used by all the layers, it needs to move to iwl_shared. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlagn: workqueue moves to iwl_sharedEmmanuel Grumbach2011-08-2910-26/+28
| | | | | | | | Since it is used by all the layers, it needs to move to iwl_shared. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlagn: cmd_queue moves to iwl_sharedEmmanuel Grumbach2011-08-298-24/+25
| | | | | | | | Since it is used by all the layers, it needs to move to iwl_shared. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlagn: hw_params moves to iwl_sharedEmmanuel Grumbach2011-08-2919-262/+278
| | | | | | | | Since it is used by all the layers, it needs to move to iwl_shared. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlagn: debug_level moves to struct iwl_sharedEmmanuel Grumbach2011-08-297-47/+48
| | | | | | | | This will allow all the modules to look at it. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlagn: introduce struct iwl-shared - known by all layersEmmanuel Grumbach2011-08-295-23/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This struct will hold pointers to all the layers, so that every layer will find the pointers it needs when calling another layer. Note that the drv_data set to struct device is now a pointer to struct iwl_shared. This solves of bug that I introduced in iwlagn: simplify the bus architecture Bug description: sysfs gets the the driver data from struct device. Till the aforementioned patch, dev_get_drvdata would return iwl_priv. After the patch, dev_get_drvdata return iwl_bus which is buggy since the sysfs handlers rely on this value, and sysfs handlers need iwl_priv. Now, dev_get_drvdata return iwl-shared. Since we have pointers to all the layers in iwl_shared, every layer will be able to get the pointer it needs: bus layer will gets iwl_bus from the PCI suspend callbacks, and the sysfs handlers will get the iwl_priv they need. In order to keep good encapsulation, we need to avoid to dereference iwl_priv from a different layer. This is why instead of including iwl-dev.h from iwl-shared.h, I added a forward declaration to iwl_priv. Moreover we keep type safety while providing encapsulation. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlagn: introduce iwl-shared.hEmmanuel Grumbach2011-08-2918-48/+140
| | | | | | | | | | | | | | | | | | | | It will hold declaration of functions and forward declaration of struct that are used by several layers. This will allow modules not to include iwl_priv. iwl_bus and iwl_trans are still visible to all. All the layers share the module parameters, move the struct to iwl-shared.h. Also add all module parameters to iwl_mod_params instead of having them as global static. This includes * debug_level * ant_coupling * bt_ch_announce * wanted_ucode_alternative Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlagn: use iwl_get_debug_level instead of iwl_debug_levelEmmanuel Grumbach2011-08-292-6/+6
| | | | | | | | | | | The latter may return incomplete information. For example, if one switched IWL_DL_TX on through sysfs, IWL_DL_TX bit would have been set in priv->debug_level, but since iwl_alloc_traffic_mem looked at iwl_debug_level only, it wouldn't have allocated the tx_traffic buffer. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlagn: remove out-dated commentsWey-Yi Guy2011-08-291-10/+1Star
| | | | | | | Portion of iwl_cfg comments is not correct anymore, remove it. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlagn: Rename iwlcore prefixWey-Yi Guy2011-08-2910-24/+23Star
| | | | | | | | | | There are number of functions with "iwlcore_" prefix which not feels right, rename those to "iwl_". No functional changes by making the renames. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: minor cleanup in aniMohammed Shafi Shajakhan2011-08-292-5/+2Star
| | | | | | | removed a function declaration, removed a variable, renamed a variable Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: use appropriate debug maskMohammed Shafi Shajakhan2011-08-291-1/+1
| | | | | | | | in the Rx path of the driver it would be better to use ATH_DBG_ANY rather than ATH_DBG_XMIT for printing debug messages Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* p54: Use do_div for 64-bit division to fix 32-bit kernelsChristian Lamparter2011-08-291-4/+8
| | | | | | | | | Use the do_div macro for 64-bit division. Otherwise, the module will reference __udivdi3 under 32-bit kernels, which is not allowed in kernel space. Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: add missing AR9340 in ath_mac_bb_namesFlorian Fainelli2011-08-291-0/+1
| | | | | | | | AR9340 is not listed in ath_mac_bb_names, which leads to such a message: ieee80211 phy0: Atheros AR???? Rev:0 mem=0xb8100000, irq=2 Signed-off-by: Florian Fainelli <florian@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* cfg80211: document wiphy->registeredStanislaw Gruszka2011-08-291-0/+1
| | | | | Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mac80211: refactor skb copy to failq in mesh_path_move_to_queueJohn W. Linville2011-08-291-4/+4
| | | | | | This seems a bit less awkward... Signed-off-by: John W. Linville <linville@tuxdriver.com>
* net/mac80211/debugfs: Convert to kstrou8_from_userPeter Huewe2011-08-291-11/+3Star
| | | | | | | | | | | | | | This patch replaces the code for getting an number from a userspace buffer by a simple call to kstrou8_from_user. This makes it easier to read and less error prone. Since the old buffer was only 10 bytes long and the value is masked by a nibble-mask anyway, we don't need to use kstrtoul but rather kstrtou8. Kernel Version: v3.0-rc2 Signed-off-by: Peter Huewe <peterhuewe@gmx.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* Merge branch 'for-linville' of ↵John W. Linville2011-08-2925-1860/+2090
|\ | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/luca/wl12xx
| * wl12xx: fix tx_queue_count spurious incrementArik Nemtsov2011-08-221-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | Only increment the queue count after actually queuing the skb. This avoids a spurious increment is case of dropped packets. Also move the Tx-watermark checking code after the packet is enqueued. This makes the count more accurate - it includes the just-queued packet. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
| * wl12xx: AP-mode - prevent Tx to stale/invalid stationsArik Nemtsov2011-08-221-3/+17
| | | | | | | | | | | | | | | | | | Don't pollute the queues with Tx directed to invalid stations. This can happen during recovery. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
| * wl12xx: set the AP-started flag only after setting keysArik Nemtsov2011-08-221-3/+3
| | | | | | | | | | | | | | | | | | This fix eliminates a potential race between starting the AP role and setting encryption keys. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
| * wl12xx: enable AP advanced functionalityArik Nemtsov2011-08-224-51/+51
| | | | | | | | | | | | | | | | | | | | | | This adjusts FW TX block allocation for connected stations in PS. Firmware congestion is measured in allocated packets instead of blocks. Allow a link in PS to queue up to 2 packets to the FW. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
| * wl12xx: don't wait for disconnection eventEliad Peller2011-08-221-6/+0Star
| | | | | | | | | | | | | | | | Sometimes the fw doesn't send the DISCONNECT_EVENT_COMPLETE_ID on station role stop, so don't wait for it. Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
| * wl12xx: handle wrap-around overflow in released Tx blocks FW counterArik Nemtsov2011-08-221-2/+9
| | | | | | | | | | | | | | | | | | | | When the FW Tx released blocks counter wraps around, we should correct our calculation of released blocks. Otherwise we add a large negative figure to our driver freed blocks counter Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
| * wl12xx: schedule TX packets according to FW packet occupancyArik Nemtsov2011-08-224-27/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | When selecting packets for transmission, prefer the ACs that are least occupied in the FW. When packets for multiple ACs are present in the FW, it decides which to transmit according to WMM QoS parameters. With these changes, lower priority ACs should not be starved when higher priority traffic is present. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
| * wl12xx: track freed packets in FW by ACArik Nemtsov2011-08-223-3/+23
| | | | | | | | | | | | | | | | | | Track the number of freed packets in each AC when receiving an interrupt from the FW. This paves the way for tracking allocated packets per AC. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
| * wl12xx: don't remove key if hlid was already deletedEliad Peller2011-08-221-0/+5
| | | | | | | | | | | | | | | | When wep key was removed after disconnection, sta_hlid was invalid, and it resulted in a fw crash. Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
| * wl12xx: use ap_bcast_hlid for recorded keysEliad Peller2011-08-221-1/+6
| | | | | | | | | | | | | | | | | | when the key was recorded, wl->ap_bcast_hlid was invalid (since the role wasn't started), so when configuring the key we need to use the current ap_bcast_hlid. Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
| * wl12xx: AP-mode - configure HT rate support to the FWArik Nemtsov2011-08-222-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | Unconditionally configure HT rate support to the FW on all ACs when starting the AP. When 11n support is disabled by usermode (hostapd), each STA joining the AP will appear as a non-HT STA. This will stop us from accidentally transmitting using MCS rates. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
| * wl12xx: AP-mode - configure STA HT rates on joinArik Nemtsov2011-08-221-2/+8
| | | | | | | | | | | | | | | | | | When a new STA joins the BSS, configure the HT rates it supports to the FW. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
| * wl12xx: AP-mode - set STA HT capabilities when adding a STAArik Nemtsov2011-08-223-12/+34
| | | | | | | | | | | | | | | | | | In addition, set global HT operation mode via ACX_HT_BSS_OPERATION when a change is detected by usermode Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
| * wl12xx: support IBSS vif typeEliad Peller2011-08-224-7/+39
| | | | | | | | | | | | | | | | | | Start IBSS role when the interface type is IBSS. As with sta role, use the dev role until the role is started. Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
| * wl12xx: add wl12xx_cmd_role_start_ibss()Eliad Peller2011-08-222-0/+63
| | | | | | | | | | | | | | | | | | | | | | Add wl12xx_cmd_role_start_ibss() implementation and defintion. This function is used in order to start the IBSS role. Stopping the IBSS is done by using the same api as stop STA, so there is no need for a separate function. Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
| * wl12xx: don't remove key if hlid was already deletedEliad Peller2011-08-221-0/+4
| | | | | | | | | | | | | | | | If hlid was already removed, there is no need to remove its key (it might cause a fw crash, as the key is invalid). Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
| * wl12xx: call wl12xx_cmd_set_peer_state() in AP modeEliad Peller2011-08-223-5/+9
| | | | | | | | | | | | | | | | | | | | | | After adding a station, call wl12xx_cmd_set_peer_state(). This is required for 11n support. Change wl12xx_cmd_set_peer_state() prototype to get hlid as param. Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
| * wl12xx: re-enable block ack session supportArik Nemtsov2011-08-227-170/+177
| | | | | | | | | | | | | | | | | | | | | | Incorporate interface changes for HT support. Add ba_bitmap field to the wl1271_link struct, to indicate activate RX BA sessions (for AP mode). Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
| * wl12xx: use dynamic hlids for AP-modeArik Nemtsov2011-08-224-20/+46
| | | | | | | | | | | | | | | | | | | | | | Using hlid=0 in AP mode is a bug. Dynamically allocate HLIDs. Set the "first sta hlid" as 3. This will have to be changed when multiple vifs will be supported. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
| * wl12xx: fix session counterArik Nemtsov2011-08-222-6/+12
| | | | | | | | | | | | | | | | | | Increment the session counter on every wl12xx_cmd_role_start_sta() command. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
| * wl12xx: update BT coex configuration paramsEliad Peller2011-08-225-367/+177Star
| | | | | | | | | | | | | | | | The BT coex params api have been changed. Update it, and init coex for both sta and ap. Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
| * wl12xx: replace dummy_join with ROC/CROC commandsEliad Peller2011-08-226-38/+182
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ROC command asks the fw stay on the channel of the given hlid. it currently has 2 primary functions: 1. Allow tx/rx from the device role. In order to tx/rx packets while the stations is not associated (e.g. auth req/resp), the device role has to be used, along with ROC on its link. Keep the logic similiar to the one used in dummy_join. However, since we can't scan while we ROC, we add CROC before starting a scan, and ROC again (if needed) on scan complete. 2. Keeping the antenna for a specific link. We ROC until the connection was completed (after EAPOLs exchange) in order to prevent BT coex operations from taking the antenna and failing the connection (after this stage, psm can be used). During association, we ROC on the station role, and then CROC the device role, thus assuring being ROC during all the connection process. Delete the WL1271_FLAG_JOINED flag, and use a roc bitmap to indicate what roles are currently ROCed. Add wl12xx_roc/croc functions in order to wrap the roc/croc commands while taking care of the roc bitmap. The current ROC/CROC state-machine is a bit complicated. In the future we'll probably want to use wpa_supplicant to control the ROC during connection. Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
| * wl12xx: handle dummy packet event also in ap modeArik Nemtsov2011-08-222-5/+9
| | | | | | | | | | | | | | | | Allow handling of DUMMY_PACKET_EVENT_ID also in ap mode. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>