summaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)AuthorFilesLines
2012-02-22iwlegacy: merge il_lib_ops into il_opsStanislaw Gruszka8-81/+71
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-22iwlegacy: remove il_apm_opsStanislaw Gruszka7-27/+13
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-22iwlegacy: merge eeprom_ops into lib_opsStanislaw Gruszka4-16/+8
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-22iwlegacy: remove temp_opsStanislaw Gruszka4-25/+15
Remove unneeded structure and cleanup temperature calibration routines a bit. Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-22iwlegacy: move debugfs_ops to il_privStanislaw Gruszka10-38/+30
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-22iwlegacy: gather all 4965 handlers in one placeStanislaw Gruszka4-325/+305
Handers belongs logically into 4965-mac.c file. Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-22iwlegacy: regulatory_bands is not an opsStanislaw Gruszka4-29/+42
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-22iwlegacy: use writeb,writel,readl directlyStanislaw Gruszka3-9/+9
That change will save us some CPU cycles at run time. Having port-based I/O seems to be not possible for PCIe devices. Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-22iwlegacy: cleanup/fix memory barriersStanislaw Gruszka2-4/+7
wmb(), rmb() are not needed when writel(), readl() are used as accessors for MMIO. We use them indirectly via iowrite32(), ioread32(). What is needed mmiowb(), for synchronizing writes coming from different CPUs on PCIe bridge (see in patch comments). This fortunately is not needed on x86, where mmiowb() is just defined as compiler barrier. As iwlegacy devices are most likely not used on anything other than x86, this is not so important fix. Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-22iwlegacy: always check if got h/w access before writeStanislaw Gruszka3-18/+21
Before we write to the device register always check if _il_grap_nic_access() was successful. Change type return type _il_grap_nic_access() to bool, and add likely()/unlikely() statements. Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-22iwlegacy: dump stack when fail to gain access to the deviceStanislaw Gruszka1-2/+3
Print dump stack when the device is not responding. This should give some more clue about the reason of failure. Also change the message we print, since "MAC in deep sleep" is kinda confusing. On the way add unlikely(), as fail to gain NIC access is hmm ... unlikely. Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-22rtlwifi: rtl8192se firmware load can overflow target bufferTim Gardner2-2/+4
Define RTL8190_MAX_RAW_FIRMWARE_CODE_SIZE which represents the maximimum possible firmware file size. Use it in the definition of the buffer which receives the firmware file data. Set RTL8190_MAX_RAW_FIRMWARE_CODE_SIZE closer to the actual size of the firmware file, e.g., 90000 (down from hard coded 164000). The current size of rtlwifi/rtl8192sefw.bin is 88856. Set max_fw_size to RTL8190_MAX_RAW_FIRMWARE_CODE_SIZE for the size limit check. Fix the error case where max_fw_size is not cleared if the size limit check fails. Cc: Chaoming Li <chaoming_li@realsil.com.cn> Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Tim Gardner <tim.gardner@canonical.com> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-22brcm80211: fmac: make sdio firmware filename specificArend van Spriel1-6/+6
The sdio driver part uses firmware name brcmfmac.bin. With addition of usb this name is too generic. This patch renames the filename to brcmfmac-sdio.bin. Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Alwin Beukers <alwin@broadcom.com> Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-22brcm80211: fmac: add USB support for bcm43235/6/8 chipsetsArend van Spriel7-7/+1812
This patch extends the use of the brcmfmac driver with support for chipsets with a USB host interface. The first chipsets supported are the bcm43235, bcm43236, and bcm43238 for which firmware has been submitted. This driver change has been successfully built for x86, x86_64, ppc64, arm_le, and mips_be. It has been tested successfully on x86 and x86_64. Cc: M. Lambert <lambertm@westman.wave.ca> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com> Reviewed-by: Kan Yan <kanyan@broadcom.com> Reviewed-by: Alwin Beukers <alwin@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-22brcm80211: fmac: use spinlock calls saving irq flags in brcmf_enq_event()Arend van Spriel1-2/+3
This function is executed within irq context. The call spin_unlock_irq does enable interrupts which is not desired in the irq context. This patch replaces them using the spin_loc_irqsave and spin_unlock_irqrestore functions. Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Kan Yan <kanyan@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-22brcm80211: fmac: change allocation flag in brcmf_enq_event() functionArend van Spriel1-2/+4
As the function is called from atomic context it should not do the kzalloc call with GFP_KERNEL. Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Kan Yan <kanyan@broadcom.com> Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-22brcm80211: fmac: update bus state in common driver partArend van Spriel2-14/+8
The bus state is updated in the sdio bus init function, but it is better to do it when the brcmf_bus_start() function is completed successfully. The brcmf_netdev_open() function will return -EAGAIN until the state is updated instead of calling brcmf_bus_start() to avoid reentering that function. Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-22brcm80211: fmac: only return success in brcmf_sdbrcm_bus_init() when trueArend van Spriel1-4/+3
The function brcmf_sdbrcm_bus_init() always returned success except for firmware download failure. However, also when enabling SDIO function 2 is failing the function should return failure. This patch fixes that. Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-22brcm80211: fmac: move module entry points to dhd_linux.cArend van Spriel3-5/+32
The module_init/exit functions are moved to dhd_linux.c to prepare for supporting multiple host interface types. Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-22brcm80211: fmac: use specific types in struct brcmf_busArend van Spriel3-9/+12
The fields bus_priv and drvr are defined as void pointer. It is preferred to have specific types for compiler type checking. To prepare for other bus types the bus_priv field is defined as a union containing the sdio bus private structure reference. Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-22brcm80211: fmac: make sure cancel_work_sync only called after INIT_WORKFranky Lin1-4/+4
INIT_WORK only gets called after brcmf_proto_attach returns success. This dependency should be annotated in brcmf_detach to avoid any error. Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Signed-off-by: Franky Lin <frankyl@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-22brcm80211: fmac: resolve smatch issues in brcmfmac codeArend van Spriel2-2/+3
This patch resolves the following smatch issues: wl_cfg80211.c +1377 brcmf_cfg80211_connect(65) warn: min_t truncates here '(sme->ssid_len)' (4294967295 vs 9223372036854775807) dhd_sdio.c +1275 brcmf_sdbrcm_rxglom(156) warn: min_t truncates here '(pfirst->len)' (2147483647 vs 4294967295) dhd_sdio.c +1457 brcmf_sdbrcm_rxglom(338) warn: min_t truncates here '(pfirst->len)' (2147483647 vs 4294967295) bcmsdh_sdmmc.c +300 brcmf_sdioh_request_buffer(10) warn: variable dereferenced before check 'pkt' (see line 295) Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-22brcm80211: smac: remove smatch warnings from brcmsmac codeArend van Spriel3-5/+14
The patch fixes following smatch warnings: main.c +2902 brcms_b_read_objmem(11) info: ignoring unreachable code. mac80211_if.c +1146 brcms_suspend(8) error: we previously assumed 'wl' could be null (see line 1145) srom.c +641 _initvars_srom_pci(16) error: potential null dereference 'entry'. (kzalloc returns null) Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Alwin Beukers <alwin@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-22brcm80211: smac: fix endless retry of A-MPDU transmissionsArend van Spriel1-5/+1
The A-MPDU code checked against a retry limit, but it was using the wrong variable to do so. This patch fixes this to assure proper retry mechanism. This problem had a side-effect causing the mac80211 flush callback to remain waiting forever as well. That side effect has been fixed by commit by Stanislaw Gruszka: commit f96b08a7e6f69c0f0a576554df3df5b1b519c479 Date: Tue Jan 17 12:38:50 2012 +0100 brcmsmac: fix tx queue flush infinite loop Reference: https://bugzilla.kernel.org/show_bug.cgi?id=42576 Cc: Stanislaw Gruszka <sgruszka@redhat.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Alwin Beukers <alwin@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-22brcm80211: smac: remove redundant assignments from txpwrctrl_pwr_setup_nphyArend van Spriel1-20/+1
The function wlc_phy_txpwrctrl_pwr_setup_nphy() does assign a local variable target_pwr_qtrdbm in several code paths, but in the end all code paths are coming to an assignment of that variable which does override all previous. So those early and redundant assignments have been removed. Reported-by: Larry Finger <Larry.Finger@lwfinger.net> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Alwin Beukers <alwin@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-22brcm80211: smac: fix unintended fallthru in wlc_phy_radio_init_2057()Arend van Spriel1-4/+3
The radio initialization for 2057 rev 5 was using the incorrect register table for the initialization. This patch fixes that. Reported-by: Larry Finger <Larry.Finger@lwfinger.net> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Alwin Beukers <alwin@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-22Correcting typos in rtlwifi/base.cTristan Pourcelot1-3/+3
This patch correct some typos in a comment. Signed-off-by: Tristan Pourcelot <tristan.pourcelot@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-22rtlwifi: rtl8192c-common: rtl8192se: rtl8192de: Simplify if statementsLarry Finger3-277/+104
Devendra Naga <devendra.aaru@gmail.com> submitted a patch for rtl8192c_common to change the tests in _rtl92c_store_pwrIndex_diffrate_offset(). This patch improves on those changes and applies similar modifications to drivers rtl8192se and rtl8192de. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-22rt2x00:Add debug message for new chipsetJohn Li1-2/+2
Signed-off-by: John Li <chen-yang.li@mediatek.com> Acked-by: Helmut Schaa <helmut.schaa@googlemail.com> Acked-by: Gertjan van Wingerde <gwingerde@gmail.com> Acked-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-22rt2x00:Fix typoJohn Li1-1/+1
Signed-off-by: John Li <chen-yang.li@mediatek.com> Acked-by: Helmut Schaa <helmut.schaa@googlemail.com> Acked-by: Gertjan van Wingerde <gwingerde@gmail.com> Acked-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-22rtlwifi/rtl8192c: in _rtl92c_phy_calculate_bit_shift remove comparing ↵Devendra.Naga1-1/+1
bitmask against 1 in _rtl92c_phy_calculate_bit_shift everytime the right shifted bitmask is AND with 1 and compared against 1. i.e. if ((bitmask >> i) & 0x1 == 1) break; which in the if condition is anyway becomes a 1 or 0. Signed-off-by: Devendra.Naga <devendra.aaru@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-22Merge branch 'for-linville' of ↵John W. Linville33-798/+1386
git://git.kernel.org/pub/scm/linux/kernel/git/luca/wl12xx
2012-02-17iwlwifi: enable receiving beacons when not associatedMeenakshi Venkataraman1-0/+16
If the firmware implements beacon filtering, beacons are filtered when not associated. This causes association failures on channels marked passive. Enabling this flag indicates to the firmware to allow the beacons to pass through when not associated only. Signed-off-by: Meenakshi Venkataraman <meenakshi.venkataraman@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2012-02-17iwlwifi: remove un-necessary returnWey-Yi Guy2-4/+3
Already return 0, change to void Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2012-02-17iwlwifi: SRAM size moves from hw_params to cfgEmmanuel Grumbach6-18/+38
This will allow to set the hw_params after we fetch the uCode. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2012-02-17iwlwifi: save ucode capabilities in iwl_fwDon Fry4-29/+22
The capabilities parsed from the ucode file are never saved. Save them in the iwl_fw structure. Signed-off-by: Don Fry <donald.h.fry@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2012-02-17iwlwifi: changes args to iwl_nic for firmware operationsDon Fry4-79/+77
Remove the references to iwl_priv from the firmware request and parsing routines. They are generic to the nic. Signed-off-by: Don Fry <donald.h.fry@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2012-02-17iwlwifi: the transport knows its stateEmmanuel Grumbach1-0/+49
This allows to handle races such as Tx packets on their way to be sent although the transport has been stopped already. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2012-02-17iwlwifi: move event and err pointers to iwl_nicDon Fry3-26/+24
Move the ucode offset pointers to the iwl_nic as they are nic related. Signed-off-by: Don Fry <donald.h.fry@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2012-02-17iwlwifi: document the transport layerEmmanuel Grumbach1-13/+107
Fix a few typos in the existing comments too. Enforce the comments with might_sleep. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2012-02-17iwlwifi: send testmode hcmd reply with rx headerAmit Beka1-1/+1
When a host command is sent through testmode, the whole reply (including rx header) is returned to the user, and not only the payload of the rx. Before this commit the length was buggy - the reply contained 4 bytes after the end of the payload. Signed-off-by: Amit Beka <amit.beka@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2012-02-17iwlwifi: fixes to testmode indirect accessAmit Beka1-4/+6
Fixed casting of buffer addressing, and added size to the read method, like in __iwl_read_prph. Signed-off-by: Amit Beka <amit.beka@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2012-02-17iwlwifi: use enhance_sensitivity from iwl_fwEmmanuel Grumbach3-4/+5
Remove another dependency between the nic layer and the iwl_priv struct. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2012-02-17iwlwifi: iwl_set_hw_params returns always 0Emmanuel Grumbach6-22/+9
Remove the return value. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2012-02-17iwlwifi: kill iwl_down and s/__iwl_down/iwl_downEmmanuel Grumbach3-16/+11
iwl_down was just a wrapper around __iwl_down which was called from one place only. Replace it to direct call to iwl_down. Add lockdep warning in iwl_down to ensure it was called with the mutex held. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2012-02-17iwlwifi: change args to ucode routinesDon Fry4-35/+36
Change the prameters to the ucode (de)allocate routines to iwl_nic as they are not transport operations. Signed-off-by: Don Fry <donald.h.fry@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2012-02-17iwlwifi: Move ucode pointers to iwl_fwDon Fry6-48/+46
The ucode image is a ucode related thing not a transport one. Move them. Signed-off-by: Don Fry <donald.h.fry@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2012-02-17iwlwifi: move firmware_loading_complete to iwl_nicDon Fry3-6/+4
Move firmware_loading_complete from iwl_priv to iwl_nic and rename it to more accurately reflect what it does. Signed-off-by: Don Fry <donald.h.fry@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2012-02-17iwlwifi: move firmware_name to iwl_nicDon Fry2-8/+5
Delete firmware_name from iwl_priv and use iwl_nic instead. Signed-off-by: Don Fry <donald.h.fry@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2012-02-17iwlwifi: move fw_index from iwl_priv to iwl_nicDon Fry2-12/+12
Delete fw_index from iwl_priv and use iwl_nic instead. Signed-off-by: Don Fry <donald.h.fry@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>