summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c
Commit message (Collapse)AuthorAgeFilesLines
* brcm80211: move under broadcom vendor directoryKalle Valo2015-11-181-1700/+0
| | | | | | | Part of reorganising wireless drivers directory and Kconfig. Note that I had to edit Makefiles from subdirectories to use the new location. Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* mac80211: allow to transmit A-MSDU within A-MPDUEmmanuel Grumbach2015-09-221-1/+1
| | | | | | | | | Advertise the capability to send A-MSDU within A-MPDU in the AddBA request sent by mac80211. Let the driver know about the peer's capabilities. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* brcmsmac: Use kstrdup to simplify codeChristophe Jaillet2015-07-211-3/+1
| | | | | | | | | Replace a kmalloc+strcpy by an equivalent kstrdup in order to improve readability. Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Acked-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* mac80211: convert HW flags to unsigned long bitmapJohannes Berg2015-06-101-4/+3
| | | | | | | | | | | | | | | As we're running out of hardware capability flags pretty quickly, convert them to use the regular test_bit() style unsigned long bitmaps. This introduces a number of helper functions/macros to set and to test the bits, along with new debugfs code. The occurrences of an explicit __clear_bit() are intentional, the drivers were never supposed to change their supported bits on the fly. We should investigate changing this to be a per-frame flag. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* mac80211: remove support for IFF_PROMISCJohannes Berg2015-04-241-4/+1
| | | | | | | | | | | This support is essentially useless as typically networks are encrypted, frames will be filtered by hardware, and rate scaling will be done with the intended recipient in mind. For real monitoring of the network, the monitor mode support should be used instead. Removing it removes a lot of corner cases. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* treewide: Remove unnecessary BCMA_CORETABLE_END macroJoe Perches2015-02-111-1/+1
| | | | | | | | | Use the normal {} instead of a macro to terminate an array. Remove the macro too. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* mac80211: allow drivers to support NL80211_SCAN_FLAG_RANDOM_ADDRJohannes Berg2014-11-191-2/+5
| | | | | | | | Allow drivers to support NL80211_SCAN_FLAG_RANDOM_ADDR with software based scanning and generate a random MAC address for them for every scan request with the flag. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* mac80211: add vif to flush callEmmanuel Grumbach2014-04-091-1/+2
| | | | | | | | | | | This will allow the low level driver to make decision based on the vif such as queues etc... Since the vif might be NULL, we can't add it to the tracing functions. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> [fix staging rtl8821ae driver] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* brcmsmac: update comment to reflect the codeEmil Goode2014-03-141-6/+0
| | | | | | | | | | The brcms_attach function is defined as static but the comment is saying that it should not be static or gcc will issue a warning. I believe we can remove the comment as I don't se a problem with this function being defined as static. Signed-off-by: Emil Goode <emilgoode@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* brcmsmac: fix deadlock on missing firmwareEmil Goode2014-03-141-8/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When brcm80211 firmware is not installed networking hangs. A deadlock happens because we call ieee80211_unregister_hw() from the .start callback of struct ieee80211_ops. When .start is called we are under rtnl lock and ieee80211_unregister_hw() tries to take it again. Function call stack: dev_change_flags() __dev_change_flags() __dev_open() ASSERT_RTNL() <-- Assert rtnl lock ops->ndo_open() .ndo_open = ieee80211_open, ieee80211_open() ieee80211_do_open() drv_start() local->ops->start() .start = brcms_ops_start, brcms_ops_start() brcms_remove() ieee80211_unregister_hw() rtnl_lock() <-- Here we deadlock Introduced by: commit 25b5632fb35ca61b8ae3eee235edcdc2883f7a5e ("brcmsmac: request firmware in .start() callback") This patch fixes the bug by removing the call to brcms_remove() and moves the brcms_request_fw() call to the top of the .start callback to not initiate anything unless firmware is installed. Signed-off-by: Emil Goode <emilgoode@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mac80211: remove channel_change_timeJohannes Berg2014-01-071-1/+0
| | | | | | | This value is no longer used by mac80211, and practically no driver ever set it to a correct value anyway, so remove it. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* cfg80211: consolidate passive-scan and no-ibss flagsLuis R. Rodriguez2013-11-251-33/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These two flags are used for the same purpose, just combine them into a no-ir flag to annotate no initiating radiation is allowed. Old userspace sending either flag will have it treated as the no-ir flag. To be considerate to older userspace we also send both the no-ir flag and the old no-ibss flags. Newer userspace will have to be aware of older kernels. Update all places in the tree using these flags with the following semantic patch: @@ @@ -NL80211_RRF_PASSIVE_SCAN +NL80211_RRF_NO_IR @@ @@ -NL80211_RRF_NO_IBSS +NL80211_RRF_NO_IR @@ @@ -IEEE80211_CHAN_PASSIVE_SCAN +IEEE80211_CHAN_NO_IR @@ @@ -IEEE80211_CHAN_NO_IBSS +IEEE80211_CHAN_NO_IR @@ @@ -NL80211_RRF_NO_IR | NL80211_RRF_NO_IR +NL80211_RRF_NO_IR @@ @@ -IEEE80211_CHAN_NO_IR | IEEE80211_CHAN_NO_IR +IEEE80211_CHAN_NO_IR @@ @@ -(NL80211_RRF_NO_IR) +NL80211_RRF_NO_IR @@ @@ -(IEEE80211_CHAN_NO_IR) +IEEE80211_CHAN_NO_IR Along with some hand-optimisations in documentation, to remove duplicates and to fix some indentation. Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com> [do all the driver updates in one go] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* brcmsmac: call bcma_core_pci_power_save() from non-atomic contextArend van Spriel2013-09-261-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds explicit call to bcma_core_pci_power_save() from a non-atomic context resolving 'scheduling while atomic' issue. [ 13.224317] BUG: scheduling while atomic: dhcpcd/1800/0x00000202 [ 13.224322] Modules linked in: brcmsmac nouveau coretemp kvm_intel kvm cordic brcmutil bcma dell_wmi atl1c ttm mxm_wmi wmi [ 13.224354] CPU: 0 PID: 1800 Comm: dhcpcd Tainted: G W 3.11.0-wl #1 [ 13.224359] Hardware name: Alienware M11x R2/M11x R2, BIOS A04 11/23/2010 [ 13.224363] ffff880177c12c40 ffff880170fd1968 ffffffff8169af5b 0000000000000007 [ 13.224374] ffff880170fd1ad0 ffff880170fd1978 ffffffff81697ee2 ffff880170fd19f8 [ 13.224383] ffffffff816a19f5 00000000000f4240 000000000000d080 ffff880170fd1fd8 [ 13.224391] Call Trace: [ 13.224399] [<ffffffff8169af5b>] dump_stack+0x4f/0x84 [ 13.224403] [<ffffffff81697ee2>] __schedule_bug+0x43/0x51 [ 13.224409] [<ffffffff816a19f5>] __schedule+0x6e5/0x810 [ 13.224412] [<ffffffff816a1c34>] schedule+0x24/0x70 [ 13.224416] [<ffffffff816a04fc>] schedule_hrtimeout_range_clock+0x10c/0x150 [ 13.224420] [<ffffffff810684e0>] ? update_rmtp+0x60/0x60 [ 13.224424] [<ffffffff8106915f>] ? hrtimer_start_range_ns+0xf/0x20 [ 13.224429] [<ffffffff816a054e>] schedule_hrtimeout_range+0xe/0x10 [ 13.224432] [<ffffffff8104f6fb>] usleep_range+0x3b/0x40 [ 13.224437] [<ffffffffa003733a>] bcma_pcie_mdio_read.isra.5+0x8a/0x100 [bcma] [ 13.224442] [<ffffffffa00374a5>] bcma_pcie_mdio_writeread.isra.6.constprop.13+0x25/0x30 [bcma] [ 13.224448] [<ffffffffa00374f9>] bcma_core_pci_power_save+0x49/0x80 [bcma] [ 13.224452] [<ffffffffa003765d>] bcma_core_pci_up+0x2d/0x60 [bcma] [ 13.224460] [<ffffffffa03dc17c>] brcms_c_up+0xfc/0x430 [brcmsmac] [ 13.224467] [<ffffffffa03d1a7d>] brcms_up+0x1d/0x20 [brcmsmac] [ 13.224473] [<ffffffffa03d2498>] brcms_ops_start+0x298/0x340 [brcmsmac] [ 13.224478] [<ffffffff81600a12>] ? cfg80211_netdev_notifier_call+0xd2/0x5f0 [ 13.224483] [<ffffffff815fa53d>] ? packet_notifier+0xad/0x1d0 [ 13.224487] [<ffffffff81656e75>] ieee80211_do_open+0x325/0xf80 [ 13.224491] [<ffffffff8106ac09>] ? __raw_notifier_call_chain+0x9/0x10 [ 13.224495] [<ffffffff81657b41>] ieee80211_open+0x71/0x80 [ 13.224498] [<ffffffff81526267>] __dev_open+0x87/0xe0 [ 13.224502] [<ffffffff8152650c>] __dev_change_flags+0x9c/0x180 [ 13.224505] [<ffffffff815266a3>] dev_change_flags+0x23/0x70 [ 13.224509] [<ffffffff8158cd68>] devinet_ioctl+0x5b8/0x6a0 [ 13.224512] [<ffffffff8158d5c5>] inet_ioctl+0x75/0x90 [ 13.224516] [<ffffffff8150b38b>] sock_do_ioctl+0x2b/0x70 [ 13.224519] [<ffffffff8150b681>] sock_ioctl+0x71/0x2a0 [ 13.224523] [<ffffffff8114ed47>] do_vfs_ioctl+0x87/0x520 [ 13.224528] [<ffffffff8113f159>] ? ____fput+0x9/0x10 [ 13.224533] [<ffffffff8106228c>] ? task_work_run+0x9c/0xd0 [ 13.224537] [<ffffffff8114f271>] SyS_ioctl+0x91/0xb0 [ 13.224541] [<ffffffff816aa252>] system_call_fastpath+0x16/0x1b Cc: <stable@vger.kernel.org> # 3.11.x Cc: Tod Jackson <tod.jackson@gmail.com> Cc: Joe Perches <joe@perches.com> Cc: Rafal Milecki <zajec5@gmail.com> Cc: Hauke Mehrtens <hauke@hauke-m.de> Reviewed-by: Hante Meuleman <meuleman@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* brcmsmac: Fix merge issuePiotr Haber2013-04-261-0/+1
| | | | | | | | | | | | Commit 7088f4835aa353f7226e57e73fd9e6564a4dfb75 "Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless" ramoved call to brcms_led_unregister in mac80211_if.c Reviewed-by: Hante Meuleman <meuleman@broadcom.com> Reviewed-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Piotr Haber <phaber@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* Merge branch 'master' of ↵John W. Linville2013-04-231-133/+132
|\ | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless Conflicts: drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c
| * brcmsmac: request firmware in .start() callbackArend van Spriel2013-04-081-132/+132
| | | | | | | | | | | | | | | | | | | | | | | | | | The firmware is requested from user-space. To assure the request is handled it is recommended to do the request upon IFF_UP. For a mac80211 driver the .start() callback can be considered the equivalent. Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Piotr Haber <phaber@broadcom.com> Reviewed-by: Hante Meuleman <meuleman@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | Merge branch 'for-john' of ↵John W. Linville2013-04-101-3/+3
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next Conflicts: drivers/net/wireless/ath/carl9170/debug.c drivers/net/wireless/ath/carl9170/main.c net/mac80211/ieee80211_i.h
| * | mac80211: Use a cfg80211_chan_def in ieee80211_hw_conf_chanKarl Beldan2013-03-251-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Drivers that don't use chanctxes cannot perform VHT association because they still use a "backward compatibility" pair of {ieee80211_channel, nl80211_channel_type} in ieee80211_conf and ieee80211_local. Signed-off-by: Karl Beldan <karl.beldan@rivierawaves.com> [fix kernel-doc] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | | brcmsmac: add support for adhoc modeHauke Mehrtens2013-03-271-4/+8
| | | | | | | | | | | | | | | | | | | | | This adds adhoc mode support to brcmsmac. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | | brcmsmac: activate AP supportHauke Mehrtens2013-03-271-4/+9
| | | | | | | | | | | | | | | | | | | | | This activates the AP mode support. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | | brcmsmac: deactivate ucode sending probe responsesHauke Mehrtens2013-03-271-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is possible to configure the ucode to automatically send the probe responses to the clients after they send a probe request. At least for WPS the userspace needs to answer the probe requests and we do not know a way to say to the ucode to just handle the normal probe requests, so for now no probe requests should be handled by the ucode. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | | brcmsmac: add support for probe response templateHauke Mehrtens2013-03-271-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ucode is able to answer probe response by itself. This writes such a template into the specific memory. Currently the probe requests are also send to mac80211 so there are more answers send to a requesting client. We have to make the ucode stop sending probe requests to the driver. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | | brcmsmac: react on changing SSIDHauke Mehrtens2013-03-271-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | To send the correct probe response the hardware needs to know the SSID when it changed. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | | brcmsmac: add beacon template supportHauke Mehrtens2013-03-271-2/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes it possible that a beacon template provided by mac80211 is written to the hardware for constant beaconing. This is based on an old version of brcmsmac, on b43 and the spec b43 is based on. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | | brcmsmac: add interface type to brcms_bss_cfgHauke Mehrtens2013-03-271-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | This makes it possible to easily check in which mode the device is currently running. This also adds a function to start station mode. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | | brcmsmac: implement ieee80211_ops get_tsf and set_tsfHauke Mehrtens2013-03-271-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | setting the tsf is needed to start a timer to make beaconing in AP mode work. This is based on older versions of brcmsmac and b43. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | | Merge branch 'for-john' of ↵John W. Linville2013-03-251-1/+1
|\ \ \ | |/ / | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next
| * | mac80211: pass queue bitmap to flush operationJohannes Berg2013-03-181-1/+1
| |/ | | | | | | | | | | | | | | | | | | There are a number of situations in which mac80211 only really needs to flush queues for one virtual interface, and in fact during this frames might be transmitted on other virtual interfaces. Calculate and pass a queue bitmap to the driver so it knows which queues to flush. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | brcmsmac: radio on led supportPiotr Haber2013-03-061-0/+4
|/ | | | | | | | | | | | | Add support for radio on led indicator. Control led via BCMA gpio driver. Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Hante Meuleman <meuleman@broadcom.com> Reviewed-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Piotr Haber <phaber@broadcom.com> [arend@broadcom.com: modify Makefile for conditional compile led.c] Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller2013-02-081-14/+21
|\ | | | | | | | | | | | | Synchronize with 'net' in order to sort out some l2tp, wireless, and ipv6 GRE fixes that will be built on top of in 'net-next'. Signed-off-by: David S. Miller <davem@davemloft.net>
| * brcmsmac: rework of mac80211 .flush() callback operationArend van Spriel2013-02-041-14/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch addresses a long standing issue of the driver with the mac80211 .flush() callback. Since implementing the .flush() callback a number of issues have been fixed, but a WARN_ON_ONCE() was still triggered because the timeout on the flush could still occur. This patch changes the awkward design using msleep() into one using a waitqueue. The waiting flush() context will kick the transmit dma when it is idle and the timeout used waiting for the event is set to 500 ms. Worst case there can be 64 frames outstanding for transmit in the driver. At a rate of 1Mbps that would take 1.5 seconds assuming MTU is 1500 bytes and ignoring retries. The WARN_ON_ONCE() is also removed as this was put in to indicate the flush timeout as a reason for the driver to stall. That was not happening since fixing endless AMPDU retries with following upstream commit: commit 85091fc0a75653e239dc8379658515e577544927 Author: Arend van Spriel <arend@broadcom.com> Date: Thu Feb 23 18:38:22 2012 +0100 brcm80211: smac: fix endless retry of A-MPDU transmissions bugzilla: 42840 <https://bugzilla.kernel.org/show_bug.cgi?id=42840> bugzilla@redhat: <https://bugzilla.redhat.com/show_bug.cgi?id=799168> bugzilla@redhat: <https://bugzilla.redhat.com/show_bug.cgi?id=787649> Cc: Jonathan Nieder <jrnieder@gmail.com> Cc: Stanislaw Gruszka <sgruszka@redhat.com> Cc: Camaleón <noelamac@gmail.com> Cc: Milan Bouchet-Valat <nalimilan@club-internet.fr> Cc: Seth Forshee <seth.forshee@canonical.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Hante Meuleman <meuleman@broadcom.com> Reviewed-by: Piotr Haber <phaber@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Acked-by: Seth Forshee <seth.forshee@canonical.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * brcmsmac: increase timer reference count for new timers onlyPiotr Haber2013-01-111-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | On hardware reintialization reference count of already existing timers would be increased again. This leads to problems on module unloading. Cc: stable@vger.kernel.org Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Hante Meuleman <meuleman@broadcom.com> Reviewed-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Piotr Haber <phaber@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | Merge branch 'for-john' of ↵John W. Linville2013-01-301-3/+2
|\ \ | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next
| * | mac80211: remove ARP filter enable/disable logicJohannes Berg2013-01-181-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Depending on the driver, having ARP filtering for some addresses may be possible. Remove the logic that tracks whether ARP filter is enabled or not and give the driver the total number of addresses instead of the length of the list so it can make its own decision. Reviewed-by: Luciano Coelho <coelho@ti.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | | brcmsmac: allow user-space setting of interface addressArend van Spriel2013-01-071-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The interface address of the wireless device is determined by the permanent address stored in the device. This patch allows it to be overridden from user-space. Reported-by: Maximilian Engelhardt <maxi@daemonizer.de> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Piotr Haber <phaber@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | | brcmsmac: use perimeter lock in add_interface() callbackArend van Spriel2013-01-071-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All callbacks that access driver functions should do that under perimeter lock protection. The add_interface() callback was lacking this lock. Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Piotr Haber <phaber@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | | brcmsmac: increase timer reference count for new timers onlyPiotr Haber2013-01-071-3/+4
|/ / | | | | | | | | | | | | | | | | | | | | | | | | On hardware reintialization reference count of already existing timers would be increased again. This leads to problems on module unloading. Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Hante Meuleman <meuleman@broadcom.com> Reviewed-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Piotr Haber <phaber@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | mac80211: split TX aggregation stop actionJohannes Berg2013-01-031-1/+3
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | When TX aggregation is stopped, there are a few different cases: - connection with the peer was dropped - session stop was requested locally - session stop was requested by the peer - connection was dropped while a session is stopping The behaviour in these cases should be different, if the connection is dropped then the driver should drop all frames, otherwise the frames may continue to be transmitted, aggregated in the case of a locally requested session stop or unaggregated in the case of the peer requesting session stop. Split these different cases so that the driver can act accordingly; however, treat local and remote stop the same way and ask the driver to not send frames as aggregated packets any more. In the case of connection drop, the stop callback the driver is otherwise supposed to call is no longer required. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* brcmsmac: add support for cores with revision 17Hauke Mehrtens2012-12-101-0/+1
| | | | | | | | | | | | This adds support for bcma wifi core revision 17 which is found on BCM4716/4717/4718 SoCs. The firmware version 610.812 for brcmsmac found in linux-firmware does not support these cores, but a firmware generated with b43-fwcutter from the proprietary broadcom wireless driver works with these chips. This wifi core contains a revision 5 N-PHY and a revision 7 radio of type 0x2056. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* brcm80211: remove __dev* attributesBill Pemberton2012-12-061-2/+2
| | | | | | | | | | | | | | | | | | CONFIG_HOTPLUG is going away as an option. As result the __dev* markings will be going away. Remove use of __devinit, __devexit_p, __devinitdata, __devinitconst, and __devexit. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Cc: Brett Rudley <brudley@broadcom.com> Cc: Roland Vossen <rvossen@broadcom.com> Cc: Arend van Spriel <arend@broadcom.com> Cc: Franky (Zhenhui) Lin <frankyl@broadcom.com> Cc: Kan Yan <kanyan@broadcom.com> Cc: brcm80211-dev-list@broadcom.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* brcmsmac: hardware info in debugfsPiotr Haber2012-11-301-1/+7
| | | | | | | | | | | | Put basic information about hardware in debugfs. Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Hante Meuleman <meuleman@broadcom.com> Reviewed-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Piotr Haber <phaber@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Acked-by: Seth Forshee <seth.forshee@canonical.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* brcmsmac: cleanup in isr codePiotr Haber2012-11-301-11/+6
| | | | | | | | | | | | | brcms_c_isr returns true if interrupt was for us and if dpc should be scheduled which is the same thing. Simplify it. Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Hante Meuleman <meuleman@broadcom.com> Reviewed-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Piotr Haber <phaber@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* brcmsmac: handle packet drop during transmit correctlyPiotr Haber2012-11-301-2/+2
| | | | | | | | | | | | The .tx() callback function can drop packets when there is no space in the DMA fifo. Propagate that information to caller and make sure the freed sk_buff reference is not accessed. Reviewed-by: Arend van Spriel <arend@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Signed-off-by: Piotr Haber <phaber@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* brcmsmac: Remove stray argument from debug macroSeth Forshee2012-11-211-1/+1
| | | | | | | | One of the debug macro invocations ended up with a stray 0 argument where the format string should be. Remove it. Signed-off-by: Seth Forshee <seth.forshee@canonical.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* brcmsmac: Use debug macros for general error and debug statementsSeth Forshee2012-11-201-51/+56
| | | | | | | | | | | | | Convert most uses of wiphy_* and pr_* for general error and debug messages to use the internal debug macros instead. Most code used only for initialization still use wiphy_err(), as well as some locations which are executed too early to use the debug macros. Some debug messages which are redundant or not useful are removed. Acked-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Seth Forshee <seth.forshee@canonical.com> Tested-by: Daniel Wagner <wagi@monom.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* brcmsmac: Add module parameter for setting the debug levelSeth Forshee2012-11-201-8/+8
| | | | | | | | | | | The debug level can be set by passing debug=... to brcmsmac whenever CONFIG_BRCMDBG is enabled. Signed-off-by: Seth Forshee <seth.forshee@canonical.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Arend van Spriel <arend@broadcom.com> Tested-by: Daniel Wagner <wagi@monom.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* brcmsmac: don't start device when RfKill is engagedPiotr Haber2012-09-241-1/+4
| | | | | | | | | | | | | This patch fixes a bug when device is being started while RfKill switch is engaged, leading to hang due to partial initialization of hardware. Tested-by: <dragonn@op.pl> Reviewed-by: Arend van Spriel <arend@broadcom.com> Reviewed-by: Hante Meuleman <meuleman@broadcom.com> Signed-off-by: Piotr Haber <phaber@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* Merge branch 'master' of ↵John W. Linville2012-09-071-1/+5
|\ | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless
| * brcm80211: smac: set interface down on resetVladimir Zapolskiy2012-08-221-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change marks interface as down on reset, otherwise the driver can't reinitialize itself properly. Without the change a transient problem turns out to be critical and leads to inavailability to reset the driver without brcmsmac module unload/load cycle: ieee80211 phy0: wl0: PSM microcode watchdog fired at 5993 (seconds). Resetting. brcms_c_dpc : PSM Watchdog, chipid 0xa8d9, chiprev 0x1 ieee80211 phy0: wl0: fatal error, reinitializing ieee80211 phy0: Hardware restart was requested ieee80211 phy0: brcms_ops_start: brcms_up() returned -19 Signed-off-by: Vladimir Zapolskiy <vz@mleia.com> Cc: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * brcmsmac: use channel flags to restrict OFDMSeth Forshee2012-08-021-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | brcmsmac cannot call freq_reg_info() during channel changes as it does not hold cfg80211_lock, and as a result it generates a lockdep warning. freq_reg_info() is being used to determine whether OFDM is allowed on the current channel, so we can avoid the errant call by using the new IEEE80211_CHAN_NO_OFDM for this purpose instead. Reported-by: Josh Boyer <jwboyer@redhat.com> Signed-off-by: Seth Forshee <seth.forshee@canonical.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
OpenPOWER on IntegriCloud