summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* cfg80211: make some functions staticJohannes Berg2012-06-203-89/+82
| | | | | | | Some of the functions to retrieve a device can be static as they're used only in nl80211. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* mac80211: initialize sta pointer to avoid false-positive warningLuciano Coelho2012-06-201-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some compilers (eg. gcc 4.4.1 for ARM) report a false positive warning in mlme.c: net/mac80211/mlme.c: In function 'ieee80211_prep_connection': net/mac80211/mlme.c:3035: warning: 'sta' may be used uninitialized in this function This is a false positive because the place where 'sta' is used is inside an if with the same condition of where it is set: [...] if (!have_sta) { sta = sta_info_alloc(sdata, cbss->bssid, GFP_KERNEL); if (!sta) return -ENOMEM; } [...] if (!have_sta) { [...] sta->sta.supp_rates[cbss->channel->band] = rates; [...] For some reason the compiler doesn't understand this and warns. While this is not a problem in the code itself, we can avoid polluting the build logs with false positives by setting sta to NULL on declaration and checking for sta instead of !have_sta in the second if. Reported-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Luciano Coelho <coelho@ti.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* mac80211: cleanup offchannel_ps_enable argumentRajkumar Manoharan2012-06-201-5/+4
| | | | | | | | The 'tell_ap' argument is always true. So that remove it and simplify the function. Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* mac80211: fix and improve mesh RANN processingChun-Yeow Yeoh2012-06-181-18/+25
| | | | | | | | | | | | | | | | This patch fixes the problem of dropping RANN element if the TTL is 1. If the received RANN element TTL is 1 or greater than 1, the RANN is processed. However, forwarding of received RANN element with TTL 1 or less is prohibited according to the standard. This is previously reported by Monthadar Al Jaberi. Besides, this patch also avoid the processing of unicast PREQ generation if the RANN element does not meet the acceptance criteria mentioned in Sec. 13.10.12.4.2 of IEEE Std. 802.11-2012. Reported-by: Monthadar Al Jaberi <monthadar@gmail.com> Signed-off-by: Chun-Yeow Yeoh <yeohchunyeow@gmail.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* mac80211: set only VO as a U-APSD enabled ACArik Nemtsov2012-06-181-4/+7
| | | | | | | | | | | Some APs experience problems when working with U-APSD. Decrease the probability of that happening by using legacy mode for all ACs but VO. The AP that caused us troubles was a Cisco 4410N. It ignores our setting, and always treats non-VO ACs as legacy. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* mac80211: stop Rx during HW reconfigArik Nemtsov2012-06-184-0/+17
| | | | | | | | | | While HW reconfig is in progress, drop all incoming Rx. This prevents incoming packets from changing the internal state of the driver or calling callbacks of the low level driver while it is in inconsistent state. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* mac80211: fix the assignment of mesh element TTLChun-Yeow Yeoh2012-06-181-1/+1
| | | | | | | This patch fixes the wrong assignment of mesh element TTL. Signed-off-by: Chun-Yeow Yeoh <yeohchunyeow@gmail.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* {nl,cfg,mac}80211: implement dot11MeshHWMPconfirmationIntervalChun-Yeow Yeoh2012-06-188-2/+33
| | | | | | | | | | | | | | As defined in section 13.10.9.3 Case D (802.11-2012), this control variable is used to limit the mesh STA to send only one PREQ to a root mesh STA within this interval of time (in TUs). The default value for this variable is set to 2000 TUs. However, for current implementation, the maximum configurable of dot11MeshHWMPconfirmationInterval is restricted by dot11MeshHWMPactivePathTimeout. Signed-off-by: Chun-Yeow Yeoh <yeohchunyeow@gmail.com> [line-break commit log] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* mac80211: invoke the timer only with correct dot11MeshHWMPRootMode valueChun-Yeow Yeoh2012-06-182-3/+3
| | | | | | | | | | | | | | | | | | | | mesh_path_root_timer is invoked once the dot11MeshHWMPRootMode is larger than 1. This patch also adds the backward compatible to the previous setting on dot11MeshHWMPRootMode. If the user configures as follow, it will still trigger the proactive RANN with Gate Announcement. iw mesh0 set mesh_param mesh_hwmp_rootmode 1 iw mesh0 set mesh_param mesh_gate_announcements 1 similar to the following setting: iw mesh0 set mesh_param mesh_hwmp_rootmode 4 iw mesh0 set mesh_param mesh_gate_announcements 1 Signed-off-by: Chun-Yeow Yeoh <yeohchunyeow@gmail.com> [line-break commit log] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* mac80211: implement the proactive PREP generationChun-Yeow Yeoh2012-06-181-5/+33
| | | | | | | | Generate the proactive PREP element in Proactive PREQ mode as defined in Sec. 13.10.10.3 (Case D) of IEEE Std. 802.11-2012. Signed-off-by: Chun-Yeow Yeoh <yeohchunyeow@gmail.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* mac80211: implement the proactive PREQ generationChun-Yeow Yeoh2012-06-143-5/+74
| | | | | | | | | | | | | | | | | | Generate the proactive PREQ element as defined in Sec. 13.10.9.3 (Case C) of IEEE Std. 802.11-2012 based on the selection of dot11MeshHWMPRootMode as follow: dot11MeshHWMPRootMode (2) is proactivePREQnoPREP dot11MeshHWMPRootMode (3) is proactivePREQwithPREP The proactive PREQ is generated based on the interval defined by dot11MeshHWMProotInterval. With this change, proactive RANN element is now generated if the dot11MeshHWMPRootMode is set to (4) instead of (1). Signed-off-by: Chun-Yeow Yeoh <yeohchunyeow@gmail.com> [line-break commit log] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* {nl,cfg,mac}80211: implement dot11MeshHWMProotInterval and ↵Chun-Yeow Yeoh2012-06-146-1/+48
| | | | | | | | | | | | dot11MeshHWMPactivePathToRootTimeout Add the mesh configuration parameters dot11MeshHWMProotInterval and dot11MeshHWMPactivePathToRootTimeout to be used by proactive PREQ mechanism. Signed-off-by: Chun-Yeow Yeoh <yeohchunyeow@gmail.com> [line-break commit log] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* cfg80211/nl80211: fix kernel-docJohannes Berg2012-06-132-9/+32
| | | | | | | Add missing entries to nl80211.h and fix the kernel-doc notation in cfg80211.h. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* nl80211: fix sched scan match attribute nameJohannes Berg2012-06-132-3/+6
| | | | | | | It should be NL80211_SCHED_SCAN_MATCH_ATTR_SSID as documented, not NL80211_ATTR_SCHED_SCAN_MATCH_SSID. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* mac80211: Disallow changing chan type on monitor when CHAN_MODE_FIXEDPontus Fuchs2012-06-131-1/+2
| | | | | | | | | | | If you add a monitor interface in parallel to a normal interface mac80211 will let you to change the channel type on the monitor interface even if you are connected. Add an explicit check to disallow this. Signed-off-by: Pontus Fuchs <pontus.fuchs@gmail.com> [fix typo in commit log, use sdata instead of netdev] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* mac80211: allow cancelling dependent ROCsJohannes Berg2012-06-131-0/+22
| | | | | | | | | | | | | | | | | In my redesign of remain-on-channel I forgot that an item could be cancelled when it's a dependent item that is part of another item. Allow cancelling such items by removing them from the dependents list. Note that when we cancel the main item, all its dependents are also cancelled. It would be possible to not do that, but would need tricks to promote an item from dependent to top-level and is tricky in the HW ROC case. Reported-by: Ilan Peer <ilan.peer@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* ieee80211: definitions for Microsoft Vendor OUI and WPA OUI typeAvinash Patil2012-06-121-0/+2
| | | | | | | | Reference: http://standards.ieee.org/develop/regauth/oui/oui.txt Signed-off-by: Avinash Patil <patila@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* mac80211: remove unneeded ieee80211_run_deferred_scan()Johannes Berg2012-06-112-6/+0
| | | | | | | | | | Ilan pointed out to me that ieee80211_start_next_roc() already calls ieee80211_run_deferred_scan() if the list of ROC items is empty, so there's no need to call it again after calling ieee80211_start_next_roc(). Reported-by: Ilan Peer <ilan.peer@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* {nl,cfg,mac}80211: fix the coding style related to mesh parametersChun-Yeow Yeoh2012-06-116-120/+130
| | | | | | | | fix the coding style related to mesh parameters, especially the indentation, as pointed out by Johannes Berg. Signed-off-by: Chun-Yeow Yeoh <yeohchunyeow@gmail.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* cfg80211: add missing kernel-doc for mesh configuration structureChun-Yeow Yeoh2012-06-111-10/+49
| | | | | | | | Add the missing kernel-doc for mesh configuration parameters as pointed out by Johannes Berg. Signed-off-by: Chun-Yeow Yeoh <yeohchunyeow@gmail.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* mac80211: Rename stainfo variable for the more common staJavier Cardona2012-06-092-5/+5
| | | | | | Signed-off-by: Javier Cardona <javier@cozybit.com> Reviewed-by: Jason Abele <jason@cozybit.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* mac80211: Remove unused variableJavier Cardona2012-06-091-3/+0
| | | | | | Signed-off-by: Javier Cardona <javier@cozybit.com> Reviewed-by: Jason Abele <jason@cozybit.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* wl18xx: avoid some -Wformat warningsJohn W. Linville2012-06-081-1/+2
| | | | | | | | | CC drivers/net/wireless/ti/wl18xx/main.o drivers/net/wireless/ti/wl18xx/main.c: In function ‘wl18xx_conf_init’: drivers/net/wireless/ti/wl18xx/main.c:1024:3: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘long unsigned int’ [-Wformat] drivers/net/wireless/ti/wl18xx/main.c:1024:3: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘size_t’ [-Wformat] Signed-off-by: John W. Linville <linville@tuxdriver.com>
* Merge branch 'wl12xx-next' into for-linvilleLuciano Coelho2012-06-0846-956/+4818
|\
| * wlcore/wl12xx/wl18xx: make NVS file optional for wl18xxArik Nemtsov2012-06-082-17/+9
| | | | | | | | | | | | | | | | | | | | | | Don't spew errors when we can't find the NVS file in wlcore. Instead fail the wl12xx boot HW op if the NVS isn't found. Take this opportunity to remove some dead code from register_hw() which looks for the NVS again needlessly. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
| * wl18xx: clean up phy module parametersArik Nemtsov2012-06-082-58/+56
| | | | | | | | | | | | | | | | | | | | | | | | Give all wl18xx phy module paramters -1 as a default value, indicating the paramter was not set. Add previous default values to the default 18xx priv conf structure. Remove the board_type field from wl18xx priv. The field with the same name inside the phy conf is good enough for our purposes. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
| * wl18xx: align wl18xx_conf_phy with FW variant and remove itArik Nemtsov2012-06-083-110/+36
| | | | | | | | | | | | | | | | | | | | | | | | wl18xx_conf_phy represents part of the FW native wl18xx_mac_and_phy_params structure. Remove it and replace the phy part of the wl18xx conf with the FW bound structure. This allows us to set/override all members. Increment the wlconf version to ensure compatibility with the new structure Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
| * wl18xx: update fw statisticsIdo Reis2012-06-082-24/+65
| | | | | | | | | | | | | | | | Aligned to the struct in FW 8.2.0.0.91 and updated the debugfs entries accordingly. Signed-off-by: Ido Reis <idor@ti.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
| * wl18xx: allow FW-log by default for PG2.0Arik Nemtsov2012-06-081-1/+0
| | | | | | | | | | | | | | This is supported by new FW versions (.88+). Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
| * wl18xx: read configuration structure from a binary fileLuciano Coelho2012-06-081-5/+63
| | | | | | | | | | | | | | | | | | Instead of using the hardcoded configuration structure, try to read it from a "firmware" file called wl18xx-conf.bin. If the file doesn't exist, fall back to the hardcoded version. If the file exists but is illegal, bail out. Signed-off-by: Luciano Coelho <coelho@ti.com>
| * wlcore/wl18xx: export conf struct in a debugfs fileLuciano Coelho2012-06-083-0/+72
| | | | | | | | | | | | | | Add conf file header structure, magic and version values and export the entire conf struct in debugfs. Signed-off-by: Luciano Coelho <coelho@ti.com>
| * wlcore/wl18xx: the conf structs must be packed so they can be exportedLuciano Coelho2012-06-082-24/+24
| | | | | | | | | | | | | | Since we are now going to export the conf structure and read it from a file, it should be packed to avoid surprises with padding bytes. Signed-off-by: Luciano Coelho <coelho@ti.com>
| * wlcore: use u8 instead of enum for bcn_filt_modeLuciano Coelho2012-06-081-1/+1
| | | | | | | | | | | | | | | | Since we will export the conf structure as a file, we need to use well defined types. Instead of using enum, whose size may vary, use u8 for bcn_filt_mode instead. Signed-off-by: Luciano Coelho <coelho@ti.com>
| * wlcore/wl18xx/wl12xx: use u8 instead of bool for host_fast_wakeup_supportLuciano Coelho2012-06-083-4/+9
| | | | | | | | | | | | | | | | | | The conf structure is going to be exported to a file, so we should use only well defined types. bool is not well defined and may vary from platform to platform, so change the host_fast_wakeup_support type to u8 instead. Signed-off-by: Luciano Coelho <coelho@ti.com>
| * wlcore: export raw binary with the FW statistics in debugfsLuciano Coelho2012-06-081-0/+20
| | | | | | | | | | | | | | | | | | Instead of parsing all the binary data returned by the firmware, we should simply export the binary and let the userspace do the parsing. This commit adds a new file to debugfs to do that. Signed-off-by: Luciano Coelho <coelho@ti.com>
| * wl18xx: add support to clear FW statisticsLuciano Coelho2012-06-083-0/+63
| | | | | | | | | | | | | | | | This patch calls ACX_CLEAR_STATISTICS to clear the firmware statistics. The trigger is a new debugfs file called clear_fw_statistics in the fw_stats directory. Signed-off-by: Luciano Coelho <coelho@ti.com>
| * wlcore: add debugfs control over rx interrupt pacingEyal Shapira2012-06-081-0/+11
| | | | | | | | | | | | | | | | | | | | | | Add control over several conf fields which combined control the rx interrupt pacing mechanism, that is avoiding getting an interrupt following a single frame rx but instead have the FW trigger the interrupt only after a certain amount of frames received or a timeout. Signed-off-by: Eyal Shapira <eyal@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
| * wlcore: add support macros to easily add conf debugfs entriesEyal Shapira2012-06-081-0/+75
| | | | | | | | | | | | | | | | | | The current debugfs code contains too much code duplication of bolierplate code. Add some macro magic to avoid this and enable adding new debugfs entries by using just a few lines. Signed-off-by: Eyal Shapira <eyal@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
| * wl12xx: Add support for an external 26 MHz crystal sourceGrant Erickson2012-06-071-0/+1
| | | | | | | | | | | | | | | | | | Add support for an external 26 MHz crystal source. [Changed wl->ref_clock to priv->ref_clock -- Luca.] Signed-off-by: Grant Erickson <marathon96@gmail.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
| * wl18xx: pad only last frame in aggregration buffer for PG2Ido Reis2012-06-077-9/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In PG2 only the last frame in the aggregate buffer should be aligned to the sdio block size. This frame's header msb should be set to 0, while in all the previous frames in the aggregation buffer, this bit should be set to 1. [Add a HW op for setting the frame ctrl bit only for 18xx. Other minor cleanups - Arik] [Make the pre_pkt_send operation optional -- Luca] Signed-off-by: Ido Reis <idor@ti.com> Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
| * wl18xx: PG2.0 HW Watch dog interrupt supportIdo Reis2012-06-076-21/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In PG2, the HW watchdog interrupt occupies bit0 of the event vector, and the SW watchdog is relocated to bit9. We perform the relocation globally, as there's only one watchdog bit on previous platforms (bit0). [Only mask in the new bit9 for platforms supporting it. This avoids spurious events on other platforms - Arik] Signed-off-by: Orit Brayer <orit@ti.com> Signed-off-by: Ido Reis <idor@ti.com> Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
| * wl18xx: FW/PHY arguments added for PG2Ido Reis2012-06-073-1/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | PG2 requires 4 new parameters that to be passed to the PHY. Use the actual PHY initialization struct size for the mem size of the PHY_INIT section, to account for additions in params. [Make sure PG1 still gets the original struct - Arik] Signed-off-by: Ido Reis <idor@ti.com> Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
| * wl18xx: support PG2 version of the chipIdo Reis2012-06-072-1/+12
| | | | | | | | | | | | | | | | PG2 has a unique chip id. It supports similar HW quirks. Signed-off-by: Ido Reis <idor@ti.com> Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
| * wl18xx: fix PHY_INIT addresses mem sizeIdo Reis2012-06-071-2/+2
| | | | | | | | | | | | | | was hardcoded 252, now uses the parameters struct size. Signed-off-by: Ido Reis <idor@ti.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
| * wlcore: set channels 12-14 as pactive for sched scanVictor Goldenshtein2012-06-062-8/+38
| | | | | | | | | | | | | | | | | | | | Introduce “pactive” scan mode – which instructs the fw to perform a passive scan until an activity/energy is detected on these channels, once energy detected the channel becomes active. Signed-off-by: Victor Goldenshtein <victorg@ti.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
| * wlcore: compare ssid_len before comparing ssidsEliad Peller2012-06-061-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When comparing 2 ssids the ssid_len must be taken into account. Otherwise, a substring will be treated as equal. This bug might cause ssids to get scanned as public ssids (rather than hidden), resulting in broadcast probe request (instead of ssid-specific ones) Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
| * wlcore: add role_id to all the sched_scan commandsYoni Divinsky2012-06-063-9/+19
| | | | | | | | | | | | | | | | | | | | | | | | Due to a need by the firmware when working in multirole the role id needs to be added to the structs of the following commands: CMD_CONNECTION_SCAN_CFG, CMD_CONNECTION_SCAN_SSID_CFG, CMD_START_PERIODIC_SCAN, CMD_STOP_PERIODIC_SCAN Signed-off-by: Yoni Divinsky <yoni.divinsky@ti.com> Signed-off-by: Igal Chernobelsky <igalc@ti.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
| * wl12xx/wl18xx: add erp protection IE to the beacon filterEliad Peller2012-06-062-2/+10
| | | | | | | | | | | | | | | | | | We have to reconfigure the fw when erp protection should be enabled/disabled. Pass beacons containing changes in the ERP protection IE, so we could analyze them. Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
| * wl12xx: send beacon loss events to userspaceEliad Peller2012-06-061-0/+9
| | | | | | | | | | | | | | | | Send beacon loss events to userspace, so it will be able to initiate roaming before disconnection Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
| * wlcore: do not send stop fwlog cmd if fw is hangedYoni Divinsky2012-06-062-2/+8
| | | | | | | | | | | | | | | | | | | | If the driver received a watchdog interrupt then the assumption is that the fw is hanged. Avoid sending the stop fwlog command in case of a watchdog recovey to avoid waiting for the 2 seconds timeout of the command. Signed-off-by: Yoni Divinsky <yoni.divinsky@ti.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
OpenPOWER on IntegriCloud