Commit graph

442334 commits

Author SHA1 Message Date
Jes Sorensen
4e489d91b4 staging: rtl8723au: 'keyid' is always 0-3, no need for CHKBIT()
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-15 13:12:02 -07:00
Jes Sorensen
5a44389331 staging: rtl8723au: No need for CHKBIT since 16 + 12 is still < 32
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-15 13:12:02 -07:00
Jes Sorensen
072fc84dce staging: rtl8723au: tid is 4 bits, so we need a 16 bit value to hold a bitmap
Remove unused add_enable_bitmap and candidate_tid_bitmap from struct
mlme_ext_info.

In addition we don't need to use CHKBIT when we know we are dealing
with a value in the range 0-15.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-15 13:12:02 -07:00
Jes Sorensen
405c9f5089 staging: rtl8723au: Remove local #define BIT()
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-15 13:12:01 -07:00
Jes Sorensen
00cf86c997 staging: rtl8723au: Call c2h_handler_8723a() directly instead of via HAL interface
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-15 13:12:01 -07:00
Jes Sorensen
227ca8c4c4 staging: rtl8723au: The driver only has one c2h_id_filter
Since we only have one function for this, there is no point in keeping
the HAL silliness.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-15 13:12:01 -07:00
Jes Sorensen
849befad33 staging: rtl8723au: c2h_evt_hdl() is always called with 3rd argument = NULL
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-15 13:12:01 -07:00
Jes Sorensen
ab281e3ba9 staging: rtl8723au: Declare c2h_evt_hdl static
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-15 13:12:01 -07:00
Jes Sorensen
95b0f20008 staging: rtl8723au: Move rtw_do_join23a() prototype to rtw_ioctl_set.h
rtw_do_join23a() is declared in rtw_ioctl_set.c so move the prototype
to it's correct place, and remove duplicate protoype from rtw_mlme.c

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-15 13:12:01 -07:00
Jes Sorensen
7871778259 staging: rtl8723au: Move {WPA,RSN}_TKIP_CIPHER23A to rtw_wlan_util.c and mark them static
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-15 13:12:01 -07:00
Jes Sorensen
f85bd05247 staging: rtl8723au: Move REALTEK96B_IE23A to rtw_mlme_ext.c and mark it static
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-15 13:12:01 -07:00
Jes Sorensen
d39518a4b5 staging: rtl8723au: Remove unused ADPT_{FMT,AGR} macros
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-15 13:12:01 -07:00
Jes Sorensen
a790d58e68 staging: rtl8723au: Get rid of FUNC_NDEV_{FMT,ARG}
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-15 13:12:01 -07:00
Jes Sorensen
9cd613c739 staging: rtl8723au: Remove FUNC_ADPT_{FMT,ARG}
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
dc24abd409 staging: rtl8723au: Get rid of NDEV_FMT/NDEV_ARG macros
Silly use-once macros that simply obfuscates the code.

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
5e3a829996 staging: rtl8723au: Remove some unused prototypes
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
be4c50604d staging: rtl8723au: Eliminate RTW_STATUS_CODE23a()
Inline the parsing of status codes. Long term we should pass back the
proper status codes and get rid of the ugly _FAIL/_SUCCESS mess. This
is one small step in that direction.

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
794ff0530e staging: rtl8723au: Eliminate _rtw_queue_empty23a()
This was just a silly wrapper around list_empty()

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
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