aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2012-03-05brcm80211: fmac: initialize host interface drivers regardless resultArend van Spriel4-18/+8
The module init function of brcmfmac calls init functions for SDIO and USB doing driver registration. This patch removes terminating the module init when a driver registration for one host interface fails. Reviewed-by: Pieter-Paul Giesberts <[email protected]> Reviewed-by: Franky (Zhenhui) Lin <[email protected]> Signed-off-by: Arend van Spriel <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-03-05brcm80211: fmac: use counters in brcmf_bus structureArend van Spriel2-15/+4
The usb code defines a structure for counting statistics. However, it should use the statistics entry provided in brcmf_bus as that is exposed to the net_device. The usb private statistics counter only remains with counters for control packets between driver and usb device. Reviewed-by: Pieter-Paul Giesberts <[email protected]> Reviewed-by: Franky (Zhenhui) Lin <[email protected]> Signed-off-by: Arend van Spriel <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-03-05brcm80211: fmac: remove brcmf_usb_attrib structureArend van Spriel2-22/+11
Several fields in this structure are only written once or not used at all. Remaining two fields have been moved and brcmf_usb_attrib definition has been removed. Reviewed-by: Pieter-Paul Giesberts <[email protected]> Reviewed-by: Franky (Zhenhui) Lin <[email protected]> Reviewed-by: Kan Yan <[email protected]> Signed-off-by: Arend van Spriel <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-03-05brcm80211: fmac: remove unnecessary NULL pointer checkArend van Spriel1-3/+0
In brcmf_usb_up() the variable devinfo was checked for being a NULL pointer, but this can not happen. Also the check was done after dereferencing the pointer. This patch removes the check. Reviewed-by: Pieter-Paul Giesberts <[email protected]> Reviewed-by: Franky (Zhenhui) Lin <[email protected]> Reviewed-by: Kan Yan <[email protected]> Signed-off-by: Arend van Spriel <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-03-05rtlwifi: rtl8192c: Prevent sleeping from invalid context in rtl8192cuLarry Finger1-3/+8
When driver rtl8192cu is used with the debug level set to 3 or greater, the result is "sleeping function called from invalid context" due to an rcu_read_lock() call in the DM refresh routine in driver rtl8192c. This lock is not necessary as the USB driver does not use the struct being protected, thus the lock is set only when a PCI interface is active. This bug is reported in https://bugzilla.kernel.org/show_bug.cgi?id=42775. Reported-by: Ronald Wahl <[email protected]> Tested-by: Ronald Wahl <[email protected]> Signed-off-by: Larry Finger <[email protected]> Cc: Stable <[email protected]> Cc: Ronald Wahl <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-03-05rtlwifi: Remove extraneous value returnLarry Finger1-3/+2
In usb.c, routine _rtl_usb_init_sw() always returns 0, and rtl_usb_probe() never checks the returned value. Thus we can change _rtl_usb_init_sw() to a void routine. In addition, remove the underscore at the beginning of the name of the routine. Signed-off-by: Larry Finger <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-03-05rtlwifi: Detect misread of end-point countLarry Finger1-3/+10
In the unlikely event of a misread of the USB end point count, the driver generates a divide fault. To prevent this, add a check of the value returned by _rtl_usb_init(). In addition, add some logging to indicate why the condition occurred. Signed-off-by: Larry Finger <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-03-05mac80211: combine QoS with other BSS changesJohannes Berg4-9/+17
When associating and particularly when disassociating there's no need to notify the driver about changes with multiple calls to bss_info_changed, we should combine the QoS enabling/disabling into the same call as otherwise the driver could get confused about QoS suddenly getting disabled while connected. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-03-05mac80211: use common radiotap code for cooked monitorsJohannes Berg1-30/+9
There's no need to hardcode a subset of the radiotap header for cooked monitor receive, we can just reuse the normal monitor mode radiotap code. This simplifies the code and extends the information available on cooked monitor interfaces. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-03-05cfg80211: Add an attribute to set inactivity timeout in AP modeVasanthakumar Thiagarajan3-2/+23
This patch adds an attribute, NL80211_ATTR_INACTIVITY_TIMEOUT, to set the inactivity timeout which can be used to remove the station in AP mode. This can be passed in NL80211_CMD_START_AP and used by the drivers which have AP MLME in firmware but don't support get_station() properly. To disable inactivity timer in userspace, wpa_s for example, there is a new flag, NL80211_FEATURE_INACTIVITY_TIMER, in nl80211_feature_flags through which drivers can register their capability to use the inactivity timeout to free the stations. Signed-off-by: Vasanthakumar Thiagarajan <[email protected]> Acked-by: Johannes Berg <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-03-05mac80211: fix the support of setting non-forwarding entity in MeshChun-Yeow Yeoh2-1/+11
RANN, PREP and PERR propagation should happen only if the dot11MeshForwarding is true. Besides, data frame should not be forwarded if dot11MeshForwarding is false. This redundant checking is necessary to avoid the broadcasted ARP breaking the non-forwarding rule. Signed-off-by: Chun-Yeow Yeoh <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-03-05mac80211: add an rx flag for ignoring a packet's signal strengthFelix Fietkau2-3/+9
For A-MPDU rx it makes sense to only process the signal strength once per aggregate instead of once per subframe. Additonally, some hardware (e.g. Atheros) only provides valid signal strength information for the last subframe. Signed-off-by: Felix Fietkau <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-03-05cfg80211: fix kernel-docJohannes Berg1-6/+4
I forgot to update the kernel-doc in my patch to redesign AP mode APIs, fix that now. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-03-05mac80211: use compare_ether_addr on MAC addresses instead of memcmpFelix Fietkau10-42/+53
Because of the constant size and guaranteed 16 bit alignment, the inline compare_ether_addr function is much cheaper than calling memcmp. Signed-off-by: Felix Fietkau <[email protected]> Acked-by: Johannes Berg <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-03-05mac80211: use 16 bit alignment for the if_ibss bssid fieldFelix Fietkau1-1/+1
Several MAC address comparison functions assume 16 bit alignment for pointers passed to them. Since the addition of the control_port field, alignment for the IBSS bssid was off by one, causing a severe performance hit on architectures without efficient unaligned access (e.g. MIPS). Signed-off-by: Felix Fietkau <[email protected]> Acked-by: Johannes Berg <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-03-05mwifiex: endian bug in mwifiex_drv_change_adhoc_chan()Dan Carpenter2-4/+3
In mwifiex_drv_change_adhoc_chan() we pass channel to mwifiex_bss_ioctl_ibss_channel() which sets the high 16 bits. This works on little endian systems but not on big endian ones. I've changed mwifiex_drv_change_adhoc_chan() to use a 16 bit variable. This matches the other functions in the file. I considered changing mwifiex_change_adhoc_chan() as well but it turns out that the function isn't implemented so I just removed the definition. Signed-off-by: Dan Carpenter <[email protected]> Acked-by: Bing Zhao <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-03-05p54spi: Release GPIO lines and IRQ on error in p54spi_probeMax Filippov1-4/+10
This makes it possible to reload driver if insmod has failed due to missing firmware. Signed-off-by: Max Filippov <[email protected]> Cc: stable <[email protected]> Acked-by: Christian Lamparter <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-03-05rndis_wlan: use u8 for key indexesJussi Kivilinna1-9/+9
cfg80211 uses u8 for key indexes and so should rndis_wlan. Signed-off-by: Jussi Kivilinna <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-03-05rndis_wlan: use RNDIS_WLAN_NUM_KEYS for all key index checksJussi Kivilinna1-3/+5
Use new RNDIS_WLAN_NUM_KEYS for checks in add_wep_key() and add_wpa_key(). Signed-off-by: Jussi Kivilinna <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-03-05rndis_wlan: fix le16/le32_to_cpu mix up with config.beacon_periodJussi Kivilinna1-7/+7
'beacon_period' in 'struct ndis_80211_conf' is __le32 instead of __le16 so le32_to_cpu must be used instead of le16_to_cpu. Also correct 'beacon_interval' variables used for passing this value forward from u16 to u32 and rename those variables 'beacon_period' This is to avoid confusion because 'beacon_interval' is defined as __le16 at other structure, 'struct ndis_80211_fixed_ies'. Reported-by: Dan Carpenter <[email protected]> Signed-off-by: Jussi Kivilinna <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-03-05rndis_wlan: prevent integer overflow in indication()Dan Carpenter1-2/+2
If we pick a high value for "offset" then it could lead to an integer overflow and we would get past the check for: if (offset + len > buflen) { ... Signed-off-by: Dan Carpenter <[email protected]> Acked-by: Jussi Kivilinna <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-03-05rndis_wlan: make some variables unsignedDan Carpenter1-2/+4
These variables can never be less than zero because we cap them in get_device_pmkids(). Let's make them unsigned here because it's simpler to not have to worry about negative numbers when we read the code. Signed-off-by: Dan Carpenter <[email protected]> Acked-by: Jussi Kivilinna <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-03-05rndis_wlan: remove unneeded variablesDan Carpenter1-4/+2
We never use the "len" variable. Signed-off-by: Dan Carpenter <[email protected]> Acked-by: Jussi Kivilinna <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-03-05rndis_wlan: integer overflows in rndis_wlan_do_link_up_work()Dan Carpenter1-4/+9
If "offset" is negative then we can get past this check: if (offset > CONTROL_BUFFER_SIZE) Or if we pick a very high "req_ie_len" then we can get around the check: if (offset + req_ie_len > CONTROL_BUFFER_SIZE) I made "resp_ie_len" and "req_ie_len" unsigned. I don't know if it was intentional that they were signed in the original. Signed-off-by: Dan Carpenter <[email protected]> Acked-by: Jussi Kivilinna <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-03-05{nl,cfg,mac}80211: Implement RSSI threshold for mesh peeringAshok Nagarajan7-1/+39
Mesh peer links are established only if average rssi of the peer candidate satisfies the threshold. This is not in 802.11s specification but was requested by David Fulgham, an open80211s user. This is a way to avoid marginal peer links with stations that are barely within range. This patch adds a new mesh configuration parameter, mesh_rssi_threshold. This feature is supported only for hardwares that report signal in dBm. Signed-off-by: Ashok Nagarajan <[email protected]> Signed-off-by: Javier Cardona <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-03-05b43: prevent firmware on bcm5354 from taking over wrong GPIO pinsHauke Mehrtens1-0/+2
When using the bcm5354 (Soc with integrated LP-PHY Wifi) with a recent firmware >= 478.104 it runs out of memory after a very short time in OpenWrt after doing an active scan or any thing else where packages are send. This was cased by a gpio misconfiguration, the firmware triggered the GPIO pins used for buttons on some devices and that caused an other driver (OpenWrt diag) listening for these buttons irqs to send many messages to the user space. This patch fixes the bug for my devices (Asus WL-520GU) and makes it work with firmware 666.2. Now the firmware just uses LED GPIO pin number 1 and not the button pins any more. This is the GPIO Pin layout used on my device, see [0]. GPIO pin layout: pin# name type 0 power led 1 wlan led 2 reset button 3 ses buttom This is the nvram configuration output of "nvram show |grep gpio" related nvram configuration: wl0gpio2=11 wl0gpio3=11 wl0gpio0=11 wl0gpio1=0x02 reset_gpio=2 [0]: https://dev.openwrt.org/browser/trunk/package/broadcom-diag/src/diag.c Signed-off-by: Hauke Mehrtens <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-03-05ath9k: make use of list_for_each_entry_safeMohammed Shafi Shajakhan1-7/+2
this does the same thing as the previous code Signed-off-by: Mohammed Shafi Shajakhan <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-03-05ath9k: completely zero intialize valid_phy_rate_idxMohammed Shafi Shajakhan2-3/+1
its better to zero initialize the 'valid_phy_rate_idx' array completely Signed-off-by: Mohammed Shafi Shajakhan <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-03-05mac80211: Fix the generation of PREQs in proactive RANN mechanism of HWMPChun-Yeow Yeoh2-5/+19
According to Section Y.7.4 Actions on receipt of proactive RANN, an individually addressed PREQ should be generated towards the neighbor peer mesh STA indicated in the RANN Sender Address field in the forwarding information. Signed-off-by: Chun-Yeow Yeoh <[email protected]> Signed-off-by: Javier Cardona <[email protected]> Signed-off-by: Thomas Pedersen <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-03-05mwifiex: fix bug in wildcard scan handlingAmitkumar Karwar3-33/+27
Currently if valid SSID list is provided in scan request, driver performs specific SSID scan otherwise wildcard scan is chosen. When wpa_supplicant provides valid SSID list followed by zero-length SSID for wildcard scan, only specific SSID scan is performed by driver. Actually driver is expected to do both type of scanning in this case. The patch fixes this issue. Also, use SSID list pointer provided by stack directly, instead of copying SSID's to local structure. Signed-off-by: Amitkumar Karwar <[email protected]> Signed-off-by: Bing Zhao <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-03-05mwifiex: remove unnecessary struct mwifiex_802_11_ssidAmitkumar Karwar8-27/+19
Use struct cfg80211_ssid available in include/net/cfg80211.h instead of having similar definition in driver. Signed-off-by: Amitkumar Karwar <[email protected]> Signed-off-by: Bing Zhao <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-03-05mwifiex: correct bitrates advertised to cfg80211Avinash Patil1-4/+2
1. Driver and firmware do not support 22Mbps and 72Mbps bitrates. Remove them from the rate table advertised to cfg80211. 2. First 4 rates from mwifiex_rates table are not valid for 5GHz/A band. Set correct bitrate array's index and no of rates for ieee80211_supported_band for 5GHz band. Signed-off-by: Avinash Patil <[email protected]> Signed-off-by: Nishant Sarmukadam <[email protected]> Signed-off-by: Amitkumar Karwar <[email protected]> Signed-off-by: Yogesh Ashok Powar <[email protected]> Signed-off-by: Kiran Divekar <[email protected]> Signed-off-by: Bing Zhao <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-03-05MIPS: BCM47XX: provide sprom to bcma busHauke Mehrtens1-4/+35
On SoCs the sprom is often stored in nvram in the flashchip. This patch registers a sprom fallback callback handler in bcma and provides the sprom needed for this device. Signed-off-by: Hauke Mehrtens <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-03-05MIPS: BCM47XX: move and extend sprom parsingHauke Mehrtens4-151/+625
Move the sprom parsing from nvram into sprom.c. There are all values needed for sprom version 1 to 9 read from nvram and there are more sanity checks added. This is based on the sprom parsing in the open source part of the Broadcom SDK. Signed-off-by: Hauke Mehrtens <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-03-05MIPS: BCM47XX: fix signature of nvram_parse_macaddrHauke Mehrtens1-1/+1
Explicitly enforce an char array of 6 bytes for the mac address. Signed-off-by: Hauke Mehrtens <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-03-05MIPS: BCM47XX: return number of written bytes in nvram_getenvHauke Mehrtens1-2/+1
Signed-off-by: Hauke Mehrtens <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-03-05bcma: add support for sprom not found on the deviceHauke Mehrtens2-8/+75
On SoCs the sprom is stored in the nvram in a special partition on the flash chip. The nvram contains the sprom for the main bus, but sometimes also for a pci devices using bcma. This patch makes it possible for the arch code to register a function to fetch the needed sprom from the nvram and provide it to the bcma code. Signed-off-by: Hauke Mehrtens <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-03-05bcma: export bcma_find_coreHauke Mehrtens2-1/+3
This function is needed by the bcm47xx arch code to get the number of the ieee80211 core. Signed-off-by: Hauke Mehrtens <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-03-05ssb: add some missing sprom attributesHauke Mehrtens1-1/+75
This patch extends the sprom struct to contain all sprom attributes found in sprom version 1 to 9. This was done accordingly to the open source part of the Broadcom SDK. Signed-off-by: Hauke Mehrtens <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-03-05ssb: add alpha2Hauke Mehrtens1-0/+1
This member contains the country code encoded with two chars Signed-off-by: Hauke Mehrtens <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-03-05ssb: fix per path sprom varsHauke Mehrtens1-1/+1
On sprom version 4 and 5 there are 4 values for pa_2g, pa_5gl, pa_5g and pa_5gh, for sprom version 8 and 9 there are only 3. Make the per path sprom store also work for older sprom versions. Signed-off-by: Hauke Mehrtens <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-03-05ssb: remove 5GHz antenna gain from spromHauke Mehrtens5-50/+24
There is no 2.4 GHz or 5GHz antenna gain stored in sprom. The sprom just stores the gain values for antenna 1 and 2 or 1 to 4 for more recent sprom versions. On old devices antenna 2 was used for 5 GHz wifi. Signed-off-by: Hauke Mehrtens <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-03-05ssb: sprom fix some sizes / signednessHauke Mehrtens1-8/+8
Some parts of the sprom struct are bigger than needed. The leddc and maxpwr values are just 8 bit long and not 16. rxpo2g and rxpo5g are signed I got these information for the open source part of the Broadcom SDK covering sprom version 1 to 9. rxpo2g contained a negative number on my bcm5354 based device, this cased an error and Broadcom SDK says this is signed. Signed-off-by: Hauke Mehrtens <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-03-05ath9k: fix drv_tx_last_beacon on AR9003 by processing beacon tx statusFelix Fietkau2-3/+6
Signed-off-by: Felix Fietkau <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-03-05ath9k_hw: enable interrupts for beacon tx completion eventsFelix Fietkau1-1/+5
Not doing so could cause the tx status queue to overflow during longer periods of time without non-beacon tx. These events are also required for proper drv_tx_last_beacon handling. Signed-off-by: Felix Fietkau <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-03-05ath9k: do not call ath9k_hw_txprocdesc on AR9003 outside of the tx taskletFelix Fietkau1-1/+2
Since AR9003 uses a global tx status queue, processing tx status outside of the regular tx tasklet is dangerous and messes up hardware/software synchronization of tx status events. Signed-off-by: Felix Fietkau <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-03-05Revert "ath9k_hw: Fix false tx hung detection in AR9003 chips"Felix Fietkau2-12/+2
The approach of this change is flawed, as it triggers tx status processing from more callsites, yet the chips only have one global tx status queue. Subsequent patches will properly fix the issue that this one tried to address. Signed-off-by: Felix Fietkau <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-03-05mwifiex: handle auto authentication mode correctlyAmitkumar Karwar5-10/+22
When authentication type is configured to NL80211_AUTHTYPE_AUTOMATIC, driver tries to connect using open mode. The association is failed if AP is configured in shared mode. This patch adds code to try association using shared mode as well if open mode association fails. Now since we returned exact error code in association response handler (instead of -1), corresponding changes are done in mwifiex_process_cmdresp(). Signed-off-by: Amitkumar Karwar <[email protected]> Signed-off-by: Bing Zhao <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-03-05Merge remote branch 'wireless-next/master' into ath6kl-nextKalle Valo7729-176812/+338319
Conflicts: drivers/net/wireless/ath/ath6kl/cfg80211.c
2012-03-05ath6kl: Restrict memcpy to bounce buffer only for write requestRaja Mani1-1/+4
No need to copy received local buffer content to bounce buffer (DMA buffer) while performing sync READ operation from the chip. It's applicable for only WRITE operation. Signed-off-by: Raja Mani <[email protected]> Signed-off-by: Kalle Valo <[email protected]>