Commit graph

126 commits

Author SHA1 Message Date
David S. Miller
117ff42fd4 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2012-01-04 21:35:43 -05:00
Amitkumar Karwar
b015dbc0f9 mwifiex: fix crash during simultaneous scan and connect
If 'iw connect' command is fired when driver is already busy in
serving 'iw scan' command, ssid specific scan operation for connect
is skipped. In this case cmd wait queue handler gets called with no
command in queue (i.e. adapter->cmd_queued = NULL).

This patch adds a NULL check in mwifiex_wait_queue_complete()
routine to fix crash observed during simultaneous scan and assoc
operations.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-01-03 14:40:45 -05:00
Amitkumar Karwar
3aebee028a mwifiex: fix issues in band configuration code
Currently due to following issues in the code even if device is
configured in B only, G only or BG mode using iw bitrates command,
ibss is getting created in BGN mode.

1) mwifiex_channels_to_cfg80211_channel_type() routine gives channel
type as NL80211_CHAN_HT20 for non-HT channel as well, because driver
doesn't store HT information provided by stack for the channel.
This issue is fixed by maintaining channel type information in
'adapter->channel_type'.
2) Band configuration is unnecessarily overwritten with BGN/AN while
setting channel.

This patch makes sure that "adapter->config_bands" correctly gets
modified while setting channel.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-12-21 15:06:14 -05:00
Amitkumar Karwar
21c3ba3464 mwifiex: use IEEE80211_HT_PARAM_CHA_SEC_* macros
Replace driver specific macros with the corresponding
IEEE80211_HT_PARAM_CHA_SEC_* macros defined in ieee80211.h.
Also, rename 'adapter->chan_offset' to 'adapter->sec_chan_offset'
for consistency.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-12-21 15:06:13 -05:00
Amitkumar Karwar
43906cdb91 mwifiex: remove redundant band config code
struct mwifiex_ds_band_cfg and mwifiex_set_radio_band_cfg() routine
are unnecessary. It can be done with simple equivalant code.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-12-21 15:06:13 -05:00
Amitkumar Karwar
186630c280 mwifiex: cleanup work in scan.c
Scan type derived from IEEE80211_CHAN_PASSIVE_SCAN bit is a boolean
flag representing passive scanning. We should not again compare it
with driver specific macro MWIFIEX_SCAN_TYPE_PASSIVE to determine
passive or active scan. We can also avoid the use of local variable
by using the flag directly.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-12-19 14:37:14 -05:00
Amitkumar Karwar
38c9d6641f mwifiex: remove cfg_workqueue
cfg_workqueue was added to notify cfg80211 that scan, connect
or disconnect is done by calling respective completion handlers.
We can avoid use of this workqueue by calling those handlers
from other places.
1) Call connect, disconnect completion handlers in their callback
   functions.
   ex. Call cfg80211_connect_result() in mwifiex_cfg80211_connect()
2) Call scan completion handler after parsing response of last scan
   command in a queue.

After removing the workqueue, variables (assoc_request etc.) and
checks used for mutual exclusion become redundant. Those are also
removed in this patch.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Nishant Sarmukadam <nishants@marvell.com>
Signed-off-by: Kiran Divekar <dkiran@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-12-14 14:50:11 -05:00
John W. Linville
5d22df200b Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless
Conflicts:
	drivers/net/wireless/iwlwifi/iwl-agn.c
2011-12-14 14:35:41 -05:00
Yogesh Ashok Powar
51e708c104 mwifiex: avoid double list_del in command cancel path
Command cancel path cancels the current command and moves
it to free command queue. While doing that it deletes the
command entry from the pending list. This is not correct
as the entry has been already deleted from the pending
list at 'mwifiex_exec_next_cmd'. Fixing it.

Also making sure the stale command pointer is cleaned and
unaccessible for later use.

Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-12-14 13:56:54 -05:00
Amitkumar Karwar
c2521653f4 mwifiex: do not advertise custom regulatory domain capability
mwifiex driver no longer supports it's own custom regulatory rules,
but custom regulatory domain capability is still advertised during
wiphy registration by the driver.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-12-13 15:48:38 -05:00
Avinash Patil
bbea3bc432 mwifiex: wakeup and stop multiple tx queues in net_device
replace single queue function calls with equivalent multiple queue
functions. Wakeup queue and stop queue calls are guarded by spin lock.

Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Kiran Divekar <dkiran@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-12-13 15:33:26 -05:00
Avinash Patil
17a60b4819 mwifiex: proper cleanup when RX multiport aggregation fails
Free SKBs allocated during multiport aggrgation setup when RX
multiport aggregation fails in the middle. With this handling
freeing SKB in mwifiex_process_int_status() for failure case
is removed.

Also handles single RX transaction failure.

Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-12-13 15:33:23 -05:00
Amitkumar Karwar
8c53e42dea mwifiex: failure case handling for PCIe events
Event buffers for PCIe interface are allocated during driver
initialisation, and respective physical addresses are sent to FW
in *_PCIE_DESC_DETAILS command so that FW can do DMA. These buffers
will be freed while unloading the driver. Therefore we should not
free them in event handling error path. Also we should skip next
pending events in failure case.

Also fixed 'returning -1 instead of -ENOMEM is sloppy' warnings.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-12-13 15:33:20 -05:00
John W. Linville
d7a4858c0f Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless
Conflicts:
	drivers/net/wireless/iwlwifi/iwl-agn.c
	drivers/net/wireless/libertas/cfg.c
2011-12-02 15:44:03 -05:00
Luis R. Rodriguez
742c29fd5b mwifiex: fix usage of set tx power
mBm is passed but dBm was assumed...

Acked-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-11-30 15:08:30 -05:00
Bing Zhao
e3bea1c875 mwifiex: add support for Marvell sd8797 device
This patch supports Marvell chipset 88W8797 (Avastar) with
SDIO interface.

The corresponding firmware image file is located at:
"mrvl/sd8797_uapsta.bin"

Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: Tristan Xu <xurf@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Kiran Divekar <dkiran@marvell.com>
Signed-off-by: Frank Huang <frankh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-11-17 15:45:19 -05:00
Amitkumar Karwar
aa95a48d46 mwifiex: release bss structure returned by cfg80211_inform_bss()
Following compilation warning is fixed by releasing referenced BSS
structure returned by cfg80211_inform_bss().

"warning: ignoring return value of cfg80211_inform_bss,
declared with attribute warn_unused_result"

Cc: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-11-11 12:32:48 -05:00
Amitkumar Karwar
f72fa45f7d mwifiex: remove unnecessary free_priv handler
Cfg80211 stack allocates private area for driver use in
struct cfg80211_bss. It will be freed by stack in bss_release().
Driver don't need to worry about it.

In mwifiex driver, we use the private area just to store band
information(u8). We don't allocate memory explicitly and store
it's pointer in bss->priv. Hence we don't have any cleanup work
to do in free_priv handler. Currently we try to free the allocated
private area in free_priv handler which is not correct.

This patch removes unnecessary free_priv handler.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-11-11 12:32:48 -05:00
Yogesh Ashok Powar
8ed1303321 mwifiex: fix 'Smatch' warnings
Following three warnings are fixed:

>init.c +256 mwifiex_init_adapter(71)
>warn: variable dereferenced before check 'adapter->sleep_cfm'
>(see line 191)

>sta_rx.c +193 mwifiex_process_sta_rx_packet(75)
>warn: variable dereferenced before check 'priv' (see line 182)

Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-11-11 12:32:48 -05:00
Yogesh Ashok Powar
63af63330f mwifiex: fix coding style
Rename DataRate to data_rate and arrange 'for' loop
for better readability.

Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-11-11 12:32:48 -05:00
Yogesh Ashok Powar
ab581472c0 mwifiex: change return types to void
Functions mwifiex_11n_dispatch_pkt_until_start_win and
mwifiex_11n_scan_and_dispatch used to always return value
zero for all inputs. Changing these functions to void.

Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-11-11 12:32:47 -05:00
Yogesh Ashok Powar
eedf15d34d mwifiex: use existing helper function mwifiex_fill_cap_info
Use existing helper function mwifiex_fill_cap_info to fill
the HT CAP info for ibss beacons.

Also removing extra parenthesis block for better readability.

Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>

Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-11-11 12:32:47 -05:00
Yogesh Ashok Powar
33f38d425f mwifiex: fix ht_cap_info in ibss beacons
A local variable is used to calculate ht_cap_info.
Erroneously ht_cap.cap_info isn't updated in the ibss beacons
after the calculation. This patch fixes it.

Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Kiran Divekar <dkiran@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-11-11 12:32:47 -05:00
Amitkumar Karwar
fada10584d mwifiex: fix association issue with AP configured in hidden SSID mode
Firmware expects 'max_ssid_length' field in
'struct mwifiex_ie_types_wildcard_ssid_params' to be '0' for
performing SSID specific scan. Currently driver updates it with
an actual SSID length. Hence UUT is not able to find the AP
configured in hidden SSID mode in scan results and association
fails.

max_ssid_length is filled with '0' to fix the issue.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-11-11 11:03:25 -05:00
Dan Carpenter
1eb54c8a0f mwifiex: prevent corruption instead of just warning
Probably we never hit this condition, but in case we do, we may as
well put a return here instead of just printing a warning message and
then corrupting memory.  The caller doesn't check the return code.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-11-09 16:14:13 -05:00
Amitkumar Karwar
7d7ab02204 mwifiex: enable SDIO multiport aggregation
By default SDIO multiport aggregation is disabled. It's useful to
get good throughput results. This patch enables it.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-11-09 16:14:13 -05:00
Dan Carpenter
fa161cb7aa mwifiex: remove an unneeded NULL check
We dereference adapter in the error handling code so this needed to
be fixed.  This function is always called like:
	adapter->if_ops.host_to_card(adapter, ...);
so adapter can never be NULL and I've removed the NULL check.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-11-09 16:14:12 -05:00
Dan Carpenter
fba6fe6347 mwifiex: remove unneeded kfree(NULL);
The previous if statement means this that pointer is NULL so there
is no need to free it.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-11-09 16:14:11 -05:00
Jesper Juhl
db652e4b36 net, wireless, mwifiex: Fix mem leak in mwifiex_update_curr_bss_params()
If kmemdup() fails we leak the memory allocated to bss_desc.
This patch fixes the leak.
I also removed the pointless default assignment of 'NULL' to 'bss_desc'
while I was there anyway.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Reviewed-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-11-07 13:19:15 -05:00
John W. Linville
41ebe9cde7 Merge branch 'master' of git://git.infradead.org/users/linville/wireless-next into for-davem 2011-10-17 15:05:26 -04:00
Amitkumar Karwar
711825a06b mwifiex: fix make namespacecheck warnings
This patch takes care of warnings found by running
'make namespacecheck':

1. Remove dead code.
2. Reorder function definitions to avoid forward declarations.
3. Remove unnecessary function/structure declarations and mark
   them as static.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-10-14 14:48:20 -04:00
Amitkumar Karwar
efaaa8b841 mwifiex: use separate wait condition for each command node
Currently global wait condition (adapter->cmd_wait_q.condition)
is used while sending synchronous commands to FW. When two threads
enter in mwifiex_send_cmd_sync() routine at the same time, both the
threads wait for their command responses. Since wait condition is
same for both, they wake up simultaneously after getting response
of 1st command. After this when a thread is waiting for command
response of 3rd command, it wakes up after getting response of 2nd
command and so on. Therefore we don't wait for the response of last
command(0xaa) during unload. Hence while next time loading the driver
command time out is seen for INIT command.

This problem is resolved by having separate wait condition flag for
each command(except scan command). Since scan command is treated
differently (by maintaining scan pending q etc.), newly defined flag
(scan_wait_q_woken) is used as a scan wait condition.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-10-14 14:48:20 -04:00
Amitkumar Karwar
d930faee14 mwifiex: add support for Marvell pcie8766 chipset
This patch supports 88W8766P chipset with a PCIe interface.

The corresponding firmware image file is located at:
"mrvl/pcie8766_uapsta.bin"

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Ramesh Radhakrishnan <rramesh@marvell.com>
Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Kiran Divekar <dkiran@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: Frank Huang <frankh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-10-12 14:41:44 -04:00
Yogesh Ashok Powar
3d82de0fa5 mwifiex: fix smatch errors
drivers/net/wireless/mwifiex/main.c +828 mwifiex_remove_card(52)
  error: potential null derefence 'priv'.
drivers/net/wireless/mwifiex/main.c +828 mwifiex_remove_card(52)
  error: we previously assumed 'priv' could be null (see line 820)
drivers/net/wireless/mwifiex/txrx.c +90 mwifiex_process_tx(24)
  error: potential null derefence 'local_tx_pd'.
drivers/net/wireless/mwifiex/sta_ioctl.c +766
mwifiex_rate_ioctl_set_rate_value(30)
  error: buffer overflow 'rate' 14 <= 14

Cc: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-10-11 16:41:11 -04:00
John W. Linville
094daf7db7 Merge branch 'master' of git://git.infradead.org/users/linville/wireless-next into for-davem
Conflicts:
	Documentation/feature-removal-schedule.txt
2011-10-11 15:35:42 -04:00
Amitkumar Karwar
44b815c6b0 mwifiex: handle an error path correctly
In failure case locks are not allocated in mwifiex_register().
So mwifiex_free_lock_list() routine call becomes redundant.
Also we don't need to check return type for mwifiex_init_lock_list()
routine. It never fails.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-10-03 15:22:36 -04:00
Amitkumar Karwar
d85c5fe462 mwifiex: correct AMSDU aggregation check
The commit "mwifiex: remove list traversal.."(fcf2176c87..)
wrongly modifies AMSDU aggregation check. Due to this even though
packet size for iperf traffic is already large, we unnecessarily
try to aggregate them which adds some delay. If Tx iperf is started
on UUT for 30 seconds, UUT keeps sending Tx packets for few more
seconds.

That commit is reverted to fix the problem.
Also, MIN_NUM_AMSDU check is moved inside the loop to optimize the
loop.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-10-03 15:22:35 -04:00
Yogesh Ashok Powar
93a1df48d2 mwifiex: add cfg80211 handlers add/del_virtual_intf
Making adding and deleting virtual interfaces dynamic. Adding
handlers for creating and deleting virtual interface with
given name and dev respectively.

Also, creating default interface of type station on insmod of
the driver.

Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-30 15:57:01 -04:00
Amitkumar Karwar
4ec6f9c0c9 mwifiex: fix Tx data rate display issue
"iw dev mlan0 link" shows wrong data rate, because data rate is
not sent properly to cfg80211 stack. Also stack is not updated
with mcs and Tx data flags information.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-30 15:57:00 -04:00
Amitkumar Karwar
cbaaf592b7 mwifiex: remove unreachable code
In disconnected state "iw dev mlan0 link" command will return
from cfg80211 stack itself. We also have an error check in
mwifiex_cfg80211_get_station() routine. Therefore the code
under "if (!priv->media_connected)" condition in
mwifiex_rate_ioctl_get_rate_value() routine becomes unreachable.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-30 15:56:59 -04:00
Amitkumar Karwar
82df4d38a0 mwifiex: remove unnecessary mwifiex_dump_station_info() call
An extra call to mwifiex_dump_station_info() routine in get_station
callback function is redundant

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-30 15:56:59 -04:00
John W. Linville
8e00f5fbb4 Merge branch 'master' of git://git.infradead.org/users/linville/wireless-next into for-davem
Conflicts:
	drivers/net/wireless/iwlwifi/iwl-pci.c
	drivers/net/wireless/wl12xx/main.c
2011-09-30 14:52:29 -04:00
Amitkumar Karwar
5cf80993ad mwifiex: reset skb length before inserting to free queue
After handling command response, cmd skb is inserted into command
free queue(which keeps track of availabile skbs) for reuse purpose.
Skb length is not getting reset to zero here. This patch takes care
of it.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-27 14:34:04 -04:00
Amitkumar Karwar
4ed5d521b0 mwifiex: pass correct band parameter to ieee80211_channel_to_frequency()
ieee80211_channel_to_frequency() routine expects band parameter in
the form of "enum ieee80211_band band". Currently driver specific
band (BAND_A, BAND_AN etc.) is passed to the routine.

This patch makes sure that correct parameter is passed.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-27 14:34:03 -04:00
Amitkumar Karwar
5116f3cef2 mwifiex: update bss band information
In recent commit "mwifiex: use cfg80211 dynamic scan..."
(7c6fa2a843..) scan table handling in driver is removed to
make use of cfg80211 dynamic scan table. Now driver sends
beacon buffers found in scanning directly to stack and parse
the buffer for requested BSS only during association.

Beacon buffer doesn't contain bss band information. Driver
gets it from firmware in separate tlv (chan_band_tlv).
Currently since we don't inform stack about bss bandinfo,
there is an issue with 5GHz association.

Use "priv" field of struct cfg80211_bss to store bandinfo.
This fixes 5GHz association issue.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-27 14:34:03 -04:00
Amitkumar Karwar
d06b7b9e1f mwifiex: fix 5GHz association issue
Sometimes association in 5GHz doesn't work. Dmesg log shows
"Can not find requested SSID xyz" error message. Currently
while preparing scan channel list for firmware Null entries
are created for disabled channels. The routine which retrieves
this list ignores channels after Null entry. Hence sometimes
driver doesn't scan the channel of requested AP and association
fails. The issue is fixed by avoiding those NULL entries.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-27 14:34:02 -04:00
Dan Carpenter
49753128d8 mwifiex: remove unneeded NULL check
We dereference "rate" on the lines before so the checks here are too
late to help.  This function is only called from
mwifiex_dump_station_info() and "rate" is always a non-NULL pointer
so the check can be removed.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-21 16:19:44 -04:00
Dan Carpenter
aef0ba54ec mwifiex: add a kfree() to an error path
We're not likely to hit this small memory leak, but lets fix it
anyway to keep the static checkers happy.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-21 16:19:44 -04:00
John W. Linville
b53d63ecce Merge branch 'master' of ssh://infradead/~/public_git/wireless-next into for-davem 2011-09-19 15:00:16 -04:00
Yogesh Ashok Powar
5982b47aa4 mwifiex: replace kmalloc & memcpy sequence with kmemdup
Sequence of kmalloc/kzalloc and memcpy is replaced with
kmemdup.

Cc: Walter Harms <wharms@bfs.de>
Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Kiran Divekar <dkiran@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-13 15:42:32 -04:00