Commit graph

561 commits

Author SHA1 Message Date
Jes Sorensen a0cae30aaf staging: rtl8723au: Remove some leftover pointers from struct rtw_adapter
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-26 10:16:18 -07:00
Jes Sorensen c25ef5eaf1 staging: rtl8723au: Remove all references to unused io_queue
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-26 10:16:18 -07:00
Jes Sorensen fa27c805ae staging: rtl8723au: Remove _rtw_write_port_and_wait() functions
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-26 10:16:18 -07:00
Jes Sorensen 2e409f2450 staging: rtl8723au: Not sure what a write_scsi function is doing in a WiFi driver
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-26 10:16:17 -07:00
Jes Sorensen 4427ddb225 staging: rtl8723au: Remove unused ioreq_* prototypes
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-26 10:16:17 -07:00
Jes Sorensen 5827c6555c staging: rtl8723au: Fold rtw_init_io_priv23a() into rtl8723au_set_intf_ops()
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-26 10:16:17 -07:00
Jes Sorensen e32c7cd01b staging: rtl8723au: Remove wrapper around rtl8723au_set_intf_ops()
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-26 10:16:17 -07:00
Jes Sorensen b93eb5c565 staging: rtl8723au: Remove unused usb write_async calls
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-26 10:16:17 -07:00
Larry Finger a96ae6f41c staging: r8723au: Fix sparse warnings in core/rtw_ap.c
The following warnings are fixed:

drivers/staging/rtl8723au/core/rtw_ap.c:79:23: warning: incorrect type in assignment (different base types)
drivers/staging/rtl8723au/core/rtw_ap.c:79:23:    expected unsigned short [unsigned] [usertype] tim_bitmap_le
drivers/staging/rtl8723au/core/rtw_ap.c:79:23:    got restricted __le16 [usertype] <noident>
drivers/staging/rtl8723au/core/rtw_ap.c:1441:37: warning: restricted __le16 degrades to integer

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-04-26 10:16:17 -07:00
Larry Finger c0b99bed16 staging: r8723au: Set undeclared routines to static
The following sparse warnings are fixed:

drivers/staging/rtl8723au/core/rtw_cmd.c:1211:6: warning: symbol 'dynamic_chk_wk_hdl' was not declared. Should it be static?
drivers/staging/rtl8723au/core/rtw_cmd.c:1238:6: warning: symbol 'lps_ctrl_wk_hdl' was not declared. Should it be static?
drivers/staging/rtl8723au/core/rtw_cmd.c:1812:6: warning: symbol 'rtw_getrttbl_cmd_cmdrsp_callback' was not declared. Should it be static?
drivers/staging/rtl8723au/core/rtw_mlme.c:364:6: warning: symbol 'rtw_free_network' was not declared. Should it be static?
drivers/staging/rtl8723au/core/rtw_mlme.c:373:6: warning: symbol 'rtw_free_network_nolock' was not declared. Should it be static?
drivers/staging/rtl8723au/core/rtw_mlme.c:631:6: warning: symbol 'rtw_add_network' was not declared. Should it be static?
drivers/staging/rtl8723au/core/rtw_mlme.c:644:5: warning: symbol 'rtw_is_desired_network' was not declared. Should it be static?
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:2246:5: warning: symbol 'DoReserved23a' was not declared. Should it be static?
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:5549:6: warning: symbol 'linked23a_rx_sig_stren_disp' was not declared. Should it be static?
drivers/staging/rtl8723au/core/rtw_pwrctrl.c:272:4: warning: symbol 'PS_RDY_CHECK' was not declared. Should it be static?
drivers/staging/rtl8723au/core/rtw_recv.c:1937:5: warning: symbol 'enqueue_reorder_recvframe23a' was not declared. Should it be static?
drivers/staging/rtl8723au/core/rtw_sta_mgt.c:24:6: warning: symbol '_rtw_init_stainfo' was not declared. Should it be static?
drivers/staging/rtl8723au/core/rtw_sta_mgt.c:112:6: warning: symbol 'rtw_mfree_all_stainfo' was not declared. Should it be static?
drivers/staging/rtl8723au/core/rtw_sta_mgt.c:127:6: warning: symbol 'rtw_mfree_sta_priv_lock' was not declared. Should it be static?
drivers/staging/rtl8723au/core/rtw_wlan_util.c:143:15: warning: symbol 'ratetbl_val_2wifirate' was not declared. Should it be static?
drivers/staging/rtl8723au/core/rtw_wlan_util.c:188:5: warning: symbol 'is_basicrate' was not declared. Should it be static?
drivers/staging/rtl8723au/core/rtw_wlan_util.c:206:14: warning: symbol 'ratetbl2rateset' was not declared. Should it be static?

Three of the above routines were not used and were deleted.

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-04-26 10:16:16 -07:00
Larry Finger 69d9ff1ac6 staging: r8723au: Fix endian errors in descriptor get and set macros
There are several macros used to get and set portions of the RX and TX descriptor
information that need to be converted to be endian correct. The following sparse
warnings are fixed:

drivers/staging/rtl8723au/core/rtw_mlme_ext.c:2477:9: warning: cast to restricted __le16
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:2477:9: warning: cast to restricted __le16
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:2479:9: warning: invalid assignment: &=
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:2479:9:    left side has type unsigned short
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:2479:9:    right side has type restricted __le16
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:2479:9: warning: invalid assignment: |=
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:2479:9:    left side has type unsigned short
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:2479:9:    right side has type restricted __le16
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:2649:9: warning: cast to restricted __le16
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:2649:9: warning: cast to restricted __le16
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:2651:9: warning: invalid assignment: &=
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:2651:9:    left side has type unsigned short
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:2651:9:    right side has type restricted __le16
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:2651:9: warning: invalid assignment: |=
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:2651:9:    left side has type unsigned short
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:2651:9:    right side has type restricted __le16
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:2863:9: warning: cast to restricted __le16
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:2863:9: warning: cast to restricted __le16
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:2865:9: warning: invalid assignment: &=
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:2865:9:    left side has type unsigned short
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:2865:9:    right side has type restricted __le16
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:2865:9: warning: invalid assignment: |=
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:2865:9:    left side has type unsigned short
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:2865:9:    right side has type restricted __le16
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:2996:9: warning: cast to restricted __le16
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:2996:9: warning: cast to restricted __le16
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:2998:9: warning: invalid assignment: &=
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:2998:9:    left side has type unsigned short
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:2998:9:    right side has type restricted __le16
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:2998:9: warning: invalid assignment: |=
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:2998:9:    left side has type unsigned short
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:2998:9:    right side has type restricted __le16
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:3105:25: warning: invalid assignment: |=
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:3105:25:    left side has type unsigned short
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:3105:25:    right side has type restricted __le16
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:3164:9: warning: cast to restricted __le16
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:3164:9: warning: cast to restricted __le16
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:3167:17: warning: invalid assignment: &=
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:3167:17:    left side has type unsigned short
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:3167:17:    right side has type restricted __le16
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:3167:17: warning: invalid assignment: |=
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:3167:17:    left side has type unsigned short
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:3167:17:    right side has type restricted __le16
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:3313:9: warning: cast to restricted __le16
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:3313:9: warning: cast to restricted __le16
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:3315:9: warning: invalid assignment: &=
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:3315:9:    left side has type unsigned short
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:3315:9:    right side has type restricted __le16
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:3315:9: warning: invalid assignment: |=
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:3315:9:    left side has type unsigned short
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:3315:9:    right side has type restricted __le16
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:3581:17: warning: invalid assignment: |=
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:3581:17:    left side has type unsigned short
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:3581:17:    right side has type restricted __le16
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:3583:17: warning: invalid assignment: |=
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:3583:17:    left side has type unsigned short
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:3583:17:    right side has type restricted __le16
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:3586:17: warning: invalid assignment: |=
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:3586:17:    left side has type unsigned short
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:3586:17:    right side has type restricted __le16
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:3592:9: warning: cast to restricted __le16
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:3592:9: warning: cast to restricted __le16
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:3594:9: warning: invalid assignment: &=
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:3594:9:    left side has type unsigned short
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:3594:9:    right side has type restricted __le16
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:3594:9: warning: invalid assignment: |=
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:3594:9:    left side has type unsigned short
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:3594:9:    right side has type restricted __le16
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:3702:17: warning: invalid assignment: |=
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:3702:17:    left side has type unsigned short
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:3702:17:    right side has type restricted __le16
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:3704:17: warning: invalid assignment: |=
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:3704:17:    left side has type unsigned short
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:3704:17:    right side has type restricted __le16
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:3707:17: warning: invalid assignment: |=
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:3707:17:    left side has type unsigned short
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:3707:17:    right side has type restricted __le16
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:3711:9: warning: invalid assignment: |=
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:3711:9:    left side has type unsigned short
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:3711:9:    right side has type restricted __le16
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:3713:9: warning: invalid assignment: |=
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:3713:9:    left side has type unsigned short
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:3713:9:    right side has type restricted __le16
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:3715:9: warning: invalid assignment: |=
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:3715:9:    left side has type unsigned short
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:3715:9:    right side has type restricted __le16
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:3721:9: warning: cast to restricted __le16
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:3721:9: warning: cast to restricted __le16
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:3723:9: warning: invalid assignment: &=
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:3723:9:    left side has type unsigned short
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:3723:9:    right side has type restricted __le16
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:3723:9: warning: invalid assignment: |=
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:3723:9:    left side has type unsigned short
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:3723:9:    right side has type restricted __le16
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:3827:9: warning: cast to restricted __le16
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:3827:9: warning: cast to restricted __le16
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:3829:9: warning: invalid assignment: &=
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:3829:9:    left side has type unsigned short
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:3829:9:    right side has type restricted __le16
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:3829:9: warning: invalid assignment: |=
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:3829:9:    left side has type unsigned short
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:3829:9:    right side has type restricted __le16
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:3938:9: warning: cast to restricted __le16
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:3938:9: warning: cast to restricted __le16
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:3940:9: warning: invalid assignment: &=
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:3940:9:    left side has type unsigned short
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:3940:9:    right side has type restricted __le16
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:3940:9: warning: invalid assignment: |=
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:3940:9:    left side has type unsigned short
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:3940:9:    right side has type restricted __le16
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:4010:9: warning: cast to restricted __le16
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:4010:9: warning: cast to restricted __le16
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:4012:9: warning: invalid assignment: &=
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:4012:9:    left side has type unsigned short
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:4012:9:    right side has type restricted __le16
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:4012:9: warning: invalid assignment: |=
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:4012:9:    left side has type unsigned short
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:4012:9:    right side has type restricted __le16
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:4199:9: warning: cast to restricted __le16
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:4199:9: warning: cast to restricted __le16
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:4201:9: warning: invalid assignment: &=
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:4201:9:    left side has type unsigned short
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:4201:9:    right side has type restricted __le16
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:4201:9: warning: invalid assignment: |=
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:4201:9:    left side has type unsigned short
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:4201:9:    right side has type restricted __le16
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:4509:28: warning: too many warnings
drivers/staging/rtl8723au/core/rtw_xmit.c:940:9: warning: invalid assignment: &=
drivers/staging/rtl8723au/core/rtw_xmit.c:940:9:    left side has type unsigned short
drivers/staging/rtl8723au/core/rtw_xmit.c:940:9:    right side has type restricted __le16
drivers/staging/rtl8723au/core/rtw_xmit.c:940:9: warning: invalid assignment: |=
drivers/staging/rtl8723au/core/rtw_xmit.c:940:9:    left side has type unsigned short
drivers/staging/rtl8723au/core/rtw_xmit.c:940:9:    right side has type restricted __le16
drivers/staging/rtl8723au/core/rtw_xmit.c:946:25: warning: invalid assignment: |=
drivers/staging/rtl8723au/core/rtw_xmit.c:946:25:    left side has type unsigned short
drivers/staging/rtl8723au/core/rtw_xmit.c:946:25:    right side has type restricted __le16
drivers/staging/rtl8723au/core/rtw_xmit.c:957:25: warning: invalid assignment: |=
drivers/staging/rtl8723au/core/rtw_xmit.c:957:25:    left side has type unsigned short
drivers/staging/rtl8723au/core/rtw_xmit.c:957:25:    right side has type restricted __le16
drivers/staging/rtl8723au/core/rtw_xmit.c:980:25: warning: invalid assignment: |=
drivers/staging/rtl8723au/core/rtw_xmit.c:980:25:    left side has type unsigned short
drivers/staging/rtl8723au/core/rtw_xmit.c:980:25:    right side has type restricted __le16
drivers/staging/rtl8723au/core/rtw_xmit.c:982:25: warning: invalid assignment: |=
drivers/staging/rtl8723au/core/rtw_xmit.c:982:25:    left side has type unsigned short
drivers/staging/rtl8723au/core/rtw_xmit.c:982:25:    right side has type restricted __le16
drivers/staging/rtl8723au/core/rtw_xmit.c:986:33: warning: invalid assignment: |=
drivers/staging/rtl8723au/core/rtw_xmit.c:986:33:    left side has type unsigned short
drivers/staging/rtl8723au/core/rtw_xmit.c:986:33:    right side has type restricted __le16
drivers/staging/rtl8723au/core/rtw_xmit.c:987:25: warning: invalid assignment: |=
drivers/staging/rtl8723au/core/rtw_xmit.c:987:25:    left side has type unsigned short
drivers/staging/rtl8723au/core/rtw_xmit.c:987:25:    right side has type restricted __le16
drivers/staging/rtl8723au/core/rtw_xmit.c:988:25: warning: invalid assignment: |=
drivers/staging/rtl8723au/core/rtw_xmit.c:988:25:    left side has type unsigned short
drivers/staging/rtl8723au/core/rtw_xmit.c:988:25:    right side has type restricted __le16
drivers/staging/rtl8723au/core/rtw_xmit.c:997:25: warning: cast to restricted __le16
drivers/staging/rtl8723au/core/rtw_xmit.c:997:25: warning: cast to restricted __le16
drivers/staging/rtl8723au/core/rtw_xmit.c:1176:17: warning: invalid assignment: |=
drivers/staging/rtl8723au/core/rtw_xmit.c:1176:17:    left side has type unsigned short
drivers/staging/rtl8723au/core/rtw_xmit.c:1176:17:    right side has type restricted __le16
drivers/staging/rtl8723au/core/rtw_xmit.c:1260:25: warning: invalid assignment: &=
drivers/staging/rtl8723au/core/rtw_xmit.c:1260:25:    left side has type unsigned short
drivers/staging/rtl8723au/core/rtw_xmit.c:1260:25:    right side has type fouled restricted __le16
drivers/staging/rtl8723au/hal/rtl8723a_cmd.c:224:9: warning: cast to restricted __le16
drivers/staging/rtl8723au/hal/rtl8723a_cmd.c:224:9: warning: cast to restricted __le16
drivers/staging/rtl8723au/hal/rtl8723a_cmd.c:226:9: warning: invalid assignment: &=
drivers/staging/rtl8723au/hal/rtl8723a_cmd.c:226:9:    left side has type unsigned short
drivers/staging/rtl8723au/hal/rtl8723a_cmd.c:226:9:    right side has type restricted __le16
drivers/staging/rtl8723au/hal/rtl8723a_cmd.c:226:9: warning: invalid assignment: |=
drivers/staging/rtl8723au/hal/rtl8723a_cmd.c:226:9:    left side has type unsigned short
drivers/staging/rtl8723au/hal/rtl8723a_cmd.c:226:9:    right side has type restricted __le16
drivers/staging/rtl8723au/hal/rtl8723a_cmd.c:316:9: warning: invalid assignment: |=
drivers/staging/rtl8723au/hal/rtl8723a_cmd.c:316:9:    left side has type unsigned short
drivers/staging/rtl8723au/hal/rtl8723a_cmd.c:316:9:    right side has type restricted __le16
drivers/staging/rtl8723au/hal/rtl8723a_cmd.c:317:9: warning: invalid assignment: &=
drivers/staging/rtl8723au/hal/rtl8723a_cmd.c:317:9:    left side has type unsigned short
drivers/staging/rtl8723au/hal/rtl8723a_cmd.c:317:9:    right side has type restricted __le16
drivers/staging/rtl8723au/hal/rtl8723a_cmd.c:317:9: warning: invalid assignment: |=
drivers/staging/rtl8723au/hal/rtl8723a_cmd.c:317:9:    left side has type unsigned short
drivers/staging/rtl8723au/hal/rtl8723a_cmd.c:317:9:    right side has type restricted __le16
drivers/staging/rtl8723au/hal/rtl8723a_cmd.c:320:9: warning: incorrect type in assignment (different base types)
drivers/staging/rtl8723au/hal/rtl8723a_cmd.c:320:9:    expected unsigned short [unsigned] [short] <noident>
drivers/staging/rtl8723au/hal/rtl8723a_cmd.c:320:9:    got restricted __le16 [usertype] <noident>
drivers/staging/rtl8723au/hal/rtl8723a_cmd.c:354:17: warning: invalid assignment: |=
drivers/staging/rtl8723au/hal/rtl8723a_cmd.c:354:17:    left side has type unsigned short
drivers/staging/rtl8723au/hal/rtl8723a_cmd.c:354:17:    right side has type restricted __le16
drivers/staging/rtl8723au/hal/rtl8723a_cmd.c:358:17: warning: invalid assignment: |=
drivers/staging/rtl8723au/hal/rtl8723a_cmd.c:358:17:    left side has type unsigned short
drivers/staging/rtl8723au/hal/rtl8723a_cmd.c:358:17:    right side has type restricted __le16
drivers/staging/rtl8723au/hal/rtl8723a_cmd.c:366:17: warning: invalid assignment: |=
drivers/staging/rtl8723au/hal/rtl8723a_cmd.c:366:17:    left side has type unsigned short
drivers/staging/rtl8723au/hal/rtl8723a_cmd.c:366:17:    right side has type restricted __le16
drivers/staging/rtl8723au/hal/rtl8723a_cmd.c:382:9: warning: cast to restricted __le16
drivers/staging/rtl8723au/hal/rtl8723a_cmd.c:382:9: warning: cast to restricted __le16
drivers/staging/rtl8723au/hal/rtl8723a_cmd.c:387:17: warning: invalid assignment: &=
drivers/staging/rtl8723au/hal/rtl8723a_cmd.c:387:17:    left side has type unsigned short
drivers/staging/rtl8723au/hal/rtl8723a_cmd.c:387:17:    right side has type restricted __le16
drivers/staging/rtl8723au/hal/rtl8723a_cmd.c:387:17: warning: invalid assignment: |=
drivers/staging/rtl8723au/hal/rtl8723a_cmd.c:387:17:    left side has type unsigned short
drivers/staging/rtl8723au/hal/rtl8723a_cmd.c:387:17:    right side has type restricted __le16
drivers/staging/rtl8723au/hal/rtl8723a_cmd.c:390:17: warning: invalid assignment: |=
drivers/staging/rtl8723au/hal/rtl8723a_cmd.c:390:17:    left side has type unsigned short
drivers/staging/rtl8723au/hal/rtl8723a_cmd.c:390:17:    right side has type restricted __le16
drivers/staging/rtl8723au/hal/rtl8723a_cmd.c:391:17: warning: invalid assignment: |=
drivers/staging/rtl8723au/hal/rtl8723a_cmd.c:391:17:    left side has type unsigned short
drivers/staging/rtl8723au/hal/rtl8723a_cmd.c:391:17:    right side has type restricted __le16
drivers/staging/rtl8723au/hal/rtl8723a_cmd.c:395:17: warning: invalid assignment: &=
drivers/staging/rtl8723au/hal/rtl8723a_cmd.c:395:17:    left side has type unsigned short
drivers/staging/rtl8723au/hal/rtl8723a_cmd.c:395:17:    right side has type restricted __le16
drivers/staging/rtl8723au/hal/rtl8723a_cmd.c:395:17: warning: invalid assignment: |=
drivers/staging/rtl8723au/hal/rtl8723a_cmd.c:395:17:    left side has type unsigned short
drivers/staging/rtl8723au/hal/rtl8723a_cmd.c:395:17:    right side has type restricted __le16
drivers/staging/rtl8723au/hal/rtl8723a_cmd.c:426:9: warning: cast to restricted __le16
drivers/staging/rtl8723au/hal/rtl8723a_cmd.c:426:9: warning: cast to restricted __le16
drivers/staging/rtl8723au/hal/rtl8723a_cmd.c:427:9: warning: invalid assignment: &=
drivers/staging/rtl8723au/hal/rtl8723a_cmd.c:427:9:    left side has type unsigned short
drivers/staging/rtl8723au/hal/rtl8723a_cmd.c:427:9:    right side has type restricted __le16
drivers/staging/rtl8723au/hal/rtl8723a_cmd.c:427:9: warning: invalid assignment: |=
drivers/staging/rtl8723au/hal/rtl8723a_cmd.c:427:9:    left side has type unsigned short
drivers/staging/rtl8723au/hal/rtl8723a_cmd.c:427:9:    right side has type restricted __le16
drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c:319:9: warning: cast to restricted __le16
drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c:319:9: warning: cast to restricted __le16
drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c:323:17: warning: invalid assignment: &=
drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c:323:17:    left side has type unsigned short
drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c:323:17:    right side has type restricted __le16
drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c:323:17: warning: invalid assignment: |=
drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c:323:17:    left side has type unsigned short
drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c:323:17:    right side has type restricted __le16
drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c:326:17: warning: invalid assignment: &=
drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c:326:17:    left side has type unsigned short
drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c:326:17:    right side has type restricted __le16
drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c:326:17: warning: invalid assignment: |=
drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c:326:17:    left side has type unsigned short
drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c:326:17:    right side has type restricted __le16
drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c:2368:9: warning: cast to restricted __le16
drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c:2368:9: warning: cast to restricted __le16
drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c:2370:9: warning: invalid assignment: &=
drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c:2370:9:    left side has type unsigned short
drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c:2370:9:    right side has type restricted __le16
drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c:2370:9: warning: invalid assignment: |=
drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c:2370:9:    left side has type unsigned short
drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c:2370:9:    right side has type restricted __le16

The following new warnings were temporarily added:

drivers/staging/rtl8723au/core/rtw_mlme_ext.c:4509:28: warning: incorrect type in assignment (different base types)
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:4509:28:    expected unsigned short [unsigned] [assigned] [usertype] capab_info
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:4509:28:    got restricted __le16 [usertype] capab_info
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:4612:17: warning: cast to restricted __le32
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:5549:6: warning: symbol 'linked23a_rx_sig_stren_disp' was not declared. Should it be static?

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-04-26 10:16:16 -07:00
Larry Finger 74714a59ca staging: r8723au: Fix endian issues in hal/rtl8723au_recv.c
The following sparse warnings are fixed:

drivers/staging/rtl8723au/hal/rtl8723au_recv.c:145:22: warning: incorrect type in assignment (different base types)
drivers/staging/rtl8723au/hal/rtl8723au_recv.c:145:22:    expected restricted __le32 [usertype] rxdw0
drivers/staging/rtl8723au/hal/rtl8723au_recv.c:145:22:    got unsigned int [unsigned] [usertype] <noident>
drivers/staging/rtl8723au/hal/rtl8723au_recv.c:146:22: warning: incorrect type in assignment (different base types)
drivers/staging/rtl8723au/hal/rtl8723au_recv.c:146:22:    expected restricted __le32 [usertype] rxdw1
drivers/staging/rtl8723au/hal/rtl8723au_recv.c:146:22:    got unsigned int [unsigned] [usertype] <noident>
drivers/staging/rtl8723au/hal/rtl8723au_recv.c:147:22: warning: incorrect type in assignment (different base types)
drivers/staging/rtl8723au/hal/rtl8723au_recv.c:147:22:    expected restricted __le32 [usertype] rxdw2
drivers/staging/rtl8723au/hal/rtl8723au_recv.c:147:22:    got unsigned int [unsigned] [usertype] <noident>
drivers/staging/rtl8723au/hal/rtl8723au_recv.c:148:22: warning: incorrect type in assignment (different base types)
drivers/staging/rtl8723au/hal/rtl8723au_recv.c:148:22:    expected restricted __le32 [usertype] rxdw3
drivers/staging/rtl8723au/hal/rtl8723au_recv.c:148:22:    got unsigned int [unsigned] [usertype] <noident>
drivers/staging/rtl8723au/hal/rtl8723au_recv.c:149:22: warning: incorrect type in assignment (different base types)
drivers/staging/rtl8723au/hal/rtl8723au_recv.c:149:22:    expected restricted __le32 [usertype] rxdw4
drivers/staging/rtl8723au/hal/rtl8723au_recv.c:149:22:    got unsigned int [unsigned] [usertype] <noident>
drivers/staging/rtl8723au/hal/rtl8723au_recv.c:150:22: warning: incorrect type in assignment (different base types)
drivers/staging/rtl8723au/hal/rtl8723au_recv.c:150:22:    expected restricted __le32 [usertype] rxdw5
drivers/staging/rtl8723au/hal/rtl8723au_recv.c:150:22:    got unsigned int [unsigned] [usertype] <noident>

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-04-26 10:16:16 -07:00
Larry Finger caa90ab1a9 staging: r8723au: Fix endian issues with TX and RX descriptors
All descriptors are __le32, not unsigned int. The following sparse warnings are fixed:

drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c:2626:24: warning: invalid assignment: &=
drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c:2626:24:    left side has type unsigned int
drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c:2626:24:    right side has type restricted __le32
drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c:2632:24: warning: invalid assignment: |=
drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c:2632:24:    left side has type unsigned int
drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c:2632:24:    right side has type restricted __le32
drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c:2873:22: warning: incorrect type in assignment (different base types)
drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c:2873:22:    expected unsigned int [unsigned] txdw0
drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c:2873:22:    got restricted __le32 [usertype] <noident>
drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c:2874:22: warning: incorrect type in assignment (different base types)
drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c:2874:22:    expected unsigned int [unsigned] txdw1
drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c:2874:22:    got restricted __le32 [usertype] <noident>
drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c:2875:22: warning: incorrect type in assignment (different base types)
drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c:2875:22:    expected unsigned int [unsigned] txdw2
drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c:2875:22:    got restricted __le32 [usertype] <noident>
drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c:2876:22: warning: incorrect type in assignment (different base types)
drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c:2876:22:    expected unsigned int [unsigned] txdw3
drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c:2876:22:    got restricted __le32 [usertype] <noident>
drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c:2877:22: warning: incorrect type in assignment (different base types)
drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c:2877:22:    expected unsigned int [unsigned] txdw4
drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c:2877:22:    got restricted __le32 [usertype] <noident>
drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c:2878:22: warning: incorrect type in assignment (different base types)
drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c:2878:22:    expected unsigned int [unsigned] txdw5
drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c:2878:22:    got restricted __le32 [usertype] <noident>
drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c:2879:22: warning: incorrect type in assignment (different base types)
drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c:2879:22:    expected unsigned int [unsigned] txdw6
drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c:2879:22:    got restricted __le32 [usertype] <noident>
drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c:2880:22: warning: incorrect type in assignment (different base types)
drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c:2880:22:    expected unsigned int [unsigned] txdw7
drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c:2880:22:    got restricted __le32 [usertype] <noident>
drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c:2903:24: warning: invalid assignment: |=
drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c:2903:24:    left side has type unsigned int
drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c:2903:24:    right side has type restricted __le32
drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c:2906:24: warning: invalid assignment: |=
drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c:2906:24:    left side has type unsigned int
drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c:2906:24:    right side has type restricted __le32
drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c:2910:24: warning: invalid assignment: |=
drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c:2910:24:    left side has type unsigned int
drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c:2910:24:    right side has type restricted __le32
drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c:2914:24: warning: invalid assignment: |=
drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c:2914:24:    left side has type unsigned int
drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c:2914:24:    right side has type restricted __le32
drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c:2919:32: warning: invalid assignment: |=
drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c:2919:32:    left side has type unsigned int
drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c:2919:32:    right side has type restricted __le32
drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c:2922:32: warning: invalid assignment: |=
drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c:2922:32:    left side has type unsigned int
drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c:2922:32:    right side has type restricted __le32
drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c:2924:32: warning: invalid assignment: |=
drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c:2924:32:    left side has type unsigned int
drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c:2924:32:    right side has type restricted __le32
drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c:2928:32: warning: invalid assignment: |=
drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c:2928:32:    left side has type unsigned int
drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c:2928:32:    right side has type restricted __le32
drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c:2932:24: warning: invalid assignment: |=
drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c:2932:24:    left side has type unsigned int
drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c:2932:24:    right side has type restricted __le32
drivers/staging/rtl8723au/hal/rtl8723au_recv.c:145:24: warning: cast to restricted __le32
drivers/staging/rtl8723au/hal/rtl8723au_recv.c:146:24: warning: cast to restricted __le32
drivers/staging/rtl8723au/hal/rtl8723au_recv.c:147:24: warning: cast to restricted __le32
drivers/staging/rtl8723au/hal/rtl8723au_recv.c:148:24: warning: cast to restricted __le32
drivers/staging/rtl8723au/hal/rtl8723au_recv.c:149:24: warning: cast to restricted __le32
drivers/staging/rtl8723au/hal/rtl8723au_recv.c:150:24: warning: cast to restricted __le32
drivers/staging/rtl8723au/hal/rtl8723au_xmit.c:77:32: warning: invalid assignment: &=
drivers/staging/rtl8723au/hal/rtl8723au_xmit.c:77:32:    left side has type unsigned int
drivers/staging/rtl8723au/hal/rtl8723au_xmit.c:77:32:    right side has type restricted __le32
drivers/staging/rtl8723au/hal/rtl8723au_xmit.c:82:32: warning: invalid assignment: |=
drivers/staging/rtl8723au/hal/rtl8723au_xmit.c:82:32:    left side has type unsigned int
drivers/staging/rtl8723au/hal/rtl8723au_xmit.c:82:32:    right side has type restricted __le32
drivers/staging/rtl8723au/hal/rtl8723au_xmit.c:92:40: warning: invalid assignment: |=
drivers/staging/rtl8723au/hal/rtl8723au_xmit.c:92:40:    left side has type unsigned int
drivers/staging/rtl8723au/hal/rtl8723au_xmit.c:92:40:    right side has type restricted __le32
drivers/staging/rtl8723au/hal/rtl8723au_xmit.c:97:40: warning: invalid assignment: |=
drivers/staging/rtl8723au/hal/rtl8723au_xmit.c:97:40:    left side has type unsigned int
drivers/staging/rtl8723au/hal/rtl8723au_xmit.c:97:40:    right side has type restricted __le32
drivers/staging/rtl8723au/hal/rtl8723au_xmit.c💯40: warning: invalid assignment: |=
drivers/staging/rtl8723au/hal/rtl8723au_xmit.c💯40:    left side has type unsigned int
drivers/staging/rtl8723au/hal/rtl8723au_xmit.c💯40:    right side has type restricted __le32
drivers/staging/rtl8723au/hal/rtl8723au_xmit.c:183:32: warning: invalid assignment: |=
drivers/staging/rtl8723au/hal/rtl8723au_xmit.c:183:32:    left side has type unsigned int
drivers/staging/rtl8723au/hal/rtl8723au_xmit.c:183:32:    right side has type restricted __le32
drivers/staging/rtl8723au/hal/rtl8723au_xmit.c:186:32: warning: invalid assignment: |=
drivers/staging/rtl8723au/hal/rtl8723au_xmit.c:186:32:    left side has type unsigned int
drivers/staging/rtl8723au/hal/rtl8723au_xmit.c:186:32:    right side has type restricted __le32
drivers/staging/rtl8723au/hal/rtl8723au_xmit.c:188:32: warning: invalid assignment: |=
drivers/staging/rtl8723au/hal/rtl8723au_xmit.c:188:32:    left side has type unsigned int
drivers/staging/rtl8723au/hal/rtl8723au_xmit.c:188:32:    right side has type restricted __le32
drivers/staging/rtl8723au/hal/rtl8723au_xmit.c:193:40: warning: invalid assignment: |=
drivers/staging/rtl8723au/hal/rtl8723au_xmit.c:193:40:    left side has type unsigned int
drivers/staging/rtl8723au/hal/rtl8723au_xmit.c:193:40:    right side has type restricted __le32
drivers/staging/rtl8723au/hal/rtl8723au_xmit.c:195:40: warning: invalid assignment: |=
drivers/staging/rtl8723au/hal/rtl8723au_xmit.c:195:40:    left side has type unsigned int
drivers/staging/rtl8723au/hal/rtl8723au_xmit.c:195:40:    right side has type restricted __le32
drivers/staging/rtl8723au/hal/rtl8723au_xmit.c:200:32: warning: invalid assignment: |=
drivers/staging/rtl8723au/hal/rtl8723au_xmit.c:200:32:    left side has type unsigned int
drivers/staging/rtl8723au/hal/rtl8723au_xmit.c:200:32:    right side has type restricted __le32
drivers/staging/rtl8723au/hal/rtl8723au_xmit.c:204:40: warning: invalid assignment: |=
drivers/staging/rtl8723au/hal/rtl8723au_xmit.c:204:40:    left side has type unsigned int
drivers/staging/rtl8723au/hal/rtl8723au_xmit.c:204:40:    right side has type restricted __le32
drivers/staging/rtl8723au/hal/rtl8723au_xmit.c:214:40: warning: invalid assignment: |=
drivers/staging/rtl8723au/hal/rtl8723au_xmit.c:214:40:    left side has type unsigned int
drivers/staging/rtl8723au/hal/rtl8723au_xmit.c:214:40:    right side has type restricted __le32
drivers/staging/rtl8723au/hal/rtl8723au_xmit.c:215:40: warning: invalid assignment: |=
drivers/staging/rtl8723au/hal/rtl8723au_xmit.c:215:40:    left side has type unsigned int
drivers/staging/rtl8723au/hal/rtl8723au_xmit.c:215:40:    right side has type restricted __le32
drivers/staging/rtl8723au/hal/rtl8723au_xmit.c:218:40: warning: invalid assignment: |=
drivers/staging/rtl8723au/hal/rtl8723au_xmit.c:218:40:    left side has type unsigned int
drivers/staging/rtl8723au/hal/rtl8723au_xmit.c:218:40:    right side has type restricted __le32
drivers/staging/rtl8723au/hal/rtl8723au_xmit.c:224:40: warning: invalid assignment: |=
drivers/staging/rtl8723au/hal/rtl8723au_xmit.c:224:40:    left side has type unsigned int
drivers/staging/rtl8723au/hal/rtl8723au_xmit.c:224:40:    right side has type restricted __le32
drivers/staging/rtl8723au/hal/rtl8723au_xmit.c:226:40: warning: invalid assignment: |=
drivers/staging/rtl8723au/hal/rtl8723au_xmit.c:226:40:    left side has type unsigned int
drivers/staging/rtl8723au/hal/rtl8723au_xmit.c:226:40:    right side has type restricted __le32
drivers/staging/rtl8723au/hal/rtl8723au_xmit.c:229:48: warning: invalid assignment: |=
drivers/staging/rtl8723au/hal/rtl8723au_xmit.c:229:48:    left side has type unsigned int
drivers/staging/rtl8723au/hal/rtl8723au_xmit.c:229:48:    right side has type restricted __le32
drivers/staging/rtl8723au/hal/rtl8723au_xmit.c:231:40: warning: invalid assignment: |=
drivers/staging/rtl8723au/hal/rtl8723au_xmit.c:231:40:    left side has type unsigned int
drivers/staging/rtl8723au/hal/rtl8723au_xmit.c:231:40:    right side has type restricted __le32
drivers/staging/rtl8723au/hal/rtl8723au_xmit.c:235:32: warning: invalid assignment: |=
drivers/staging/rtl8723au/hal/rtl8723au_xmit.c:235:32:    left side has type unsigned int
drivers/staging/rtl8723au/hal/rtl8723au_xmit.c:235:32:    right side has type restricted __le32
drivers/staging/rtl8723au/hal/rtl8723au_xmit.c:238:32: warning: invalid assignment: |=
drivers/staging/rtl8723au/hal/rtl8723au_xmit.c:238:32:    left side has type unsigned int
drivers/staging/rtl8723au/hal/rtl8723au_xmit.c:238:32:    right side has type restricted __le32
drivers/staging/rtl8723au/hal/rtl8723au_xmit.c:240:32: warning: invalid assignment: |=
drivers/staging/rtl8723au/hal/rtl8723au_xmit.c:240:32:    left side has type unsigned int
drivers/staging/rtl8723au/hal/rtl8723au_xmit.c:240:32:    right side has type restricted __le32
drivers/staging/rtl8723au/hal/rtl8723au_xmit.c:245:40: warning: invalid assignment: |=
drivers/staging/rtl8723au/hal/rtl8723au_xmit.c:245:40:    left side has type unsigned int
drivers/staging/rtl8723au/hal/rtl8723au_xmit.c:245:40:    right side has type restricted __le32
drivers/staging/rtl8723au/hal/rtl8723au_xmit.c:248:32: warning: invalid assignment: |=
drivers/staging/rtl8723au/hal/rtl8723au_xmit.c:248:32:    left side has type unsigned int
drivers/staging/rtl8723au/hal/rtl8723au_xmit.c:248:32:    right side has type restricted __le32
drivers/staging/rtl8723au/hal/rtl8723au_xmit.c:251:32: warning: invalid assignment: |=
drivers/staging/rtl8723au/hal/rtl8723au_xmit.c:251:32:    left side has type unsigned int
drivers/staging/rtl8723au/hal/rtl8723au_xmit.c:251:32:    right side has type restricted __le32
drivers/staging/rtl8723au/hal/rtl8723au_xmit.c:254:32: warning: invalid assignment: |=
drivers/staging/rtl8723au/hal/rtl8723au_xmit.c:254:32:    left side has type unsigned int
drivers/staging/rtl8723au/hal/rtl8723au_xmit.c:254:32:    right side has type restricted __le32
drivers/staging/rtl8723au/hal/rtl8723au_xmit.c:255:32: warning: invalid assignment: |=
drivers/staging/rtl8723au/hal/rtl8723au_xmit.c:255:32:    left side has type unsigned int
drivers/staging/rtl8723au/hal/rtl8723au_xmit.c:255:32:    right side has type restricted __le32
drivers/staging/rtl8723au/hal/rtl8723au_xmit.c:257:32: warning: invalid assignment: |=
drivers/staging/rtl8723au/hal/rtl8723au_xmit.c:257:32:    left side has type unsigned int
drivers/staging/rtl8723au/hal/rtl8723au_xmit.c:257:32:    right side has type restricted __le32
drivers/staging/rtl8723au/hal/rtl8723au_xmit.c:264:32: warning: invalid assignment: |=
drivers/staging/rtl8723au/hal/rtl8723au_xmit.c:264:32:    left side has type unsigned int
drivers/staging/rtl8723au/hal/rtl8723au_xmit.c:264:32:    right side has type restricted __le32
drivers/staging/rtl8723au/hal/rtl8723au_xmit.c:266:32: warning: invalid assignment: |=
drivers/staging/rtl8723au/hal/rtl8723au_xmit.c:266:32:    left side has type unsigned int
drivers/staging/rtl8723au/hal/rtl8723au_xmit.c:266:32:    right side has type restricted __le32
drivers/staging/rtl8723au/hal/rtl8723au_xmit.c:271:32: warning: invalid assignment: |=
drivers/staging/rtl8723au/hal/rtl8723au_xmit.c:271:32:    left side has type unsigned int
drivers/staging/rtl8723au/hal/rtl8723au_xmit.c:271:32:    right side has type restricted __le32
drivers/staging/rtl8723au/hal/rtl8723au_xmit.c:274:32: warning: invalid assignment: |=
drivers/staging/rtl8723au/hal/rtl8723au_xmit.c:274:32:    left side has type unsigned int
drivers/staging/rtl8723au/hal/rtl8723au_xmit.c:274:32:    right side has type restricted __le32
drivers/staging/rtl8723au/hal/rtl8723au_xmit.c:277:32: warning: invalid assignment: |=
drivers/staging/rtl8723au/hal/rtl8723au_xmit.c:277:32:    left side has type unsigned int
drivers/staging/rtl8723au/hal/rtl8723au_xmit.c:277:32:    right side has type restricted __le32
drivers/staging/rtl8723au/hal/rtl8723au_xmit.c:288:32: warning: invalid assignment: |=
drivers/staging/rtl8723au/hal/rtl8723au_xmit.c:288:32:    left side has type unsigned int
drivers/staging/rtl8723au/hal/rtl8723au_xmit.c:288:32:    right side has type restricted __le32
drivers/staging/rtl8723au/hal/rtl8723au_xmit.c:290:32: warning: invalid assignment: |=
drivers/staging/rtl8723au/hal/rtl8723au_xmit.c:290:32:    left side has type unsigned int
drivers/staging/rtl8723au/hal/rtl8723au_xmit.c:290:32:    right side has type restricted __le32
drivers/staging/rtl8723au/hal/rtl8723au_xmit.c:294:24: warning: invalid assignment: |=
drivers/staging/rtl8723au/hal/rtl8723au_xmit.c:294:24:    left side has type unsigned int
drivers/staging/rtl8723au/hal/rtl8723au_xmit.c:294:24:    right side has type restricted __le32
drivers/staging/rtl8723au/hal/rtl8723au_xmit.c:295:24: warning: invalid assignment: |=
drivers/staging/rtl8723au/hal/rtl8723au_xmit.c:295:24:    left side has type unsigned int
drivers/staging/rtl8723au/hal/rtl8723au_xmit.c:295:24:    right side has type restricted __le32
drivers/staging/rtl8723au/hal/rtl8723au_xmit.c:296:24: warning: invalid assignment: |=
drivers/staging/rtl8723au/hal/rtl8723au_xmit.c:296:24:    left side has type unsigned int
drivers/staging/rtl8723au/hal/rtl8723au_xmit.c:296:24:    right side has type restricted __le32
drivers/staging/rtl8723au/hal/rtl8723au_xmit.c:299:32: warning: invalid assignment: |=
drivers/staging/rtl8723au/hal/rtl8723au_xmit.c:299:32:    left side has type unsigned int
drivers/staging/rtl8723au/hal/rtl8723au_xmit.c:299:32:    right side has type restricted __le32
drivers/staging/rtl8723au/hal/rtl8723au_xmit.c:306:32: warning: invalid assignment: |=
drivers/staging/rtl8723au/hal/rtl8723au_xmit.c:306:32:    left side has type unsigned int
drivers/staging/rtl8723au/hal/rtl8723au_xmit.c:306:32:    right side has type restricted __le32
drivers/staging/rtl8723au/hal/usb_ops_linux.c:473:20: warning: cast to restricted __le32
drivers/staging/rtl8723au/hal/usb_ops_linux.c:590:36: warning: cast to restricted __le32

The following new warnings are temporarily added:

drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c:2873:24: warning: cast from restricted __le32
drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c:2874:24: warning: cast from restricted __le32
drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c:2875:24: warning: cast from restricted __le32
drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c:2876:24: warning: cast from restricted __le32
drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c:2877:24: warning: cast from restricted __le32
drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c:2878:24: warning: cast from restricted __le32
drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c:2879:24: warning: cast from restricted __le32
drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c:2880:24: warning: cast from restricted __le32
drivers/staging/rtl8723au/hal/rtl8723au_recv.c:145:22: warning: incorrect type in assignment (different base types)
drivers/staging/rtl8723au/hal/rtl8723au_recv.c:145:22:    expected restricted __le32 [usertype] rxdw0
drivers/staging/rtl8723au/hal/rtl8723au_recv.c:145:22:    got unsigned int [unsigned] [usertype] <noident>
drivers/staging/rtl8723au/hal/rtl8723au_recv.c:146:22: warning: incorrect type in assignment (different base types)
drivers/staging/rtl8723au/hal/rtl8723au_recv.c:146:22:    expected restricted __le32 [usertype] rxdw1
drivers/staging/rtl8723au/hal/rtl8723au_recv.c:146:22:    got unsigned int [unsigned] [usertype] <noident>
drivers/staging/rtl8723au/hal/rtl8723au_recv.c:147:22: warning: incorrect type in assignment (different base types)
drivers/staging/rtl8723au/hal/rtl8723au_recv.c:147:22:    expected restricted __le32 [usertype] rxdw2
drivers/staging/rtl8723au/hal/rtl8723au_recv.c:147:22:    got unsigned int [unsigned] [usertype] <noident>
drivers/staging/rtl8723au/hal/rtl8723au_recv.c:148:22: warning: incorrect type in assignment (different base types)
drivers/staging/rtl8723au/hal/rtl8723au_recv.c:148:22:    expected restricted __le32 [usertype] rxdw3
drivers/staging/rtl8723au/hal/rtl8723au_recv.c:148:22:    got unsigned int [unsigned] [usertype] <noident>
drivers/staging/rtl8723au/hal/rtl8723au_recv.c:149:22: warning: incorrect type in assignment (different base types)
drivers/staging/rtl8723au/hal/rtl8723au_recv.c:149:22:    expected restricted __le32 [usertype] rxdw4
drivers/staging/rtl8723au/hal/rtl8723au_recv.c:149:22:    got unsigned int [unsigned] [usertype] <noident>
drivers/staging/rtl8723au/hal/rtl8723au_recv.c:150:22: warning: incorrect type in assignment (different base types)
drivers/staging/rtl8723au/hal/rtl8723au_recv.c:150:22:    expected restricted __le32 [usertype] rxdw5
drivers/staging/rtl8723au/hal/rtl8723au_recv.c:150:22:    got unsigned int [unsigned] [usertype] <noident>
drivers/staging/rtl8723au/hal/rtl8723au_xmit.c:211:51: warning: incorrect type in argument 2 (different base types)
drivers/staging/rtl8723au/hal/rtl8723au_xmit.c:211:51:    expected unsigned int [usertype] *pdw
drivers/staging/rtl8723au/hal/rtl8723au_xmit.c:211:51:    got restricted __le32 *<noident>
drivers/staging/rtl8723au/hal/rtl8723au_xmit.c:212:51: warning: incorrect type in argument 2 (different base types)
drivers/staging/rtl8723au/hal/rtl8723au_xmit.c:212:51:    expected unsigned int [usertype] *pdw
drivers/staging/rtl8723au/hal/rtl8723au_xmit.c:212:51:    got restricted __le32 *<noident>

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-04-26 10:16:16 -07:00
Larry Finger 73302d7f74 staging: r8723au: Fix sparse warning in os_dep/os_intfs.c
Sparse reports the following:

drivers/staging/rtl8723au/os_dep/os_intfs.c:321:14: warning: restricted __be16 degrades to integer

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-04-26 10:16:16 -07:00
Larry Finger fecb32d446 staging: r8723au: Fix sparse errors in os_dep/osdep_service.c
Sparse reports

drivers/staging/rtl8723au/os_dep/osdep_service.c:24:20: error: Bad character constant
drivers/staging/rtl8723au/os_dep/osdep_service.c:25:0: error: Bad character constant

The constant in question is never used.

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-04-26 10:16:15 -07:00
Jes Sorensen 4d435952bd staging: rtl8723au: Make some of the bt-coexist code less unreadable
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-26 10:16:15 -07:00
Jes Sorensen 7d620c81fa staging: rtl8723au: rtw_set_802_11_infrastructure_mode23a(): Make it readable
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-26 10:16:15 -07:00
Jes Sorensen 520179558a staging: rtl8723au: Remove unnecessary typecasts of struct wlan_bssid_ex objects
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-26 10:16:15 -07:00
Jes Sorensen aab26454e9 staging: rtl8723au: rtw_createbss_cmd23a(): Remove unnecessary typecast
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-26 10:16:15 -07:00
Jes Sorensen ea4190b163 staging: rtl8723au: rtw_joinbss_cmd23a(): Remove unnecessary typecast
and remove use-once variable t_len.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-26 10:16:15 -07:00
Jes Sorensen 0348dc74f6 staging: rtl8723au: Preserve const attribute of cmd handler argument
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-26 10:16:14 -07:00
Jes Sorensen b25b7b32ec staging: rtl8723au: Make cmd handlers take a const u8 * as their data argument
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-26 10:16:14 -07:00
Jes Sorensen cd190293d6 staging: rtl8723au: Remove unused #define FREE_CMDOBJ_SZ
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-26 10:16:14 -07:00
Jes Sorensen 9e8ccf78de staging: rtl8723au: Remove unused list_head from struct cmd_obj
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-26 10:16:14 -07:00
Jes Sorensen b1d49bd427 staging: rtl8723au: Remove obsolete header file cmd_osdep.h
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-26 10:16:14 -07:00
Jes Sorensen ab033fdb26 staging: rtl8723au: Fold _rtw_init_evt_priv23a() into rtw_init_evt_priv23a()
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-26 10:16:13 -07:00
Jes Sorensen fc8ae7e548 staging: rtl8723au: Fold _rtw_free_evt_priv23a() into rtw_free_evt_priv23a()
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-26 10:16:13 -07:00
Jes Sorensen f39a3d1598 staging: rtl8723au: Fold _rtw_free_cmd_priv23a() into rtw_free_cmd_priv23a()
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-26 10:16:13 -07:00
Jes Sorensen fdedd9fab0 staging: rtl8723au: Remove obsolete hal thread handling code
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-26 10:16:13 -07:00
Jes Sorensen d97e2d2b55 staging: rtl8723au: Use a workqueue for command handling
Rewrite the old thread based code to use a workqueue instead. This
removes a pile of complexity, locks and queues and eliminates problem
that cmd handling could have been killed from userspace.

This was suggested by Tejun Heo - thanks!

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-26 10:16:13 -07:00
Jes Sorensen 6f1c59bf2c staging: rtl8723au: cfg80211_rtw_add_key() return -ENOMEM on kmalloc failure
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-26 10:16:13 -07:00
Jes Sorensen f844717c6a staging: rtl8723au: rtw_cfg80211_inform_bss() fix Smatch warning
Check the size of pnetwork->network.IELenght correctly to avoid Smatch
warning.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-26 10:16:12 -07:00
Jes Sorensen fbde412917 staging: rtl8723au: c2h_wk_callback(): Use GFP_KERNEL, and check return value
It is safe to use GFP_KERNEL in a workqueue handler, and check the
return value. If the malloc fails, skip and try again.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-26 10:16:12 -07:00
Jes Sorensen 8282aeb63f staging: rtl8723au: rtw_check_beacon_data23a(): Make len unsigned int
Making len unsigned int fixes a warning caused by smatch getting
confused that len could be negative.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-26 10:16:12 -07:00
Jes Sorensen 17979959ba staging: rtl8723au: process_80211d(): Fix order of advancing array pos
Fix smatch warning from advancing array index before reading out the
value of the array.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-26 10:16:12 -07:00
Jes Sorensen 79a76349d5 staging: rtl8723au: collect_bss_info23a(): Eliminate smatch warning
Make length an unsigned int. This should avoid Smatch warning that
'length' can go negative.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-26 10:16:12 -07:00
Jes Sorensen 0b682c9bb6 staging: rtl8723au: Fix incorrect pointer test introduced in previous commit
Commit da290c5461 inverted the check of
the return value when converting to use cfg80211_find_ie().

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-26 10:16:12 -07:00
Jes Sorensen 5bd28bc2e4 staging: rtl8723au: Check kmalloc return value and fix size of memcpy()
Check kmalloc() return before dereferencing bssid in
rtw_check_bcn_info23a() and use the correct size to copy
rtw_basic_rate_ofdm in update_bmc_sta_support_rate23a()

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-26 10:16:11 -07:00
Greg Kroah-Hartman 3eb9992caf Merge 3.15-rc2 into staging-next
This resolves a bunch of merge errors with other fixes that are already
in Linus's tree.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-22 10:08:40 -07:00
Geert Uytterhoeven 2c33d7cc38 staging: r8723au: Add missing initialization of change_inx in sort algorithm
drivers/staging/rtl8723au/core/rtw_wlan_util.c: In function ‘WMMOnAssocRsp23a’:
drivers/staging/rtl8723au/core/rtw_wlan_util.c:684: warning: ‘change_inx’ may be used uninitialized in this function

Depending on the uninitialized data on the stack, the array may not be
sorted correctly.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-16 11:41:45 -07:00
Jes Sorensen f5d197b614 staging: rtl8723au: Fix buffer overflow in rtw_get_wfd_ie()
Add bounds checking to not allow WFD Information Elements larger than
128, and make sure we use the correct buffer size MAX_WFD_IE_LEN
instea of hardcoding the size.

This also simplifies rtw_get_wfd_ie() by using the cfg80211
infrastructure.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-15 15:34:40 -07:00
Jes Sorensen dff222670e staging: rtl8723au: Make _rtw_free_network23() static
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-15 11:04:10 -07:00
Jes Sorensen a9339fdd13 staging: rtl8723au: Remove bogus inline from rtw_set_roaming() prototype
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-15 11:04:09 -07:00
Jes Sorensen afa7e480a9 staging: rtl8723au: Move rtw23a_roaming() so we can declare _rtw_roaming() static
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-15 11:04:09 -07:00
Jes Sorensen d944b7218b staging: rtl8723au: collect_bss_info23a(): Use struct ieee80211_mgmt
Somplify code by using struct ieee80211_mgmt to calculate offsets

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-15 11:04:09 -07:00
Jes Sorensen 7ca9ed219b staging: rtl8723au: Remove unused function rtw_get_timestampe_from_ie23a()
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-15 11:04:09 -07:00
Jes Sorensen e418361c5b staging: rtl8723au: Fold _rtw_free_mlme_priv23a() into rtw_free_mlme_priv23a()
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-15 11:04:09 -07:00
Jes Sorensen 56828797ac staging: rtl8723au: Fold rtw_to_roaming() into the code
Simple read variable from a struct function, having it as an external
function is just silly.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-15 11:04:09 -07:00
Jes Sorensen 480c865ed9 staging: rtl8723au: rtw_mlme.c: Clean up mess
Clean up spaghetti formatting and avoid NULL initializing variables
where it isn't needed.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-15 11:04:08 -07:00
Jes Sorensen 684ad6ee72 staging: rtl8723au: Remove dummy function rtw_hostapd_mlme_rx23a()
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-15 11:04:08 -07:00
Jes Sorensen c8bdc729c2 staging: rtl8723au: Remove another unused prototype
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-15 11:04:08 -07:00
Jes Sorensen f466c400e7 staging: rtl8723au: Fold some resource allocation abstraction into their callers
Fold rtw_os_recvbuf_resource_alloc23a() and
rtw_os_recvbuf_resource_free23a() into the functions calling them.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-15 11:04:08 -07:00
Jes Sorensen 09ae6d750c staging: rtl8723au: Remove unnecessary abstraction rtw_os_recv_resource_alloc23a()
No point calling a function to NULL a pointer that was just cleared in
the malloc call.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-15 11:04:08 -07:00
Jes Sorensen 35a5c6f3a3 staging: rtl8723au: Remove unused function rtw_os_read_port23a()
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-15 11:04:08 -07:00
Jes Sorensen 76dc444185 staging: rtl8723au: Clean up namespace clashes with rtl8188eu driver
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-15 11:04:07 -07:00
Jes Sorensen bc55ae446f staging: rtl8723au: os_intfs.c: Declare a couple of local variables static
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-15 11:04:07 -07:00
Jes Sorensen 68e6831e63 staging: rtl8723au: init_channel_set(): Restructure variable names
Shorten variable names allowing for fewer broken lines due to the
large number of indents.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-15 11:04:07 -07:00
Jes Sorensen 34df0dd99b staging: rtl8723au: mgmt_dispatcher23a(): Use struct ieee80211_mgmt
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-15 11:04:07 -07:00
Jes Sorensen 78d2350982 staging: rtl8723au: OnAuth23a(): ieee80211.h-ify
Switch to using struct ieee80211_mgmt to obtain offsets. Again a
bizarre +4 offset was applied for the IE scan which doesn't make
sense, since this offset wasn't applied for the auth struct elements.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-15 11:04:06 -07:00
Jes Sorensen 580e756c60 staging: rtl8723au: OnAuth23aClient23a(): Clean up using struct ieee80211_mgmt
Use 80211_mgmt to determine offsets within the received frame. This
also removes a suspicious offset adjustment:

     offset = ieee80211_has_protected(hdr->frame_control) ? 4: 0;

which didn't make any sense, since it was only applied to determining
the auth, sequence number, and status, but wasn't applied to the
location of the IEs.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-15 11:04:06 -07:00
Jes Sorensen 6c8207a685 staging: rtl8723au: OnAssocRsp23a() use ieee80211_mgmt to obtain DA
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-15 11:04:06 -07:00
Jes Sorensen b30f74e0e0 staging: rtl8723au: OnAction23a_back23a(): Use struct ieee8011_mgmt to parse action frames
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-15 11:04:06 -07:00
Jes Sorensen f5f05715b2 staging: rtl8723au: OnAction23a(): Use struct ieee80211_mgmt instead of hardcoded offsets
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-15 11:04:06 -07:00
Jes Sorensen 0e9596992c staging: rtl8723au: update_TSF() remove unused argument and move to rtw_mlme_ext.c
This is only called from rtw_mlme_ext.c, so move it that and declare
it static.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-15 11:04:06 -07:00
Jes Sorensen 04fad92a9e staging: rtl8723au: clean up update_TSF()
Clean up and simplify update_TSF() using proper Linux functions and
move it to rtw_mlme_ext.c which is the only user of it.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-15 11:04:05 -07:00
Jes Sorensen 9af36808d9 staging: rtl8723au: OnBeacon23a() tidy up code
Clean up the excessive if() levels at the end, and use struct
ieee80211_mgmt to calculate pointers passed on to check_assoc_AP23a()

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-15 11:04:05 -07:00
Jes Sorensen 9aac910a12 staging: rtl8723au: rtw_mlme.c: remove commented out debug code
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-15 11:04:05 -07:00
Jes Sorensen 959226ac54 staging: rtl8723au: Remove buggy function _rtw_report_sec_ie()
This function was extremely buggy calling kmalloc(GFP_KERNEL) while
holding a spin lock and then potentially overflowing the buffer it had
allocated.

Since the generated output wasn't used for anything, simply rip the
whole thing out.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-15 11:04:05 -07:00
Jes Sorensen 8e64bc584d staging: rtl8723au: OnProbeReq23a(): is_valid_p2p_probereq is always false
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-15 11:04:05 -07:00
Jes Sorensen d3c6094950 staging: rtl8723au: OnProbeReq23a(): Use struct ieee80211_mgmt
Simplify parsing of probe request frame

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-15 11:04:04 -07:00
Jes Sorensen 07d2c3b841 staging: rtl8723au: OnAssocReq23a(): use ieee80211_mgmt to calculate offset
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-15 11:04:04 -07:00
Jes Sorensen 43c34be130 staging: rtl8723au: ioctl_cfg80211.c: Use eth_{zero,broadcast},addr()
Use kernel provided macros instead of own hacks.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-15 11:04:04 -07:00
Jes Sorensen 29f79e057f staging: rtl8723au: Remove some unused ieee80211 structs
These are duplicated from the kernel headers and not used anymore

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-15 11:04:04 -07:00
Jes Sorensen 30947bbc27 staging: rtl8723au: Remove unused ieee880211_is_empty_essid()
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-15 11:04:04 -07:00
Jes Sorensen 5951a5c1b8 staging: rtl8723au: Remove unused dump_wpsie23a()
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-15 11:04:04 -07:00
Jes Sorensen 7e07583247 staging: rtl8723au: Remove struct rtw_ieee802_11_elems and related code
This removes the double content tracking of data from IE elements. The
relevant code to validate IEs is moved to rtw_mlme_ext.c as this is
the only place where it is used.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-15 11:04:03 -07:00
Jes Sorensen 57ed7bbf7b staging: rtl8723au: OnAssocReq23a(): Use cfg80211_find_ie() to locate HT caps
Use cfg80211 interface to search for HT capabilities.

This was the last user of struct rtw_ieee802_11_elems, which can now
be removed.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-15 11:04:03 -07:00
Jes Sorensen 49ae9a5c69 staging: rtl8723au: OnAssocReq23a(): Don't check for presence of BSSID twice
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-15 11:04:03 -07:00
Jes Sorensen 7d6925306c staging: rtl8723au: OnAssocReq23a(): Simplify parsing crypto info from the IE
This reduces the dependency of rtw_ieee802_11_parse_elems23a() which
is only used in this function. Follow-on patches will remove the
remaining dependencies and get rid of the function.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-15 11:04:03 -07:00
Jes Sorensen ab6fb7a503 staging: rtl8723au: update_bcn_vendor_spec_ie(): Go easy on those brackets
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-15 11:04:03 -07:00
Jes Sorensen 7964eba0d8 staging: rtl8723au: Remove multiple duplicate defines of the WPA OUI
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-15 11:04:03 -07:00
Jes Sorensen daa5d2f867 staging: rtl8723au: Remove unused for_each_ie() and dump_ies23a()
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-15 11:04:02 -07:00
Jes Sorensen fcff60e920 staging: rtl8723au: Remove obsolete rtw_get_wpa{2,}_ie23a() functions
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-15 11:04:02 -07:00
Jes Sorensen 9bf29cb940 staging: rtl8723au: rtw_cfg80211_set_wpa_ie(): Remove unused variable 'pos'
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-15 11:04:02 -07:00
Jes Sorensen 58aedb498f staging: rtl8723au: rtw_cfg80211_set_wpa_ie(): Use cfg80211_ API
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-15 11:04:02 -07:00
Jes Sorensen f88ca60404 staging: rtl8723au: rtw_check_bcn_info23a(): Use cfg80211 to find WPA info
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-15 11:04:02 -07:00
Jes Sorensen c37618360e staging: rtl8723au: rtw_check_bcn_info23a(): Remove excessive brackets
Remove excessive brackets and some general cleanups

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-15 11:04:01 -07:00
Jes Sorensen d7f0369827 staging: rtl8723au: rtw_get_cipher_info(): Convert to use cfg80211_* API
Use cfg80211_find_ie() and cfg80211_find_vendor_ie() rather than own
hacks.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-15 11:04:01 -07:00
Jes Sorensen 95c4345abf staging: rtl8723au: Use const * for parsing wpa IEs
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-15 11:04:01 -07:00
Jes Sorensen 731f9da74b staging: rtl8723au: start_bss_network(): Use cfg80211_find_ie()
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-15 11:04:01 -07:00
Jes Sorensen bf35027425 staging: rtl8723au: update_sta_support_rate23a(): Use cfg80211_find_ie()
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-15 11:04:01 -07:00
Jes Sorensen 82695d5ca3 staging: rtl8723au: rtw_check_bcn_info23a(): Clean up code obfuscation
There is no point doing a double check of the IE, either we found an
WLAN_EID_SSID or we didn't.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-15 11:04:01 -07:00
Jes Sorensen 3ffa4355a2 staging: rtl8723au: rtw_check_bcn_info23a(): Use cfg80211_find_ie()
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-15 11:04:00 -07:00
Jes Sorensen c146551f1a staging: rtl8723au: Make rtw_check_bcn_info23() take a ieee80211_mgmt pointer
Clean up the code by passing a struct ieee80211_mgmt pointer instead
of a raw frame pointer. In addition check we receive a beacon frame,
anything else here is an error.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-15 11:04:00 -07:00
Jes Sorensen f96355b8f0 staging: rtl8723au: OnBeacon23a(): Use ieee80211_mgmt to calculate ie location
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-15 11:04:00 -07:00
Jes Sorensen ee79b56c0e staging: rtl8723au: OnBeacon23a(): Use struct ieee80211_mgmt
We always receive a struct ieee80211_mgmt frame here, using just
ieee80211_hdr doesn't make sense.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-15 11:04:00 -07:00
Jes Sorensen f0fcc4f0fa staging: rtl8723au: rtw_get_cur_max_rate23a(): use cfg80211_find_ie()
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-15 11:04:00 -07:00
Jes Sorensen 4bf954b2f9 staging: rtl8723au: rtw_update_protection23a(): Use cfg80211_find_ie()
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-15 11:04:00 -07:00
Jes Sorensen e0facfa97c staging: rtl8723au: Make mlme_handlers and action_handlers return int
In addition, make them all static and move the prototypes to
rtw_mlme_ext.c.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-15 11:03:59 -07:00
Jes Sorensen da290c5461 staging: rtl8723au: OnAssocReq23a(): Clean up and use more ieee80211.h
This converts it to use struct ieee80211_mgmt and cfg80211_find_ie().
In addition fix a potential buffer overrun in the last loop searching
through list WLAN_EID_VENDOR_SPECIFIC elements.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-15 11:03:59 -07:00
Jes Sorensen 858e665840 staging: rtl8723au: issue_probersp23a(): various cleanups
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-15 11:03:59 -07:00
Jes Sorensen cfe4ecdc80 staging: rtl8723au: issue_asocrsp23a(): Use cfg80211_find_ie() and cleanups
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-15 11:03:59 -07:00
Jes Sorensen 0b2b676d59 staging: rtl8723au: issue_assocreq23a(): General cleanups and use cfg80211_find_ie()
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-15 11:03:59 -07:00
Jes Sorensen 78b7d04719 staging: rtl8723au: issue_action_BSSCoexistPacket(): Clean + use cfg80211_find_ie()
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-15 11:03:58 -07:00
Jes Sorensen f73255d4d8 staging: rtl8723au: collect_bss_info23a(): Convert to use cfg80211_fine_ie()
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-15 11:03:58 -07:00
Jes Sorensen f9df1ea120 staging: rtl8723au: process_80211d() use cfg80211_find_ie()
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-15 11:03:58 -07:00
Jes Sorensen 7ffdc3f581 staging: rtl8723au: OnAction23_back23a() Use ieee80211_mgmt and bug fixes
This converts OnAction23a_back23a() to using struct ieee80211_mgmt to
parse the response packet. In addition this revealed a bug which has
been fixed:

		case WLAN_ACTION_ADDBA_RESP: /* ADDBA response */
			status = get_unaligned_le16(&frame_body[3]);
			tid = ((frame_body[5] >> 2) & 0x7);

The above masks the tid to 3 bits, however per ieee80211.h, the tid is
in fact 4 bits wide, as defined by IEEE80211_ADDBA_PARAM_TID_MASK (0x3c)

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-15 11:03:58 -07:00
Jes Sorensen c8f260e3f6 staging: rtl8723au: OnDisassoc23(): Use ieee80211_mgmt
Use proper kernel ieee80211.h defined headers to parse the response.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-15 11:03:58 -07:00
Jes Sorensen be47f78295 staging: rtl8723au: OnDeAuth23a() use ieee80211 header defines
Use the proper ieee80211.h structs to parse the response instead of
hard coded offsets.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-15 11:03:58 -07:00
Jes Sorensen d7a159959e staging: rtl8723au: OnAssocRsp23a() use ieee80211 header defines
Use the proper ieee80211.h structs to parse the response instead of
hard coded offsets.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-15 11:03:57 -07:00
Jes Sorensen 781f65cbf5 staging: rtl8723au: OnAuth23aClient23a() Use cfg80211_find_ie()
Use cfg80211_find_ie() and tidy up the code

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-15 11:03:57 -07:00
Jes Sorensen b1b2bbbdc0 staging: rtl8723au: OnAuth23() Use cfg80211_find_ie()
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-15 11:03:57 -07:00
Jes Sorensen 9f0e58664b staging: rtl8723au: OnProbeReq23a() Use cfg80211_find_ie()
Switch to using cfg80211_find_ie() and tidy of the code.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-15 11:03:57 -07:00
Jes Sorensen 2403ea62b5 staging: rtl8723au: rtw_update_ht_ie23a(): use cfg80211_find_ie()
Switch to using cfg80211_find_ie() and remove commented out code.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-15 11:03:57 -07:00
Jes Sorensen 7c2f97b248 staging: rtl8723au: rtw_restructure_ht_ie23a(): use cfg80211_find_ie()
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-15 11:03:56 -07:00
Jes Sorensen bad69af0b9 staging: rtl8723au: Remove another stack of unused P2P related #defines
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-15 11:03:56 -07:00
Jes Sorensen 98fb81291d staging: rtl8723au: Remove P2P/WiFiDirect/WiFiDisplay code
Discussing with Johannes Berg and Larry Finger, we have concluded that
this code really should be handled through wpa_supplicant, and not in
the kernel.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-15 11:03:56 -07:00
Jes Sorensen 91624933fd staging: rtl8723au: Remove obsolete local defines matching WLAN_EID_*
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-15 11:03:56 -07:00
Jes Sorensen 3021bc4207 staging: rtl8723au: Fixup last users to use the kernel's WLAN_EID_* definitions
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-15 11:03:56 -07:00
Jes Sorensen df220942df staging: rtl8723au: rtw_recv.c: Use the kernel's WLAN_EID_* definitions
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-15 11:03:55 -07:00
Jes Sorensen 3455f1f062 staging: rtl8723au: rtw_xmit.c: Use the kernel's WLAN_EID_* definitions
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-15 11:03:55 -07:00
Jes Sorensen 4288e5fd1b staging: rtl8723au: rtl8723a_cmd.c: Use the kernel's WLAN_EID_* definitions
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-15 11:03:55 -07:00
Jes Sorensen 25c934fa38 staging: rtl8723au: rtw_wlan_util.c: Use the kernel's WLAN_EID_* definitions
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-15 11:03:55 -07:00
Jes Sorensen 4323b043e4 staging: rtl8723au: rtw_ieee80211.c: Use the kernel's WLAN_EID_* definitions
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-15 11:03:55 -07:00
Jes Sorensen 9676c3b9f5 staging: rtl8723au: rtw_p2p.c: Use the kernel's WLAN_EID_* definitions
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-15 11:03:54 -07:00
Jes Sorensen af2cb2c277 staging: rtl8723au: rtw_ap.c: Use the kernel's WLAN_EID_* definitions
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-15 11:03:54 -07:00
Jes Sorensen a7eab38fe7 staging: rtl8723au: rtw_mlme.c: Use the kernel's WLAN_EID_* definitions
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-15 11:03:54 -07:00
Jes Sorensen 5afd391a57 staging: rtl8723au: rtw_mlme_ext.c: Use the kernel's WLAN_EID_* definitions
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-15 11:03:54 -07:00
Jes Sorensen 7a65382f49 staging: rtl8723au: make source * argument const
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-15 11:03:54 -07:00
Jes Sorensen 1a2818fb28 staging: rtl8723au: rtw_security.h - remove some unused macros
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-15 11:03:53 -07:00
Jes Sorensen 9300c94b8a staging: rtl8723au: Remove duplicate #defines for WLAN_EID_VENDOR_SPECIFIC
Lets not keep one local copy ... no lets keep two ... no lets keep three!
Rip them all out and use the kernel provided one.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-15 11:03:53 -07:00
Jes Sorensen 597baaff65 staging: rtl8723au: Fix buffer overflow in rtw_get_wfd_ie()
Add bounds checking to not allow WFD Information Elements larger than
128, and make sure we use the correct buffer size MAX_WFD_IE_LEN
instea of hardcoding the size.

This also simplifies rtw_get_wfd_ie() by using the cfg80211
infrastructure.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-15 11:03:53 -07:00
Jes Sorensen 94b080bc70 staging: rtl8723au: Simplify retrieving the ether_type in portctrl()
This renders the last element in include/ethernet.h unnecessary, so
remove it as well.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-14 08:29:24 -07:00
Jes Sorensen 7d0d2b15a0 staging: rtl8723au: Calling rtw_get_stainfo() with a NULL sta_addr will return NULL
This makes the follow-on check for psta != NULL pointless and makes
the whole exercise rather pointless. This is another case of why
blindly zero-initializing variables when they are declared is bad.

This bug seems to be present in multiple drivers provided by Realtek.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-14 08:29:23 -07:00
Jes Sorensen 514c485c01 staging: rtl8723au: Fix case where ethtype was never obtained and always be checked against 0
Zero-initializing ether_type masked that the ether type would never be
obtained for 8021x packets and the comparition against eapol_type
would always fail.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-14 08:29:23 -07:00
Jes Sorensen 7dd1e72025 staging: rtl8723au: Use proper ETH_P_* types in rtw_recv.c
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-14 08:29:23 -07:00
Jes Sorensen f4337aa31d staging: rtl8723au: Call do_div() directly and get rid of unnecessary wrapper functions
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-14 08:29:22 -07:00
Larry Finger 88cdc943c5 staging: rtl8723au: Fix build error due to bad commit 6c89f82
Two routines are missing includes of a necessary header.

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-04-14 08:29:22 -07:00
Jes Sorensen 6484767b93 staging: rtl8723au: Remove unused bitshift() function
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-14 08:29:21 -07:00
Jes Sorensen 9cd81fa609 staging: rtl8723au: Remove a couple of unused prototypes
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-14 08:29:21 -07:00
Jes Sorensen 8000d1c413 staging: rtl8723au: No need to include header files for unused circ_buf and old iwpriv bits
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-14 08:29:21 -07:00
Jes Sorensen 458dc03913 staging: rtl8723au: Remove unnecessary forward struct declarations from xmit_osdep.h
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-14 08:29:20 -07:00
Jes Sorensen 4c9c5700d6 staging: rtl8723au: Remove ugly pktfile interface
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-14 08:29:20 -07:00
Jes Sorensen 3e689a9ff5 staging: rtl8723au: Don't use pktfile interface in rtw_xmitframe_coalesce23a()
The pktfil interface is horrible, no idea where it came from, but not
using it is a win.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-14 08:29:19 -07:00
Jes Sorensen 69a0f9745c staging: rtl8723au: Make rtw_xmitframe_coalesce23a() more readable
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-14 08:29:19 -07:00
Jes Sorensen e59cb424d7 staging: rtl8723au: Fix update_attrib() and set_qos() to not use pktfile nonsense
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-14 08:29:19 -07:00
Jes Sorensen 3483b8ae77 staging: rtl8723au: Use proper ETH_P_* types instead of hard coded constants in rtw_xmit.c
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-14 08:29:18 -07:00
Jes Sorensen f4f1cb92ae staging: rtl8723au: Fold rtw_remainder_len23a() into _rtw_open_pktfile23a()
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-14 08:29:18 -07:00
Jes Sorensen 41ed2cb92e staging: rtl8723au: Remove last remnants of CONFIG_BR_EXT
Reported-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-14 08:29:18 -07:00
Jes Sorensen 814a1d900e staging: rtl8723au: rtw_report_sec_ie23a() is only called from rtw_mlme.c
Move it there and declare it static

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-14 08:29:17 -07:00
Jes Sorensen 1eb663227f staging: rtl8723au: Remove unused functions rtw_indicate_sta_{dis,}assoc_event23a()
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-14 08:29:17 -07:00
Jes Sorensen 90102edc28 staging: rtl8723au: Fix hopeless brackets for declaring a variable mid-function
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-14 08:29:16 -07:00
Jes Sorensen b319c6a35d staging: rtl8723au: Remove unnecessary memset() followed by a memcpy() into the same space
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-14 08:29:16 -07:00
Jes Sorensen 483557be8e staging: rtl8723au: rtw_os_indicate_connect23a() is only called from one place - fold it in
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-14 08:29:16 -07:00
Jes Sorensen ce16d2f189 staging: rtl8723au: Don't wrap kill_pid() in an unnecessary macro
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-14 08:29:15 -07:00
Jes Sorensen 810c832f5d staging: rtl8723au: Remove two layers of wrappers around rtw_cfg80211_indicate_scan_done()
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-14 08:29:15 -07:00
Jes Sorensen 141bd353c5 staging: rtl8723au: Remove #ifdef CONFIG_DEBUG_CFG80211
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-14 08:29:15 -07:00
Jes Sorensen 3f58bf2ec0 staging: rtl8723au: Remove unused is_boot_from_eeprom() macro
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-14 08:29:14 -07:00
Jes Sorensen ec21da4696 staging: rtl8723au: Remove obsolete HW_VARIABLES enum
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-14 08:29:14 -07:00
Jes Sorensen 0a44991073 staging: rtl8723au: Kill off ugly GetHwReg*() interface
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-14 08:29:13 -07:00
Jes Sorensen 8d3fd6145b staging: rtl8723au: Eliminate HW_WAR_CHK_HI_QUEUE_EMPTY usage
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-14 08:29:13 -07:00
Jes Sorensen 0cee8101d8 staging: rtl8723au: Eliminate HW_VAR_FWLPS_RF_ON usage
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-14 08:29:13 -07:00
Jes Sorensen c2370e83ab staging: rtl8723au: Eliminate HW_VAR_RF_TYPE usage
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-14 08:29:12 -07:00
Jes Sorensen b54e880440 staging: rtl8723au: Improve some bad switch() formatting
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-14 08:29:12 -07:00
Jes Sorensen f075870605 staging: rtl8723au: Remove empty function rtw_stassoc_hw_rpt23a()
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-14 08:29:11 -07:00
Jes Sorensen 891d3decbb staging: rtl8723au: Remove SetHwReg*() related code
Remove all references to this odd mux/demux pseudo hw register
handling code.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-14 08:29:11 -07:00
Jes Sorensen 3d577f60da staging: rtl8723au: Remove calls to HW_VAR_H2C_MEDIA_STATUS
This call was unhandled, so these calls were effectively a no-op

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-14 08:29:11 -07:00
Jes Sorensen 4b03eb73ca staging: rtl8723au: Eliminate unused HW_VAR_TRIGGER_GPIO_0
... and related functions

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-14 08:29:10 -07:00
Jes Sorensen aafb8684a8 staging: rtl8723au: Remove HW_VAR_TXPAUSE
This wasn't used at all

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-14 08:29:10 -07:00
Jes Sorensen a2342292e5 staging: rtl8723au: Remove HW_VAR_EFUSE_{BT_,}BYTES
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-14 08:29:09 -07:00
Jes Sorensen 441ffea706 staging: rtl8723au: Remove HW_VAR_APFM_ON_MAC
None of this was ever used, so pull it out together with related variables

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-14 08:29:09 -07:00
Jes Sorensen df09df24d0 staging: rtl8723au: Eliminate HW_VAR_DM_FLAG
Both the read and write calls were never used

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-14 08:29:09 -07:00
Jes Sorensen 585eefb453 staging: rtl8723au: Eliminate HW_VAR_DM_FUNC_{SET,CLR}
Unroll two layers of mux/demux in the call chain for each.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-14 08:29:08 -07:00
Jes Sorensen a945bf3012 staging: rtl8723au: Eliminate HW_VAR_DM_FUNC_OP calls
Demux the code and remove multiple call layers

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-14 08:29:08 -07:00
Jes Sorensen 6883e7c720 staging: rtl8723au: Make direct calls for HW_VAR_NAV_UPPER
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-14 08:29:08 -07:00
Jes Sorensen a3252966e1 staging: rtl8723au: Remove commented out set_hwreg calls
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-14 08:29:07 -07:00
Jes Sorensen 9ff3513cb4 staging: rtl8723au: Make direct calls for HW_VAR_SET_RPWM
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-14 08:29:07 -07:00
Jes Sorensen c6d921c580 staging: rtl8723au: Make direct calls for HW_VAR_H2C_P2P_PS_OFFLOAD
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-14 08:29:06 -07:00
Jes Sorensen 327c70c04b staging: rtl8723au: Make direct calls for HW_VAR_H2C_FW_{PWRMODE,JOINBSSRPT}
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-14 08:29:06 -07:00
Jes Sorensen 1e7b6ebe19 staging: rtl8723au: Make direct calls for HW_VAR_TXDMA_AGG_PG_TH
This was in fact turned into a no-op for the RTL8723AU, but it looks
like a bug, so this reenables it.

Keep an eye out for side-effects here and revert this, if it causes
issues.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-14 08:29:06 -07:00
Jes Sorensen 6952905d21 staging: rtl8723au: Nuke HW_VAR_CHECK_TXBUF, which was also a no-op
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-14 08:29:05 -07:00
Jes Sorensen dc451608f3 staging: rtl8723au: Nuke HW_VAR_BCN_FUNC
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-14 08:29:05 -07:00
Jes Sorensen 7c82a2b91d staging: rtl8723au: Kill off HW_VAR_INITIAL_GAIN
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-14 08:29:05 -07:00
Jes Sorensen dce610a77f staging: rtl8723au: Make direct calls for HW_VAR_AMPDU_{MIN_SPACE,FACTOR}
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-14 08:29:04 -07:00
Jes Sorensen d5cdb9e1da staging: rtl8723au: Kill off HW_VAR_ACM_CTRL
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-14 08:29:04 -07:00
Jes Sorensen 2487205e0e staging: rtl8723au: Eiminate the use of HW_VAR_AC_PARAM_{VO,VI,BE,BK}
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-14 08:29:03 -07:00
Jes Sorensen dc0d16a107 staging: rtl8723au: Eliminate HW_VAR_CAM_WRITE and clean up all the wrapping around it
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-14 08:29:03 -07:00
Jes Sorensen a15a46a7b9 staging: rtl8723au: Kill off HW_VAR_CAM_EMPTY_ENTRY and some function layers wrapping it
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-14 08:29:03 -07:00
Jes Sorensen b8e99163b3 staging: rtl8723au: Eliminate HW_VAR_SEC_CFG usage
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-14 08:29:02 -07:00
Jes Sorensen 093dd41e03 staging: rtl8723au: Eliminate HW_VAR_ACK_PREAMBLE
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-14 08:29:02 -07:00
Jes Sorensen 7b7aefaab1 staging: rtl8723au: Eliminate HW_VAR_RESP_SIFS
Yet another case of an endian bug from treating a 32 bit integer as an
array of 8 bit numbers...

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-14 08:29:02 -07:00
Jes Sorensen 04c3842773 staging: rtl8723au: Eliminate HW_VAR_SLOT_TIME
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-14 08:29:01 -07:00
Jes Sorensen 477f008d55 staging: rtl8723au: Eliminate HW_VAR_BEACON_INTERVAL
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-14 08:29:01 -07:00
Jes Sorensen ea0cd73023 staging: rtl8723au: Eliminate HW_VAR_CHECK_BSSID and HW_VAR_MLME_JOIN
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-14 08:29:01 -07:00
Jes Sorensen a086023ac5 staging: rtl8723au: Eliminate HW_VAR_MLME_SITESURVEY usage
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-14 08:29:00 -07:00
Jes Sorensen 38dd10b59b staging: rtl8723au: Eliminate HW_VAR_BSSID usage
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-14 08:29:00 -07:00
Jes Sorensen 3c5660e757 staging: rtl8723au: Eliminate HW_VAR_MAC_ADDR usage
.... and rip out a couple of unnecessary layers of function calls

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-14 08:28:59 -07:00
Jes Sorensen fa2e52092a staging: rtl8723au: Eliminate usage of HW_VAR_BASIC_RATE
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-14 08:28:59 -07:00
Jes Sorensen dbdcd36b2e staging: rtl8723au: Eliminate HW_VAR_SET_OPMODE usage
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-14 08:28:59 -07:00
Jes Sorensen 03aa3ec054 staging: rtl8723au: Remove HW_VAR_MEDIA_STATUS* usage
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-14 08:28:58 -07:00
Jes Sorensen ff5d82e457 staging: rtl8723au: This gets rid of the last HW_VAR_BCN_VALID usage
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-14 08:28:58 -07:00
Jes Sorensen 763b4247ca staging: rtl8723au: Remove a bunch of calls via indirect HAL interface and call functions directly
The 'HW' variable interface is confusing and simply obfuscates the
code, so this is the first patch in a series to remove it and make
direct calls to the functions in place.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-14 08:28:58 -07:00
Jes Sorensen dda26427bd staging: rtl8723au: The 8723 only has two paths
Converting the driver from the original RTL provided version, by error
converted the code to use four, which caused all sorts of issues. The
confusion was caused by the RTL driver having support for both two and
four paths, and in some places had RF_PATH_MAX = 3. At the same time
it kept the data structures hard coded for two paths, in particular
the ones matching the efuse data.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-07 12:53:00 -07:00
Larry Finger f004e55947 staging: r8723au: Fix build problem when RFKILL is not selected
The kbuild test robot reports the following build errors for x86_64-randconfig-c1-0407:

All error/warnings:

   net/built-in.o: In function `wiphy_new':
>> (.text+0x7684c): undefined reference to `rfkill_alloc'
   net/built-in.o: In function `wiphy_rfkill_start_polling':
>> (.text+0x76da4): undefined reference to `rfkill_resume_polling'
   net/built-in.o: In function `wiphy_rfkill_stop_polling':
>> (.text+0x76de9): undefined reference to `rfkill_pause_polling'
   net/built-in.o: In function `wiphy_unregister':
>> (.text+0x76ec9): undefined reference to `rfkill_unregister'
   net/built-in.o: In function `wiphy_rfkill_set_hw_state':
>> (.text+0x771bc): undefined reference to `rfkill_set_hw_state'
   net/built-in.o: In function `wiphy_register':
>> (.text+0x77968): undefined reference to `rfkill_register'
   net/built-in.o: In function `wiphy_register':
>> (.text+0x77981): undefined reference to `rfkill_destroy'
   net/built-in.o: In function `cfg80211_rfkill_sync_work':
>> core.c:(.text+0x788ad): undefined reference to `rfkill_blocked'
   net/built-in.o: In function `cfg80211_dev_free':
>> (.text+0x78a7b): undefined reference to `rfkill_destroy'
   net/built-in.o: In function `cfg80211_netdev_notifier_call':
>> core.c:(.text+0x79203): undefined reference to `rfkill_blocked'
   net/built-in.o: In function `nl80211_start_p2p_device':

These undefined sysbols are all satisfied if a "select RFKILL" is added to
Kconfig. This "fix" leads to another problem as follows:

>> nl80211.c:(.text+0x9032e): undefined reference to `rfkill_blocked'
net/rfkill/Kconfig:4:error: recursive dependency detected!
net/rfkill/Kconfig:4:   symbol RFKILL is selected by R8723AU
drivers/staging/rtl8723au/Kconfig:1:    symbol R8723AU depends on USB
drivers/usb/Kconfig:41: symbol USB is selected by MOUSE_APPLETOUCH
drivers/input/mouse/Kconfig:162:        symbol MOUSE_APPLETOUCH depends on INPUT
drivers/input/Kconfig:8:        symbol INPUT is selected by ACPI_CMPC
drivers/platform/x86/Kconfig:635:       symbol ACPI_CMPC depends on RFKILL

To avoid substituting one build error for another, I added a "depends on RFKILL".
My suspicion is that this particular error is caused by a kbuild bug, or that the
selection of INPUT by ACPI_CMPC is wrong. In any case, that will be solved separately.

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Jes Sorensen <Jes.Sorensen@redhat.com>
Cc: kbuild-all@01.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-06 17:54:51 -07:00
Larry Finger 36c4d5c250 staging: r8723au: Fix randconfig build errors
The kbuild test robot got the following errors for i386-randconfig-c0-04060652:

ERROR: "wiphy_free" [drivers/staging/rtl8723au/r8723au.ko] undefined!
ERROR: "bridge_tunnel_header" [drivers/staging/rtl8723au/r8723au.ko] undefined!
ERROR: "ieee80211_frequency_to_channel" [drivers/staging/rtl8723au/r8723au.ko] undefined!
ERROR: "cfg80211_rx_mgmt" [drivers/staging/rtl8723au/r8723au.ko] undefined!
ERROR: "ieee80211_channel_to_frequency" [drivers/staging/rtl8723au/r8723au.ko] undefined!
ERROR: "cfg80211_mgmt_tx_status" [drivers/staging/rtl8723au/r8723au.ko] undefined!
ERROR: "rfc1042_header" [drivers/staging/rtl8723au/r8723au.ko] undefined!
ERROR: "__ieee80211_get_channel" [drivers/staging/rtl8723au/r8723au.ko] undefined!
ERROR: "wiphy_unregister" [drivers/staging/rtl8723au/r8723au.ko] undefined!
ERROR: "cfg80211_connect_result" [drivers/staging/rtl8723au/r8723au.ko] undefined!
ERROR: "cfg80211_michael_mic_failure" [drivers/staging/rtl8723au/r8723au.ko] undefined!
ERROR: "cfg80211_roamed" [drivers/staging/rtl8723au/r8723au.ko] undefined!
ERROR: "cfg80211_put_bss" [drivers/staging/rtl8723au/r8723au.ko] undefined!
ERROR: "wiphy_new" [drivers/staging/rtl8723au/r8723au.ko] undefined!
ERROR: "wiphy_register" [drivers/staging/rtl8723au/r8723au.ko] undefined!
ERROR: "cfg80211_inform_bss_width_frame" [drivers/staging/rtl8723au/r8723au.ko] undefined!
ERROR: "cfg80211_disconnected" [drivers/staging/rtl8723au/r8723au.ko] undefined!
ERROR: "ieee80211_amsdu_to_8023s" [drivers/staging/rtl8723au/r8723au.ko] undefined!
ERROR: "cfg80211_scan_done" [drivers/staging/rtl8723au/r8723au.ko] undefined!

All of these are fixed by forcing the selection of CFG80211 in Kconfig.

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Jes Sorensen <Jes.Sorensen@redhat.com>
Cc: kbuild-all@01.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-05 21:10:11 -07:00
Larry Finger 9176303c40 staging: r8723au: Turn on build of new driver
This commit also creates a TODO file.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-05 14:53:46 -07:00
Larry Finger c17416ef70 staging: r8723au: Additional source patches
These changes are fixes that were discovered late in the testing
cycle.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-05 14:51:23 -07:00
Larry Finger 364e30ebd2 staging: r8723au: Add source files for new driver - part 4
The Realtek USB device RTL8723AU is found in Lenovo Yoga 13 tablets.
A driver for it has been available in a GitHub repo for several months.
This commit contains the fourth part of source files. The source
is arbitrarily split to avoid E-mail files that are too large.

Jes Sorensen at RedHat has made many improvements to the vendor code,
and he has been doing the testing. I do not have access to this device.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-05 14:51:23 -07:00
Larry Finger b1925ad846 staging: r8723au: Add source files for new driver - part 3
The Realtek USB device RTL8723AU is found in Lenovo Yoga 13 tablets.
A driver for it has been available in a GitHub repo for several months.
This commit contains the third part of source files. The source
is arbitrarily split to avoid E-mail files that are too large.

Jes Sorensen at RedHat has made many improvements to the vendor code,
and he has been doing the testing. I do not have access to this device.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-05 14:51:23 -07:00
Larry Finger f7c92d2cc2 staging: r8723au: Add source files for new driver - part 2
The Realtek USB device RTL8723AU is found in Lenovo Yoga 13 tablets.
A driver for it has been available in a GitHub repo for several months.
This commit contains the second part of the source files. The source
is arbitrarily split to avoid E-mail files that are too large.

Jes Sorensen at RedHat has made many improvements to the vendor code,
and he has been doing the testing. I do not have access to this device.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-05 14:51:23 -07:00
Larry Finger 5e93f35209 staging: r8723au: Add source files for new driver - part 1
The Realtek USB device RTL8723AU is found in Lenovo Yoga 13 tablets.
A driver for it has been available in a GitHub repo for several months.
This commit contains the first part of the source files. The source
is arbitrarily split to avoid E-mail files that are too large.

Jes Sorensen at RedHat has made many improvements to the vendor code,
and he has been doing the testing. I do not have access to this device.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-05 14:51:22 -07:00