summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2009-09-01iwmc3200wifi: Add a last_fw_err debugfs entrymaster-2009-09-01Samuel Ortiz
In order to check what was the last fw error we got accross resets, we add this debugfs entry. It displays the complete ASSERT information. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-09-01iwmc3200wifi: Handle UMAC stalls and UMAC assert properlySamuel Ortiz
When UMAC stalls or asserts, we want to reset the device. But when we're associated, the current reset worker will end up calling cfg80211_connect_result() with the cfg80211 sme layer knowing that we're reassociating. That ends up with some ugly warnings. With this patch we're telling the upper layer that we've roamed if reassociation succeeds, and that we're disconnected if it fails. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-09-01iwmc3200wifi: New initial LMAC calibrationSamuel Ortiz
The LMAC calibration API got broken mostly by having a configuration bitmap being different than the result one. This patch tries to address that issue by correctly running calibrations with the newest firmwares, and keeping a backward compatibility fallback path for older firmwares, where the configuration and result bitmaps were identical. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-09-01iwmc3200wifi: fix misuse of le16_to_cpuZhu Yi
Also mark some functions static. Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-09-01iwmc3200wifi: add disconnect workZhu Yi
When the driver receives "connection terminated" event from device, it could be caused by 2 reasons: the firmware is roaming or the connection is lost (AP disappears). For the former, an association complete event is supposed to come within 3 seconds. For the latter, the driver won't receive any event except the connection terminated. So we kick a delayed work (5*HZ) when we receive the connection terminated event. It will be canceled if it turns out to be a roaming event later. Otherwise we notify SME and userspace the disconnection. Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-09-01iwmc3200wifi: use cfg80211_roamed to send roam eventZhu Yi
The device sends connection terminated and [re]association success (or failure) events when roaming occours. The patch uses cfg80211_roamed instead of cfg80211_connect_result to notify SME for roaming. Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-09-01iwmc3200wifi: Fix sparse warningSamuel Ortiz
iwm_cfg80211_get_station() should be static. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-09-01iwmc3200wifi: Set WEP key from connectSamuel Ortiz
When connect is called with the LEGACY_PSK authentication type set, and a proper sme->key, we need to set the WEP key straight after setting the profile otherwise the authentication will never start. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-09-01iwmc3200wifi: invalidate profile when necessary before connectZhu Yi
If cfg80211 requests to connect when we have already had an active profile, invalidate the current profile first before sending a new profile to UMAC. Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-09-01rndis_wlan: remove 'select WIRELESS_EXT' in KconfigJussi Kivilinna
Since rndis_wlan is now converted to cfg80211, WIRELESS_EXT isn't required anymore. Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-09-01rndis_wlan: fix sparse endianess warningsJussi Kivilinna
Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-09-01rndis_wlan: cleanupJussi Kivilinna
- remove double newlines between functions - remove commented out function (rndis_set_config_parameter_u32()) - coding style fix in rndis_set_config_parameter_str() - add comment banners between function sections Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-09-01rndis_wlan: use bool for on/off switchesJussi Kivilinna
Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-09-01ath9k: Call spin_lock_bh() on btcoex_lockVasanthakumar Thiagarajan
As generic hw timer interrupt handler is moved to tasklet, we no more need to call spin_lock_irqsave(). Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-09-01ath9k: Move generic hw timer intr handler to bottom-halfVasanthakumar Thiagarajan
There is no point handling this in hard irq, move it to tasklet. Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-09-01rfkill: relicense header fileJohannes Berg
This header file is copied into userspace tools that need not be GPLv2 licensed, make that easier. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Acked-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk> Acked-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Acked-by: Iñaky Pérez-González <inaky@linux.intel.com> Acked-by: Ivo van Doorn <IvDoorn@gmail.com> Acked-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com> Acked-by: Michael Buesch <mb@bu3sch.de> Acked-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-31ath9k: Do an AHB reset before doing RTC resetmaster-2009-08-31Vasanthakumar Thiagarajan
Doing an RTC reset when DMA is active may corrupt memory, make sure no DMA is active at this moment by doing an AHB reset. Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-31ipw2200: fix kconfig dependenciesRandy Dunlap
Fix kconfig dependencies for ipw2x00 drivers, fixes build errors: ERROR: "wiphy_free" [drivers/net/wireless/ipw2x00/libipw.ko] undefined! ERROR: "wiphy_unregister" [drivers/net/wireless/ipw2x00/libipw.ko] undefined! ERROR: "wiphy_new" [drivers/net/wireless/ipw2x00/libipw.ko] undefined! ERROR: "cfg80211_wext_giwname" [drivers/net/wireless/ipw2x00/ipw2200.ko] undefined! ERROR: "wiphy_register" [drivers/net/wireless/ipw2x00/ipw2200.ko] undefined! Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-31rt2x00: Reorganize padding & L2 paddingIvo van Doorn
The old function rt2x00queue_payload_align() handled both adding and removing L2 padding and some basic frame alignment. The entire function was being abused because it had multiple functions and the header length argument was somtimes used to align the header instead of the payload. Additionally there was a bug when inserting L2 padding that only the payload was aligned but not the header. This happens when the header wasn't aligned properly by mac80211, but rt2x00lib only moves the payload. A secondary problem was that when removing L2 padding during TXdone or RX the skb wasn't resized to the proper size. Split the function into seperate functions each handling its task as it should. Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-31rt2x00: Fix TX status reportingIvo van Doorn
Not all values of the TX status enumeration were covered during updating of the TX statistics. This could lead to wrong bitrate tuning but also wrong behavior in tools like hostapd. Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-31b43: LP-PHY: Fix TX gain tablesGábor Stefanik
The rev1 2GHz and rev2 5GHz gain tables were incorrectly documented on the specs originally. Update these gaintables to match the cor- rected specs. Signed-off-by: Gábor Stefanik <netroller.3d@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-31b43: Fix typo in modparam_btcoex descriptionGábor Stefanik
Signed-off-by: Gábor Stefanik <netrolller.3d@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-31b43: Add myself to module authors & to LP-PHY file copyright noticesGábor Stefanik
Also mark the LP-PHY driver "802.11a/g" instead of "802.11g", as LP-PHY is capable of both 2GHz and 5GHz operation. Signed-off-by: Gábor Stefanik <netrolller.3d@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-31b43: Refactor and update antenna diversity for A/G-PHYGábor Stefanik
-Make use of the b43_phy_set/mask/maskset helpers. -Fix a few errors in the code. -Make the code more readable. Signed-off-by: Gábor Stefanik <netrolller.3d@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-31iwl3945: reduce debug noise when default debug flags usedReinette Chatre
Significant literature suggests users use debug flags 0x43fff - this causes the debug flags to be set that causes information to be printed for every received frame - including beacons. In the best case it fills up the logs, at worst it slows driver down and causes failures due to timeouts. In the RX handler, print debugging only if user requested RX debugging. Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-31iwlwifi: fix situation in which debug message is printedReinette Chatre
3945 does not have update_chain_flags defined and because if this we always see the debug message that does not apply to it. Add a check to be specific about what is actually happening. Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-31iwlwifi: use sleep interval successionJohannes Berg
Some concerns were raised about the automatic adjustment of sleep intervals to all the same, potentially high, value, and I can imagine the hardware behaving better when we don't ask too much of it. So let's convert to use a succession of sleep levels when requesting to go to deeper sleeps (which can only happen with large DTIM intervals), using the succession values from power level three, which have the benefit of also having been tested extensively already. As a result, the automatic sleep level adjustment will now be mostly equivalent to power level three, except for the RX/TX timeouts and possibly using smaller sleep vectors to account for networking latency. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-31iwlwifi: use iwl_hwrate_get_mac80211_idx where appropriateDaniel C Halperin
For HT packets, mac80211 expects the rate_idx to be an MCS number, which is the lower byte of rate_n_flags. However, iwl_hwrate_to_plcp_idx takes the MCS number and reduces it down to the range 0-8 (6 to 60 Mbps), removing the bits that signify multiply streams, HT40 Duplicate mode, or unequal modulation. This version is used for various internal purposes through the driver. Add the function iwl_hwrate_get_mac80211_idx, an alternate version which takes the rate and the band and returns the mac80211 index (MCS, for HT packets, and PLCP rate, for legacy packets). Signed-off-by: Daniel C Halperin <daniel.c.halperin@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-31iwlwifi: remove incorrect uses of ieee80211_get_tx_rate to prevent TX stallDaniel C Halperin
Refactor and correct rate selection for outgoing transmitted packets. First, note that HT rates in the mac80211 rate table do not provide valid indices when ieee80211_get_tx_rate is called; the check to see if we could to abort a transmission early in iwl_tx_skb() would thus occasionally read invalid memory and occasionally stall transmission (if the erroneous byte was 0xff). We remove that code; the check wasn't valid anyway. Second, iwl_tx_cmd_build_rate() also called ieee80211_get_tx_rate to be used for sending management packets, which do not use the uCode station table. This patch refactors that function and adds comments to enhance legibility, replaces the call to ieee80211_get_tx_rate() with a direct lookup, and adds error handling in case the table entry is invalid. Signed-off-by: Daniel C Halperin <daniel.c.halperin@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-31iwlwifi: remove 60 Mbps from sband bitrates tableDaniel C Halperin
ieee80211_supported_band is supposed to only contain legacy rates in the bitrates table (HT rates go in the ieee80211_sta_ht_cap substruct). Make iwlwifi driver obey this restriction by removing the 60 Mbps rate. Also, clean up a few pieces of other code that formerly relied on 60 Mbps being in sband->bitrates. Signed-off-by: Daniel C Halperin <daniel.c.halperin@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-30s2io: Generate complete messages using single line DBG_PRINTsJoe Perches
Single line log messages should be emitted by a single call where possible. Converted multiple calls to DBG_PRINT to single call form. Removed "s2io:" preface from DBG_PRINTs. The DBG_PRINT macro now emits a log level and is surrounded by a do {...} while (0) All s2io log output is now prefaced with KBUILD_MODNAME ": " via pr_fmt. The DBG_PRINT macro should probably be converted to use the dev_<level> form eventually. Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Sreenivasa Honnur <sreenivasa.honnur@neterion.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-30s2io.c: Convert skipped nic->config.tx_cfg[i]. to tx_cfg->Joe Perches
Missed doing the conversion in earlier patch. Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Sreenivasa Honnur <sreenivasa.honnur@neterion.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-30s2io.c: Standardize statistics accessorsJoe Perches
Regularize the declaration and uses of struct config_param *config = &sp->config; struct mac_info *mac_control = &sp->mac_control; and use struct stat_block *stats = mac_control->stats_info; struct swStat *swstats = &stats->sw_stat; struct xpakStat *xstats = &stats->xpak_stat; and convert the longish uses like nic->mac_control.stats_info->sw_stat.<foo> to swstats-><foo> etc. This also makes the statistics code marginally smaller and presumably faster. Old: $ size s2io.o text data bss dec hex filename 114289 516 33360 148165 242c5 s2io.o New: $ size s2io.o text data bss dec hex filename 114097 516 33360 147973 24205 s2io.o Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Sreenivasa Honnur <sreenivasa.honnur@neterion.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-30s2io.c: fix spelling explainationJoe Perches
Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Sreenivasa Honnur <sreenivasa.honnur@neterion.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-30s2io.c: convert printks to pr_<level>Joe Perches
Fixed trivial typo as well Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Sreenivasa Honnur <sreenivasa.honnur@neterion.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-30s2io.c: Make more conforming to normal kernel styleJoe Perches
Still has a few long lines. checkpatch was: total: 263 errors, 53 warnings, 8751 lines checked is: total: 4 errors, 35 warnings, 8767 lines checked Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Sreenivasa Honnur <sreenivasa.honnur@neterion.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-30s2io.c: use kzallocJoe Perches
Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Sreenivasa Honnur <sreenivasa.honnur@neterion.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-30s2io.c: Use calculated size in kmallocsJoe Perches
Use consistent style. Don't calculate the kmalloc size multiple times Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Sreenivasa Honnur <sreenivasa.honnur@neterion.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-30s2io.c: Shorten code line length by using intermediate pointersJoe Perches
Repeated variable use and line wrapping is hard to read. Use temp variables instead of direct references. struct fifo_info *fifo = &mac_control->fifos[i]; struct ring_info *ring = &mac_control->rings[i]; struct tx_fifo_config *tx_cfg = &config->tx_cfg[i]; struct rx_ring_config *rx_cfg = &config->rx_cfg[i]; Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Sreenivasa Honnur <sreenivasa.honnur@neterion.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-30s2io.c: Use const for stringsJoe Perches
Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Sreenivasa Honnur <sreenivasa.honnur@neterion.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-30pkt_sched: Fix resource limiting in pfifo_fastKrishna Kumar
pfifo_fast_enqueue has this check: if (skb_queue_len(list) < qdisc_dev(qdisc)->tx_queue_len) { which allows each band to enqueue upto tx_queue_len skbs for a total of 3*tx_queue_len skbs. I am not sure if this was the intention of limiting in qdisc. Patch compiled and 32 simultaneous netperf testing ran fine. Also: # tc -s qdisc show dev eth2 qdisc pfifo_fast 0: root bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1 Sent 16835026752 bytes 373116 pkt (dropped 0, overlimits 0 requeues 25) rate 0bit 0pps backlog 0b 0p requeues 25 Signed-off-by: Krishna Kumar <krkumar2@in.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-30net: convert remaining non-symbolic return values in dev_queue_xmitKrishna Kumar
Patch compiled and 32 simultaneous netperf testing ran fine. Signed-off-by: Krishna Kumar <krkumar2@in.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-30netdevice: Consolidate to use existing macros where available.Krishna Kumar
Patch compiled and 32 simultaneous netperf testing ran fine. Signed-off-by: Krishna Kumar <krkumar2@in.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-30can: use correct NET_RX_ return valuesOliver Hartkopp
Dropped skb's should be documented by an appropriate return value. Use the correct NET_RX_DROP and NET_RX_SUCCESS values for that reason. Signed-off-by: Oliver Hartkopp <oliver@hartkopp.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-30WAN: bit and/or confusionroel kluin
Fix the tests that check whether Frame* bits are not set Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-30ucc_geth: Implement suspend/resume and Wake-On-LAN supportAnton Vorontsov
This patch implements suspend/resume and WOL support for UCC Ethernet driver. We support two wake up events: wake on PHY/link changes and wake on magic packet. In some CPUs (like MPC8569) QE shuts down during sleep, so magic packet detection is unusable, and also on resume we should fully reinitialize UCC structures. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-30ucc_geth: Remove UGETH_MAGIC_PACKET Kconfig symbol and codeAnton Vorontsov
This patch removes currently unused UGETH_MAGIC_PACKET Kconfig symbol and code, i.e. magic_packet_detection_{enable,disable} functions. The two functions each contain just two steps that we'll place into suspend/resume code path under CONFIG_PM. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-30ucc_geth: Factor out MAC initialization steps into a callAnton Vorontsov
This patch factors out MAC initialization into ucc_geth_init_mac() function that we'll use for suspend/resume. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-30powerpc/qe: Implement qe_alive_during_sleep() helper functionAnton Vorontsov
In some CPUs (i.e. MPC8569) QE shuts down completely during sleep, drivers may want to know that to reinitialize registers and buffer descriptors. This patch implements qe_alive_during_sleep() helper function, so far it just checks if MPC8569-compatible power management controller is present, which is a sign that QE turns off during sleep. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-30ucc_geth: Fix NULL pointer dereference in uec_get_ethtool_stats()Anton Vorontsov
In commit 3e73fc9a12679a546284d597c1f19165792d0b83 ("ucc_geth: Fix IO memory (un)mapping code") I fixed ug_regs IO memory leak by properly freeing the allocated memory. But ethtool_stats() callback doesn't check for ug_regs being NULL, and that causes following oops if 'ethtool -S' is executed on a closed eth device: Unable to handle kernel paging request for data at address 0x00000180 Faulting instruction address: 0xc0208228 Oops: Kernel access of bad area, sig: 11 [#1] ... NIP [c0208228] uec_get_ethtool_stats+0x38/0x140 LR [c02559a0] ethtool_get_stats+0xf8/0x23c Call Trace: [ef87bcd0] [c025597c] ethtool_get_stats+0xd4/0x23c (unreliable) [ef87bd00] [c025706c] dev_ethtool+0xfe8/0x11bc [ef87be00] [c0252b5c] dev_ioctl+0x454/0x6a8 ... ---[ end trace 77fff1162a9586b0 ]--- Segmentation fault This patch fixes the issue. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: David S. Miller <davem@davemloft.net>