iwlwifi: remove unecessary if statement

the code always returns ret regardless, so if(ret) check is unecessary.

Signed-off-by: Greg Dietsche <Gregory.Dietsche@cuw.edu>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
mwifiex: remove list traversal in mwifiex_num_pkts_in_txq

Instead of counting the number of packets in txq
for particular RA list before AMSDU creation,
maintain a counter which will keep track of the
same.

This will reduce some MIPS while generating AMSDU
traffic as we only have to check the counter instead
of traversing through skb list.

Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
mwifiex: Remove redundant skb_queue_empty checks

The check of skb list empty before calling skb_peek and skb_dequeue is
redundant. These functions returns NULL if the list is empty.

Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
mwifiex: adding check for enough space before padding

All MSDUs, except the last one in an AMSDU, should end up at 4
bytes boundary. There is need to check if enough skb_tailroom
space exists before padding the skb.

Also re-arranging code for better readablity.

Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
mwifiex: disable transmission buffer aggregation for AMSDU packets

Padding per MSDU will affect the length of next packet and hence
the exact length of next packet is uncertain here.

Also, aggregation of transmission buffer, while downloading the
data to the card, wont gain much on the AMSDU packets as the AMSDU
packets utilizes the transmission buffer space to the maximum
(adapter->tx_buf_size).

Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
ath9k: make use of a helper to get paprd scale factor

Signed-off-by: Mohammed Shafi Shajakhan <mshajakhan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
staging: brcm80211: removed unused Broadcom specific ioctls codes

Code cleanup. Removal of code that is not invoked.

Signed-off-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
staging: brcm80211: removed iovar layer from softmac

Code cleanup. Softmac contained a redundant level of indirection, named
'iovar functionality'.

Signed-off-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
staging: brcm80211: cleanup struct wl_info

removed unused field piomode from struct wl_info definition.

Signed-off-by: Arend van Spriel <arend@broadcom.com>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
staging: brcm80211: removed unused timeout fields in wlc_protection

The structure definition wlc_protection contained a numbers of timeout
fields that were not used in the driver. These have been removed.

Signed-off-by: Arend van Spriel <arend@broadcom.com>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
staging: brcm80211: remove WLC_WATCHDOG_TBTT macro

The expanded macro expression will always be false so it has been
removed.

Signed-off-by: Arend van Spriel <arend@broadcom.com>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
staging: brcm80211: cleanup struct wlc_info definition

The structure definition for wlc_info contained a lot of fields that
are only initialized or not used at all. These have been removed to
cleanup the driver code.

Signed-off-by: Arend van Spriel <arend@broadcom.com>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
staging: brcm80211: fix compiler warning introduced

Patch "[0f06b6a] remove WLC_WATCHDOG_TBTT macro" resulted
in compiler warning because static function wlc_watchdog_backup_bi()
is no longer used. This has been fixed in this patch.

Signed-off-by: Arend van Spriel <arend@broadcom.com>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
staging: brcm80211: replaced #ifdef __mips__ sections by W_REG_FLUSH

Code cleanup. A read-after-write construct is present in the code to ensure
write order for certain Broadcom chips. Those chips are: bcm4706, bcm4716,
bcm4717, bcm4718. All these chips contain a MIPS processor. This patch gets
rid of several #ifdef __mips__ sections by defining a new macro in a header
file. This patch does not introduce behavioral changes and is purely meant
for code cleanup. The __mips__ define will be made more specific in a future
patch.

Signed-off-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
staging: brcm80211: emptied wlioctl.h

Code cleanup. Broadcom specific ioctl functionality is not necessary
in the Linux world. Deleted unused defines and structs from wlioctl.h.
Moved softmac specific items from wlioctl.h to softmac header files,
same for fullmac items. Moved shared fullmac/softmac definitions to other
header files.

Signed-off-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
staging: brcm80211: removed wlioctl.h and dhdioctl.h

Code cleanup. These header files were emptied by the previous patch.

Signed-off-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
staging: brcm80211: updated MAINTAINERS, README and TODO files

README now only contains a link to the brcm80211 driver page. Two maintainers
have been added, one deleted. TODO file has also been updated.

Signed-off-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
staging: brcm80211: remove iovars IOV_BLOCKMODE

Remove unused sdio related iovars IOV_BLCOKMODE for fullmac driver

Signed-off-by: Franky Lin <frankyl@broadcom.com>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
staging: brcm80211: remove iovars IOV_DMA

Remove unused sdio related iovars IOV_DMA for fullmac driver

Signed-off-by: Franky Lin <frankyl@broadcom.com>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
staging: brcm80211: remove iovars IOV_NUMLOCALINTS

Remove unused sdio related iovars IOV_NUMLOCALINTS for fullmac driver

Signed-off-by: Franky Lin <frankyl@broadcom.com>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>