Jes Sorensen
c5779a0d1f
staging: rtl8723au: rtw_free_recvframe23a() is always passed precvpriv->free_recv_queue
...
No point in passing in the pointer to free_recv_queue, when we always
pass in the same value.
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2014-05-15 13:12:00 -07:00
Jes Sorensen
a954a18f46
staging: rtl8723au: Remove unused semaphore 'allrxreturnevt'
...
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2014-05-15 13:12:00 -07:00
Jes Sorensen
6f43d3bd9c
staging: rtl8723au: Remove ugly vmalloc() wrappers
...
Finally with the last user converted, get rid of ugly vmalloc wrappers
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2014-05-15 13:12:00 -07:00
Jes Sorensen
fd6d1c111b
staging: rtl8723au: Use kmalloc instead of vmalloc to allocate recv_frame pool
...
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2014-05-15 13:12:00 -07:00
Jes Sorensen
269746a4f3
staging: rtl723au: Remove some obsolete misleading comments
...
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2014-05-15 13:12:00 -07:00
Jes Sorensen
3a35058f2e
stating: rtl8723au: Use kmalloc instead of vmalloc to allocate pool of xmit_frame_ext
...
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2014-05-15 13:12:00 -07:00
Jes Sorensen
251ccc2d86
staging: rtl8723au: Use kmalloc() rather than vmalloc() to allocate xmit_frames
...
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2014-05-15 13:11:59 -07:00
Jes Sorensen
6042cbfddb
staging: rtl8723au: Declare rtw_alloc_xmitframe() static
...
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2014-05-15 13:11:59 -07:00
Christian Engelmayer
086f7a4d17
staging: rtl8723au: fix potential leak in update_bcn_wps_ie()
...
Fix a potential leak in the error path of function update_bcn_wps_ie().
Move the affected input verification to the beginning of the function so
that it may return directly without leaking already allocated memory.
Detected by Coverity - CID 1077718.
Signed-off-by: Christian Engelmayer <cengelma@gmx.at >
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2014-05-15 13:11:59 -07:00
Jes Sorensen
6e8bc71df6
staging: rtl8723au: Add GFP argument to rtw_alloc_stainfo23a()
...
No need to allocate GFP_ATOMIC when we don't need to.
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2014-05-15 13:11:59 -07:00
Jes Sorensen
2ad7c3d940
staging: rtl8723au: Use kernel memory allocator for sta_priv allocations
...
The kernel has a great memory allocator, use it instead of hacking up
something in the driver.
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2014-05-15 13:11:59 -07:00
Jes Sorensen
6964213a94
staging: rtl8723au: Eliminate stainfo_by_offset spaghetti
...
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2014-05-15 13:11:59 -07:00
Jes Sorensen
ec838b0bc9
staging: rtl8723au: add GFP argument to rtw_alloc_network()
...
This allows us to use GFP_KERNEL when calling from a work handler.
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2014-05-15 13:11:59 -07:00
Jes Sorensen
5290cd688e
staging: rtl8723au: rtw_createbss_cmd23a_callback(): Relax holding of pmlmepriv->lock
...
We only really need to hold pmlmepriv->lock while calling
rtw_indicate_connect23a(). rtw_get_stainfo23a() and
rtw_alloc_stainfo23a() rely on pstapriv->sta_hash_lock and the non
WIFI_AP_STATE path relies on pmlmepvi->scanned_queue.lock, except we
need to used clr_fwstate() instead of _clr_fwstate_().
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2014-05-15 13:11:59 -07:00
Jes Sorensen
5d8b411b33
staging: rtl8723au: rtw_alloc_stainfo23a(): Remove unused variable tmp_aid
...
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2014-05-15 13:11:59 -07:00
Jes Sorensen
b06106d105
staging: rtl8723au: rtw_sta_mgt.c: Fix some formatting badness
...
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2014-05-15 13:11:59 -07:00
Jes Sorensen
1465967763
staging: rtl8723au: Get rid of second set of custom error codes
...
One set of custom error codes for the driver should more than
suffice. This allows us to get rid of odm_types.h as well.
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2014-05-15 13:11:59 -07:00
Jes Sorensen
5cfab102fb
staging: rtl8723au: Remove some unused clutter from odm_types.h
...
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2014-05-15 13:11:58 -07:00
Jes Sorensen
70e6b551c6
staging: rtl8723au: Remove unused struct rtl8723a_priv
...
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2014-05-15 13:11:58 -07:00
Jes Sorensen
59497030a2
staging: rtl8723au: Remove a bunch of unused clutter from the ODM code
...
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2014-05-15 13:11:58 -07:00
Jes Sorensen
5ead42ce71
staging: rtl8723au: Remove unused ODM spin lock functions
...
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2014-05-15 13:11:58 -07:00
Jes Sorensen
613a774d9d
staging: rtl8723au: Remove unused ODM malloc/free functions
...
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2014-05-15 13:11:58 -07:00
Jes Sorensen
9d85833d19
staging: rtl8723au: Use random ethaddr if EEPROM address is corrupted
...
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2014-05-15 13:11:58 -07:00
Jes Sorensen
be1bc0c9d6
staging: rtl8723au: wifi.h: remove more unused #defines
...
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2014-05-15 13:11:58 -07:00
Jes Sorensen
c51e886fe1
staging: rtl8723au: Use struct ieee80211_pspoll to obtain 'aid'
...
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2014-05-15 13:11:58 -07:00
Jes Sorensen
9c4a961deb
staging: rtl8723au: Fold get_hdr_bssid() into update_recvframe_phyinfo()
...
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2014-05-15 13:11:58 -07:00
Jes Sorensen
b307108165
staging: rtl8723au: update_recvframe_phyinfo(): Don't set variables twice
...
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2014-05-15 13:11:58 -07:00
Jes Sorensen
aa66fbb956
staging: rtl8723au: validate_recv_data_frame() use fctl knowledge to obtain bssid
...
Use the knowledge we already have from parsing the TODS/FROMDS bits in
hdr->frame_control to obtain the bssid.
Note that get_hdr_bssid() would never return NULL as handling 4
combinations of a 2 bit word leaves little space for falling through
to the 'default' value.
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2014-05-15 13:11:58 -07:00
Jes Sorensen
5ca12b7899
staging: rtl8723au: Remove to_fr_ds packet attribute
...
This is only used in one place - do the work there properly.
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2014-05-15 13:11:57 -07:00
Jes Sorensen
222203206e
staging: rtl8723au: Declare validate_recv_*_frame() static
...
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2014-05-15 13:11:57 -07:00
Jes Sorensen
ff516e7076
staging: rtl8723au: Remove redundant check
...
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2014-05-15 13:11:57 -07:00
Jes Sorensen
c227ed0a69
staging: rtl8723au: rtw_wlan_util.c: Clean up the code
...
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2014-05-15 13:11:57 -07:00
Jes Sorensen
7ae25994e0
staging: rtl8723au: rtl8723a_recv.h: Don't put parenthesis around constants
...
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2014-05-15 13:11:57 -07:00
Jes Sorensen
9b6cd3e6ea
staging: rtl8723au: Remove a bunch of always true #ifdefs
...
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2014-05-15 13:11:57 -07:00
Jes Sorensen
1509864ca7
staging: rtl8723au: Remove a pile of unused firmware image file names
...
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2014-05-15 13:11:57 -07:00
Jes Sorensen
45b09aa208
staging: rtl8723au: rtw_ioctl_set.h: Remove unused struct bssid_info
...
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2014-05-15 13:11:57 -07:00
Jes Sorensen
51e2726a34
staging: rtl8723au: Remove unused rtw_ioctl.h
...
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2014-05-15 13:11:57 -07:00
Jes Sorensen
bd8ad4a510
staging: rtl8723au: Eliminate struct qos_priv
...
Having struct qos_priv containing a single integer, and carrying a
dedicated header file for it, is just plain silly. Move the integer
into struct mlme_priv, which is the only place qos_priv was used
anyway, and get rid of the header file.
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2014-05-15 13:11:57 -07:00
Jes Sorensen
62dff10d20
staging: rtl8723au: rtw_event.h remove some unused structs and random blank lines
...
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2014-05-15 13:11:57 -07:00
Jes Sorensen
e2601960e9
staging: rtl8723au: Make event callbacks take a const u8 *
...
This avoids an ugly cast in mlme_evt_hdl23a()
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2014-05-15 13:11:57 -07:00
Jes Sorensen
0f6df02ad8
staging: rtl8723au: Fix endian abnormality in mlme_evt_hdl23a()
...
Every other place uses C2HEvent_Header() for events. Given the struct
is endian dependant, use it here too to retrieve data from the parm
buffer.
Note the length field is not set/read in le order - question is
whether it's simply an opaque field?
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2014-05-15 13:11:56 -07:00
Larry Finger
d217e5dd22
staging: rtl8723au: Move data byte-swap closer to register access
...
This makes sparse happy
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net >
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2014-05-15 13:11:56 -07:00
Jes Sorensen
b35c0ff605
staging: rtl8723au: Remove unused + write-only entries from struct evt_priv
...
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2014-05-15 13:11:56 -07:00
Jes Sorensen
593ac88e76
staging: rtl8723au: Get rid of ugly cbuf interface
...
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2014-05-15 13:11:56 -07:00
Jes Sorensen
980cf72afb
staging: rtl8723au: Use workqueue to handle interrupt complete processing
...
Split the old work handler into a workqueue for processing
usb_read_interrupt_complete() events that require more than ust
clearing the event, and leave the old handler to just handle event
clearing.
This means we can get rid of the hacks with magic pointers to
determine what actions needs to be taken in the work handler, and
as an extra bonus obsoletes the bizarre cbuf code.
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2014-05-15 13:11:56 -07:00
Jes Sorensen
8df06a3b80
staging: rtl8723au: Name cmd workqueue appropriately to allow for more workqueues
...
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2014-05-15 13:11:56 -07:00
Jes Sorensen
c3826753d3
staging: rtl8723au: Remove rtw_free_cmd_priv23a()
...
This function no longer does anything, so get rid of it.
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2014-05-15 13:11:56 -07:00
Jes Sorensen
fac7563a32
staging: rtl8723au: rsp_buf wasn't used for anything - don't allocate it
...
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2014-05-15 13:11:56 -07:00
Jes Sorensen
c347dc6207
staging: rtl8723au: pass the cmd parm buffer directly to the cmd handler
...
commit 0348dc74f6 ensured that the parm
buffer passed to the cmd handlers is not being over-written. Hence
there is no need to make a copy of the parm buffer just to pass it
into the cmd handler.
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2014-05-15 13:11:56 -07:00
Jes Sorensen
ea0c927d01
staging: rtl8723au: rtw_ieee80211.c: Reduce some excessive parenthesis usage
...
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2014-05-15 13:11:56 -07:00