summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath6kl
AgeCommit message (Collapse)AuthorFilesLines
2013-12-16Merge remote-tracking branch 'wireless-next/master' into mac80211-nextJohannes Berg2-7/+5
2013-12-05cfg80211: in bitrate_mask, rename mcs to ht_mcsJanusz Dziedzic1-3/+3
Rename NL80211_TXRATE_MCS to NL80211_TXRATE_HT and also rename mcs to ht_mcs in struct cfg80211_bitrate_mask. Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com> [reword commit message] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-12-02Merge branch 'for-john' of ↵John W. Linville1-3/+8
git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next
2013-12-02cfg80211/mac80211/ath6kl: acquire wdev lock outside ch_switch_notifySimon Wunderlich1-0/+2
The channel switch notification should be sent under the wdev/sdata-lock, preferably in the same moment as the channel change happens, to avoid races by other callers (e.g. start/stop_ap). This also adds the previously missing sdata_lock protection in csa_finalize_work. Reported-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-12-02cfg80211: aggregate mgmt_tx parameters into a structAndrei Otcheretianski1-3/+6
Change cfg80211 and mac80211 to use cfg80211_mgmt_tx_params struct to aggregate parameters for mgmt_tx functions. This makes the functions' signatures less clumsy and allows less painful parameters extension. Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com> [fix all other drivers] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-11-04Merge branch 'master' of ↵John W. Linville1-1/+1
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into for-davem Conflicts: drivers/net/wireless/brcm80211/brcmfmac/sdio_host.h
2013-10-18Merge branch 'for-linville' of git://github.com/kvalo/athJohn W. Linville1-1/+1
2013-10-01ath6kl: fix compilation warning in ath6kl_htc_pipe_conn_serviceVladimir Murzin1-1/+1
Fix the warning drivers/net/wireless/ath/ath6kl/htc_pipe.c: In function 'ath6kl_htc_pipe_conn_service': drivers/net/wireless/ath/ath6kl/htc_pipe.c:1293:26: warning: integer overflow in expression [-Woverflow] by giving a hint to compiler about unsigned nature of HTC_CONN_FLGS_SET_RECV_ALLOC_MASK Signed-off-by: Vladimir Murzin <murzin.v@gmail.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2013-09-24ath: Remove extern from function prototypesJoe Perches2-7/+5
There are a mix of function prototypes with and without extern in the kernel sources. Standardize on not using extern for function prototypes. Function prototypes don't need to be written with extern. extern is assumed by the compiler. Its use is as unnecessary as using auto to declare automatic/local variables in a block. Signed-off-by: Joe Perches <joe@perches.com>
2013-08-28Merge branch 'for-john' of ↵John W. Linville1-4/+3
git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next
2013-08-23cfg80211: add flags to cfg80211_rx_mgmt()Vladimir Kondratiev1-4/+3
Add flags intended to report various auxiliary information and introduce the NL80211_RXMGMT_FLAG_ANSWERED flag to report that the frame was already answered by the device. Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> [REPLIED->ANSWERED, reword commit message] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-08-16Merge branch 'for-john' of ↵John W. Linville2-3/+7
git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next
2013-08-12cfg80211: add wdev to testmode cmdDavid Spinadel2-3/+7
To allow drivers to implement per-interface testmode operations more easily, pass a wdev pointer if any identification for one was given from userspace. Clean up the code a bit while at it. Signed-off-by: David Spinadel <david.spinadel@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-08-07ath6kl: Fix invalid pointer access on fuzz testing with AP modeMohammed Shafi Shajakhan1-0/+3
In our Fuz testing, reference client corrupts the dest mac to "00:00:00:00:00:00" in the WPA2 handshake no 2. During driver init the sta_list entries mac addresses are by default "00:00:00:00:00:00". Driver returns an invalid pointer (conn) and the drver shall crash, if rxtids (aggr_conn) skb queues are accessed, since they would not be initialized. Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2013-08-07ath6kl: Fix race in heart beat pollingVasanthakumar Thiagarajan1-0/+3
Make sure to cancel heart beat timer before freeing wmi to avoid potential NULL pointer dereference. Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com> Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2013-06-13Merge branch 'for-linville' of git://github.com/kvalo/ath6klJohn W. Linville4-29/+41
2013-06-11ath6kl: make mgmt_tx accept a NULL channelAntonio Quartulli1-10/+17
cfg80211 passes a NULL channel to mgmt_tx if the frame has to be sent on the one currently in use by the device. Make the implementation of mgmt_tx correctly handle this case Cc: Nicolas Cavallari <Nicolas.Cavallari@lri.fr> Acked-by: Kalle Valo <kvalo@qca.qualcomm.com> Signed-off-by: Antonio Quartulli <antonio@open-mesh.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-06-03cfg80211: take WoWLAN support information out of wiphy structJohannes Berg1-9/+15
There's no need to take up the space for devices that don't support WoWLAN, and most drivers can even make the support data static const (except where it's modified at runtime.) Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-06-01ath6kl: Unify sg_sz and buf_sz in ath6kl_sdio_alloc_prep_scat_req()Geert Uytterhoeven1-6/+6
sg_sz and buf_sz are initialized and used in a mutual exclusive way. However, some versions of gcc are not smart enough to see this: drivers/net/wireless/ath/ath6kl/sdio.c: In function ‘ath6kl_sdio_alloc_prep_scat_req’: drivers/net/wireless/ath/ath6kl/sdio.c:338: warning: ‘sg_sz’ may be used uninitialized in this function Unify the sg_sz and buf_sz variables into a single size variable to kill the compiler warning. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2013-06-01ath6kl: Fix a suspend/resume crash in AR6004 USBMohammed Shafi Shajakhan1-0/+18
cfg80211 suspend/resume callbacks are not yet implemented for AR6004 USB. Introduce dummy handlers for these to avoid NULL pointer dereference. Cc: Sivanesan Rajapupathi <c_srajap@qualcomm.com> Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2013-06-01ath6kl: Rename USB driver's suspend/resume/reset_resumeMohammed Shafi Shajakhan1-9/+9
Rename USB driver's suspend/resume/reset_resume callbacks with 'pm' prefix. This is necessary to differentiate it from cfg80211/hif suspend/resume/reset_resume callbacks. Cc: Sivanesan Rajapupathi <c_srajap@qualcomm.com> Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2013-06-01wireless: ath6kl: re-use native helper to parse MACAndy Shevchenko1-7/+1
There is native mac_pton() function which helps to parse MAC. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2013-06-01ath6kl: Check wmi ready event status before validating abi versionRaja Mani1-7/+7
There is no point to check firmware ABI version when the driver fails to wait for WMI_READY event during the boot time. For such failures, the driver should assume the firmware is not booted and start doing cleanup. Signed-off-by: Raja Mani <rmani@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2013-03-20ath6kl: fix size_t printf warningsKalle Valo1-7/+7
My new tracing code for ath6kl introduced these warnings on 64-bit: trace.h:38:1: warning: format '%d' expects argument of type 'int', but argument 4 has type 'size_t' [-Wformat] trace.h:61:1: warning: format '%d' expects argument of type 'int', but argument 4 has type 'size_t' [-Wformat] trace.h:84:1: warning: format '%d' expects argument of type 'int', but argument 6 has type 'size_t' [-Wformat] trace.h:119:1: warning: format '%d' expects argument of type 'int', but argument 7 has type 'size_t' [-Wformat] trace.h:173:1: warning: format '%d' expects argument of type 'int', but argument 3 has type 'size_t' [-Wformat] trace.h:193:1: warning: format '%d' expects argument of type 'int', but argument 5 has type 'size_t' [-Wformat] trace.h:221:1: warning: format '%d' expects argument of type 'int', but argument 5 has type 'size_t' [-Wformat] Fix them by using %zd. Reported-by: John W. Linville <linville@tuxdriver.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-03-18Merge tag 'for-linville-20130318' of git://github.com/kvalo/ath6klJohn W. Linville18-94/+628
2013-03-18ath6kl: Fix a debugfs crash for USB devicesMohammed Shafi Shajakhan1-2/+4
Credit distribution stats is currently implemented only for SDIO. This fixes a crash in debugfs for USB interface. BUG: unable to handle kernel NULL pointer dereference at (null) IP: [<f91c2048>] read_file_credit_dist_stats+0x38/0x330 [ath6kl_core] *pde = b62bd067 Oops: 0000 [#1] SMP EIP: 0060:[<f91c2048>] EFLAGS: 00210246 CPU: 0 EIP is at read_file_credit_dist_stats+0x38/0x330 [ath6kl_core] EAX: 00000000 EBX: e6f7a9c0 ECX: e7b148b8 EDX: 00000000 ESI: 000000c8 EDI: e7b14000 EBP: e6e09f64 ESP: e6e09f30 DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068 Process cat (pid: 4058, ti=e6e08000 task=e50cf230 task.ti=e6e08000) Stack: 00008000 00000000 e6e09f64 c1132d3c 00004e71 e50cf230 00008000 089e4000 e7b148b8 00000000 e6f7a9c0 00008000 089e4000 e6e09f8c c11331fc e6e09f98 00000001 e6e09f7c f91c2010 e6e09fac e6f7a9c0 089e4877 089e4000 e6e09fac Call Trace: [<c1132d3c>] ? rw_verify_area+0x6c/0x120 [<c11331fc>] vfs_read+0x8c/0x160 [<f91c2010>] ? read_file_war_stats+0x130/0x130 [ath6kl_core] [<c113330d>] sys_read+0x3d/0x70 [<c15755b4>] syscall_call+0x7/0xb [<c1570000>] ? fill_powernow_table_pstate+0x127/0x127 Cc: Ryan Hsu <ryanhsu@qca.qualcomm.com> Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2013-03-18ath: changed kmalloc to kmemdupAndrei Epure1-3/+1
Signed-off-by: Andrei Epure <epure.andrei@gmail.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2013-03-18ath6kl: Fix the byte alignment rule to avoid loss of bytes in a TCP segmentMyoungje Kim2-5/+7
Either first 3 bytes of the first received tcp segment or last one over MTU size file can be loss due to the byte alignment problem. Although ATH6KL_HTC_ALIGN_BYTES was defined for 'extra bytes for htc header alignment' in the patch "Fix buffer alignment for scatter-gather I/O"(1df94a857), there exists the bytes loss issue which means that it will be truncated 3 bytes in the transmitted file contents if a file which has over MTU size is transferred through TCP/IP stack. It doesn't look like TCP/IP stack bug of 3.5 or the latest version of kernel but the byte alignment issue. This patch is to use the roundup() function for the byte alignment rather than the predefined ATH6KL_HTC_ALIGN_BYTES. kvalo: fixed indentation Signed-off-by: Myoungje Kim <mjei78@gmail.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2013-03-18ath6kl: remove false check from ath6kl_rx()Kalle Valo1-1/+1
Dan found a check from ath6kl_rx() which doesn't make any sense at all: " 1327 if (status || !(skb->data + HTC_HDR_LENGTH)) { ^^^^^^^^^^^^^^^^^^^^^^^^^^ skb->data is a pointer. This pointer math is always going to be false. Should it be testing "packet->act_len < HTC_HDR_LENGTH" or something?" I don't know what the check really was supposed to do, but I think Dan's guess is right. Fix it accordingly. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2013-03-18ath6kl: add an extra band check to ath6kl_wmi_beginscan_cmd()Kalle Valo1-0/+3
Dan reported that smatch found a possible issue in ath6kl_wmi_beginscan_cmd() where we might access sc->supp_rates beyond the end. It shouldn't happen as ar->wiphy->bands always have just the first two bands set, but add an extra check just to be sure. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2013-03-18ath6kl: add tracing support to debug message macrosKalle Valo2-4/+50
Now all log messages are sent through the tracing infrastruture as well. Tracing point doesn't follow debug_mask module parameter, instead it sends all debug messages, so once you enable ath6kl_log_dbg tracing point you will get a lot of messages. Needs to be discussed if this is sensible or not. The overhead should be small enough and we anyway include debug level as well so it's easy to filter in user space. I wasn't really sure what to do with ath6kl_dbg_dump() and for now decided that it also sends the buffer to user space. But most likely in the future ath6kl_dbg_dump() should go away in favor of using proper tracing points, but we will see. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2013-03-18ath6kl: add tracing support to log functionsKalle Valo3-0/+41
All log messages are now sent through tracing interface as well if ATH6KL_TRACING is enabled. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2013-03-18ath6kl: convert ath6kl_info/err/warn macros to real functionsKalle Valo2-7/+54
After this it's cleaner to add trace calls. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2013-03-18ath6kl: adding tracing points for htc_mboxKalle Valo2-1/+76
Add tracing points for htc layer, just dumping the packets to user space. I wasn't really sure what to do with the status value, it might not always be accurate, but I included it anyway. I skipped htc_pipe (and usb) implementation for now. Need to add those tracepoints later. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2013-03-18ath6kl: add tracing point for hif irqsKalle Valo2-0/+23
Add a tracing point for hif irq and dump the register content to user space. This is in hif.c as we could use the same code also with SPI but, as ath6kl doesn't SPI and most likely never will be, this is used just by SDIO so name the trace point as ath6kl_sdio_irq to make it easier to manage filters. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2013-03-18ath6kl: add tracing points for sdio transfersKalle Valo3-0/+105
Add tracing points for sdio transfers, just dump the address, flags and the buffer. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2013-03-18ath6kl: add tracing support and tracing points for wmi packetsKalle Valo6-0/+125
Add basic tracing infrastructure support to ath6kl and which can be enabled with CONFIG_ATH6KL_TRACING. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2013-03-18ath6kl: cold reset target after host warm bootKalle Valo2-2/+13
Julien reported that ar6004 usb device fails to initialise after host has been rebooted and power is still on for the ar6004 device. He found out that doing a cold reset fixes the issue. I wasn't sure what would be the best way to detect if target needs a reset so I settled on checking a timeout from htc_wait_recv_ctrl_message(). Reported-by: Julien Massot <jmassot@aldebaran-robotics.com> Tested-by: Julien Massot <jmassot@aldebaran-robotics.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2013-03-18ath6kl: fix usb related error handling and warningsKalle Valo3-21/+33
It was annoying to debug usb warm reboot initialisation problems as many usb related functions just ignored errors and it wasn't obvious from the kernel logs what was failing. Fix all that so that error messages are printed and errors are handled properly. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2013-03-18ath6kl: cleanup ath6kl_reset_device()Kalle Valo4-39/+10
Move it to init.c, make it static, remove all useless checks and force it to always do cold reset. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2013-03-18ath6kl: print firmware capabilitiesKalle Valo1-0/+73
Printin the firmware capabilities during the first firmware boot makes it easier to find out what features firmware supports. Obligatory screenshot: [21025.678481] ath6kl: ar6003 hw 2.1.1 sdio fw 3.2.0.144 api 3 [21025.678667] ath6kl: firmware supports: sched-scan,sta-p2pdev-duplex,rsn-cap-override Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2013-03-09ath6kl: small cleanup in ath6kl_htc_pipe_rx_complete()Dan Carpenter1-2/+1
It's harmless, but Smatch complains if we use "htc_hdr->eid" before doing the bounds check. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2013-03-08Merge branch 'for-john' of ↵John W. Linville1-3/+5
git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next
2013-03-06ath6kl: small cleanup in ath6kl_htc_pipe_rx_complete()Dan Carpenter1-2/+1
It's harmless, but Smatch complains if we use "htc_hdr->eid" before doing the bounds check. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-03-06cfg80211: comprehensively check station changesJohannes Berg1-3/+5
The station change API isn't being checked properly before drivers are called, and as a result it is difficult to see what should be allowed and what not. In order to comprehensively check the API parameters parse everything first, and then have the driver call a function (cfg80211_check_station_change()) with the additionally information about the kind of station that is being changed; this allows the function to make better decisions than the old code could. While at it, also add a few checks, particularly in mesh and clarify the TDLS station lifetime in documentation. To be able to reduce a few checks, ignore any flag set bits when the mask isn't set, they shouldn't be applied then. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-03-05ath6kl: Remove NETDEV_REGISTERED flagMohammed Shafi Shajakhan2-2/+0
Currently its no where used. Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2013-03-05ath6kl: Return error from ath6kl_bmi_done()Mohammed Shafi Shajakhan2-6/+6
This addresses a FIXME in the driver. Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2013-03-05ath6kl: Protect ath6kl_cfg80211_vif_cleanup using rtnl_locksMohammed Shafi Shajakhan1-0/+2
ath6kl_cfg80211_vif_cleanup calls 'unregister_netdevice' which inturn calls 'unregister_netdevice_queue' and it requires holding rtnl_lock semaphore protection. Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2013-03-05ath6kl: Cosmetic change in checking for free vif slotMohammed Shafi Shajakhan1-2/+2
A minor optimization is done in finding the free slot available for the new virtual interface in the firmware. Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2013-02-21Merge tag 'driver-core-3.9-rc1' of ↵Linus Torvalds1-1/+0
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core Pull driver core patches from Greg Kroah-Hartman: "Here is the big driver core merge for 3.9-rc1 There are two major series here, both of which touch lots of drivers all over the kernel, and will cause you some merge conflicts: - add a new function called devm_ioremap_resource() to properly be able to check return values. - remove CONFIG_EXPERIMENTAL Other than those patches, there's not much here, some minor fixes and updates" Fix up trivial conflicts * tag 'driver-core-3.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (221 commits) base: memory: fix soft/hard_offline_page permissions drivercore: Fix ordering between deferred_probe and exiting initcalls backlight: fix class_find_device() arguments TTY: mark tty_get_device call with the proper const values driver-core: constify data for class_find_device() firmware: Ignore abort check when no user-helper is used firmware: Reduce ifdef CONFIG_FW_LOADER_USER_HELPER firmware: Make user-mode helper optional firmware: Refactoring for splitting user-mode helper code Driver core: treat unregistered bus_types as having no devices watchdog: Convert to devm_ioremap_resource() thermal: Convert to devm_ioremap_resource() spi: Convert to devm_ioremap_resource() power: Convert to devm_ioremap_resource() mtd: Convert to devm_ioremap_resource() mmc: Convert to devm_ioremap_resource() mfd: Convert to devm_ioremap_resource() media: Convert to devm_ioremap_resource() iommu: Convert to devm_ioremap_resource() drm: Convert to devm_ioremap_resource() ...