aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAge
* mac80211: calculate wstats_flags on the flyJohannes Berg2009-02-13
| | | | | | | Just to make wext.c more self-contained. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mac80211: use cfg80211s BSS infrastructureJohannes Berg2009-02-13
| | | | | | | | Remove all the code from mac80211 to keep track of BSSes and use the cfg80211-provided code completely. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* cfg80211: add more flexible BSS lookupJohannes Berg2009-02-13
| | | | | | | | | Add a more flexible BSS lookup function so that mac80211 or other drivers can actually use this for getting the BSS to connect to. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* cfg80211: allow users to request removing a BSSJohannes Berg2009-02-13
| | | | | | | | | | | This patch introduces cfg80211_unlink_bss, a function to allow a driver to remove a BSS from the internal list and make it not show up in scan results any more -- this is to be used when the driver detects that the BSS is no longer available. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* cfg80211: free_priv for BSS infoJohannes Berg2009-02-13
| | | | | | | | | | When cfg80211 users have their own allocated data in the per-BSS private data, they will need to free this when the BSS struct is destroyed. Add a free_priv method and fix one place where the BSS was kfree'd rather than released properly. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mac80211: dont add BSS when creating IBSSJohannes Berg2009-02-13
| | | | | | | | | | | | There's no need to create a BSS struct only to pass it to ieee80211_sta_join_ibss, so refactor this function into __ieee80211_sta_join_ibss which takes all the relevant paramters, and ieee80211_sta_join_ibss which takes a BSS struct (used when joining an IBSS that already has other members). Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* cfg80211/nl80211: scanning (and mac80211 update to use it)Johannes Berg2009-02-13
| | | | | | | | | | This patch adds basic scan capability to cfg80211/nl80211 and changes mac80211 to use it. The BSS list that cfg80211 maintains is made driver-accessible with a private area in each BSS struct, but mac80211 doesn't yet use it. That's another large project. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mac80211: further cleanups to stopping BA sessionsJohannes Berg2009-02-13
| | | | | | | | Essentially consisting of passing the sta_info pointer around, instead of repeatedly doing hash lookups. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mac80211: RX aggregation: clean up stop sessionJohannes Berg2009-02-13
| | | | | | | | | Clean up the locking by splitting it into two functions, this will also enable further cleanups of stopping all sessions. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mac80211: clean up BA session teardownJohannes Berg2009-02-13
| | | | | | | | | The sta_info pointer can very well be passed to ieee80211_sta_tear_down_BA_sessions, this will later allow us to pass it through even further. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mac80211: fix aggregation timer lockupsJohannes Berg2009-02-13
| | | | | | | | | | | | | | | | | As far as I can tell, there are possible lockups because both the RX session_timer and TX addba_resp_timer are del_timer_sync'ed under the sta spinlock which both timer functions take. Additionally, the TX agg code seems to leak memory when TX aggregation is not disabled before the sta_info is freed. Fix this by making the free code a little smarter in the RX agg case, and actually make the sta_info_destroy code free the TX agg info in the TX agg case. We won't notify the peer, but it'll notice something is wrong anyway, and normally this only happens after we've told it in some other way we will no longer talk to it. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mac80211: fix race in TX aggregationJohannes Berg2009-02-13
| | | | | | | | | | | When disabling TX aggregation because it was rejected or from the timer (it was not accepted), there is a window where we first set the state to operation, unlock, and then undo the whole thing. Avoid that by splitting up the stop function. Also get rid of the pointless sta_info indirection in the timer. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mac80211: document TX aggregation (and small cleanup)Johannes Berg2009-02-13
| | | | | | | | Add documentation and move ieee80211_start_tx_ba_cb_irqsafe to right after ieee80211_start_tx_ba_cb. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mac80211: hardware should not deny going back to legacyJohannes Berg2009-02-13
| | | | | | | | | | | | Doing so would be an MLME protocol violation when the peer disabled the aggregation session. Quick driver review indicates that there are error codes passed all over the drivers but cannot ever be nonzero except in error conditions that would indicate mac80211 bugs. No real changes here, since no drivers currently can return -EBUSY. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mac80211: restrict aggregation to supported interface modesJohannes Berg2009-02-13
| | | | | | | | | | We can only support aggregation on AP/STA right now. HT isn't defined for IBSS, WDS or MESH. In the WDS/MESH cases it's not clear what to put into the IBSS field, and we don't handle that in the code at all. Also fix the code to handle VLAN correctly. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mac80211: restructure HT codeJohannes Berg2009-02-13
| | | | | | | | Create two new files, agg-tx.c and agg-rx.c to make it clearer which code is common (ht.c) and which is specific (agg-*.c). Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mac80211: fix RX aggregation timeoutsJohannes Berg2009-02-13
| | | | | | | The values are in TUs (1.024ms), not ms. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mac80211: remove stray aggregation debugfs definitionJohannes Berg2009-02-13
| | | | | Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mac80211: remove bssid argument from prepare_for_handlersJohannes Berg2009-02-13
| | | | | | | | | It's a little confusing to get the BSSID outside the function and pass it in, when it's only needed for this function, so change that. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mac80211: fix beacon enable moreJohannes Berg2009-02-13
| | | | | | | | | | Hopefully the last required fix ... disable beaconing only on beaconing interfaces, and thus avoid calling ieee80211_if_config for purely virtual interfaces (those driver doesn't know about). Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mac80211: reject extra IEs for probe request when hw_scanJohannes Berg2009-02-13
| | | | | | | | | | We cannot currently hand off extra IEs to hw_scan, so reject configuring extra IEs for probe request frames when hw_scan is set. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Cc: Jouni Malinen <j@w1.fi> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mac80211: properly validate/translate IW_AUTH_MFP valuesJohannes Berg2009-02-13
| | | | | | | | Make sure nobody passes in bogus values, and translate the values (although it isn't necessary). Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* zd1211rw: honour enable_beacon confJohannes Berg2009-02-13
| | | | | | | | | This makes zd1211rw honour enable_beacon, as well as fixing a memory leak: the beacon skb is leaked when configuring it to the hardware fails. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mac80211: disable IBSS beacon before joinJohannes Berg2009-02-13
| | | | | | | | | Before we have a probe response frame (which is used as the beacon too) there's no need to ask drivers to beacon, they will not get a beacon anyway. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* zd1211rw: do not ratelimit no-opsJohannes Berg2009-02-13
| | | | | | | | | | | | | It is rather confusing to see this in the log: [ 695.606877] __ratelimit: 40 callbacks suppressed [ 700.726878] __ratelimit: 40 callbacks suppressed without ever seeing any actual message. This is because zd1211rw doesn't compile out the net_ratelimit() call properly if debugging is not enabled. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mac80211: use ps-poll when dynamic power save mode is disabledKalle Valo2009-02-13
| | | | | | | | | | | | | | | | | When a directed tim bit is set, mac80211 currently disables power save ands sends a null frame to the AP. But if dynamic power save is disabled, mac80211 will not enable power save ever gain. Fix this by adding ps-poll functionality to mac80211. When a directed tim bit is set, mac80211 sends a ps-poll frame to the AP and checks for the more data bit in the returned data frames. Using ps-poll is slower than waking up with null frame, but it's saves more power in cases where the traffic is low. Userspace can control if either ps-poll or null wakeup method is used by enabling and disabling dynamic power save. Signed-off-by: Kalle Valo <kalle.valo@nokia.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mac80211: remove multicast check from check_tim()Kalle Valo2009-02-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently mac80211 checks for the multicast tim bit from beacons, disables power save and sends a null frame if the bit is set. This was added to support ath9k. But this is a bit controversial because the AP will send multicast frames immediately after the beacon and the time constraints are really high. Relying mac80211 to be fast enough here might not be reliable in all situations. And there's no need to send a null frame, AP will send the frames immediately after the dtim beacon no matter what. Also if dynamic power save is disabled (iwconfig wlan0 power timeout 0) currently mac80211 disables power save whenever the multicast bit is set but it's never enabled again after receiving the first multicast/broadcast frame. The current implementation is not usable on p54/stlc45xx and the easiest way to fix this is to remove the multicast tim bit check altogether. Handling multicast tim bit in host is rare, most of the designs do this in firmware/hardware, so it's better not to have it in mac80211. It's a lot better to do this in firmware/hardware, or if that's not possible it could be done in the driver. Also renamed the function to ieee80211_check_tim() to follow the style of the file. Signed-off-by: Kalle Valo <kalle.valo@nokia.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* orinoco: Storage class should be before const qualifierTobias Klauser2009-02-13
| | | | | | | | | | | The C99 specification states in section 6.11.5: The placement of a storage-class specifier other than at the beginning of the declaration specifiers in a declaration is an obsolescent feature. Signed-off-by: Tobias Klauser <tklauser@distanz.ch> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath5k: Storage class should be before const qualifierTobias Klauser2009-02-13
| | | | | | | | | | | | The C99 specification states in section 6.11.5: The placement of a storage-class specifier other than at the beginning of the declaration specifiers in a declaration is an obsolescent feature. Signed-off-by: Tobias Klauser <tklauser@distanz.ch> Acked-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: Remove all the useless ah_ variable prefixesSujith2009-02-13
| | | | | Signed-off-by: Sujith <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: Cleanup EEPROM operationsSujith2009-02-13
| | | | | | | | This patch removes the various function pointer assignments and unifies them in a single ops structure. Signed-off-by: Sujith <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: Add callbacks hooks for EEPROM operationsSujith2009-02-13
| | | | | | | | This is preparatory work for removing the individual function pointer assignments in eeprom.c Signed-off-by: Sujith <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: Merge ath_hal and ath_hal_5416 structuresSujith2009-02-13
| | | | | | | | Finally, merge these structures and have a single HW specific data structure. Signed-off-by: Sujith <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: Remove duplicate variablesSujith2009-02-13
| | | | | | | | A few variables (bssid, bssidmask, curaid) were duplicated in struct ath_softc and in ath_hal, remove them. Signed-off-by: Sujith <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: Move regulatory information to a separate structureSujith2009-02-13
| | | | | Signed-off-by: Sujith <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: Store HW version information in a separate structureSujith2009-02-13
| | | | | | | | This patch moves all the HW version/revision specific information into a separate structure. Signed-off-by: Sujith <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: Remove all the sc_ prefixesSujith2009-02-13
| | | | | | | | This patch removes the useless sc_ prefixes for all variables. Also, refer to interfaces as VIFs and not as VAPs anymore. Signed-off-by: Sujith <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: Convert ANI channel to a pointerSujith2009-02-13
| | | | | | | | This patch converts the ANI channel reference to a pointer, this facilitates moving struct ar5416AniState to ani.h Signed-off-by: Sujith <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: Header file cleanupSujith2009-02-13
| | | | | | | Split the core header files into manageable pieces. Signed-off-by: Sujith <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath5k: Don't call reset on config_interfaceNick Kossifidis2009-02-13
| | | | | | | | | | | | | * We call reset too often and this can result various PHY problems. On config_interface we don't need to reset the whole device. TODO: Create a function hw_fast_reset that only resets the PCU (tx/rx stuff) and not the whole device so that we can use this for stuck beacons etc. Signed-off-by: Nick Kossifidis <mickflemm@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath5k: Disable BMISS interruptsNick Kossifidis2009-02-13
| | | | | | | | * Don't enable BMISS interrupts as we don't handle them yet Signed-off-by: Nick Kossifidis <mickflemm@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath5k: Update reset codeNick Kossifidis2009-02-13
| | | | | | | | | | | | | | | | | | | | * Update reset and sync with HALs * Clean up eeprom settings and tweaking of initvals and put them on separate functions * Set/Restore 32KHz ref clk operation * Add some more documentation TODO: Spur mitigation, tpc, half/quarter rate, compression etc v2: Address comments from Bob and Felix and fix RSSI threshold bug introduced on the first version of the patch Signed-off-by: Nick Kossifidis <mickflemm@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath5k: Update initvalsNick Kossifidis2009-02-13
| | | | | | | | * Update initvals to match legacy and Sam's HAL Signed-off-by: Nick Kossifidis <mickflemm@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath5k: Update RF Buffer handlingNick Kossifidis2009-02-13
| | | | | | | | | | | | | | | | | | * Use the new way to modify rf buffer and put some rf buffer documentation on rfbufer.h * Merge all rf regs functions to one * Sync with legacy HAL and Sam's HAL * Set gain_F settings so that gain_F optimization engine works on RF5111/RF5112 (note that both HALs only use step 0 for RF5111 and they don't use gain_F optimization for this chip, code is there but is never used) Signed-off-by: Nick Kossifidis <mickflemm@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath5k: Update gain_F calibration code and add documentationNick Kossifidis2009-02-13
| | | | | | | | | | | | | | | | | | | | | | | | | * Update and cleanup rf gain optimization code * Add comments and refferences to docs and use sane function names * Use only step index on ath5k_gain, no need to have a pointer to the current step since we can determine te step from it's index, this also allows us to put all other structs on rfgain.h and cleanup ath5k.h a little * No need for ah_rfgain variable, we use ah_gain.g_state for everything * Tested on RF2112B chip but gain_F calibration is not yet done (we will finish this on the next patch where we'll rewrite rf-buffer handling) * Use initial rf gain settings for 2316 and 2317 SoCs introduced on a previous patch It seems big but it's mostly cleanup, very few functional changes have been made on phy.c Signed-off-by: Nick Kossifidis <mickflemm@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath5k: PHY code cleanupNick Kossifidis2009-02-13
| | | | | | | | | | | | | | | | * Clean up initial rf buffer settings (new file rfbufer.h) and introduce a new way to access specific rf registers (will use it later) * Clean up initial rf gain settings by moving them on a new file (rfgain.h) so we can later work on gain optimization functions * Update initial rf buffer settings and initial rf gain settings from HALs. This breaks things for now because our current dumps come from pre-configured rf buffer (regdumps already had the needed values set from binary HAL). Signed-off-by: Nick Kossifidis <mickflemm@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mac80211: Remove TSF atomic requirement from the documentationAlina Friedrichsen2009-02-13
| | | | | | | | | | | | | | The atomic requirement for the TSF callbacks is outdated. get_tsf() is only called by ieee80211_rx_bss_info() which is indirectly called by the work queue ieee80211_sta_work(). In the same context are called several other non-atomic functions, too. And the atomic requirement causes problems for drivers of USB wifi cards. Signed-off-by: Alina Friedrichsen <x-alina@gmx.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mac80211: Fix the wrong WARN_ON message appearing on enabling power save.Vivek Natarajan2009-02-13
| | | | | | | | | | | | This issue happens only when we are associated with a 11n AP and power save is enabled. In the function 'ieee80211_master_start_xmit', ps_disable_work is queued where wake_queues is called. But before this work is executed, we check if the queues are stopped in _ieee80211_tx and return TX_AGAIN to ieee8011_tx which leads to the warning message. This patch fixes this erroneous case. Signed-off-by: Vivek Natarajan <vnatarajan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* orinoco: hermes doesn't need to be a separate moduleDavid Kilroy2009-02-13
| | | | | | | | Just compile it into the orinoco module. If we merge USB support, the module can then be split as appropriate. Signed-off-by: David Kilroy <kilroyd@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* orinoco: hermes_dld does not need to be a moduleDavid Kilroy2009-02-13
| | | | | Signed-off-by: David Kilroy <kilroyd@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>