Commit Graph

727 Commits

Author SHA1 Message Date
Jes Sorensen
7c3a8f2a5e staging: rtl8723au: OnAssocReq23a(): Use cfg80211_find_vendor_ie() to locate VMM
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-24 13:51:02 -04:00
Jes Sorensen
42282f4147 staging: rtl8723au: Only validate vendor specific ies, when they it is vendor specific
Don't run rtw_validate_vendor_specific_ies() on anything but
WLAN_EID_VENDOR_SPECIFIC. In addition use the proper
WLAN_OUI_TYPE_MICROSOFT_* definitions.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-24 13:51:02 -04:00
Jes Sorensen
98f979f1f8 staging: rtl8723au: rtw_append_pmkid(): Adjust for IEs array not arrying fixed elements
Another case using hard coded offsets counting on the presence of
fixed beacon elements in the IEs array.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-24 13:51:02 -04:00
Jes Sorensen
86184b93c5 staging: rtl8723au: rtw_restruct_wmm_ie23a(): Use cfg80211_find_vendor_ie()
Rewrite rtw_restruct_wmm_ie23a() using cfg80211_find_vendor_ie()

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-24 13:51:02 -04:00
Jes Sorensen
2dcf6b4c73 staging: rtl8723au: Eliminate set_wep_key() and call set_group_key() directly
This also eliminates another round of determine algorithm based on key
length, followed by determine key length based on algorithm.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-24 13:51:02 -04:00
Jes Sorensen
7ef2743da1 staging: rtl8723au: Validate keys in cfg80211_rtw_add_key()
We validate the parameters in cfg80211_rtw_add_key() so no need to do
it all again in rtw_cfg80211_{ap_}set_encryption()

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-24 13:51:02 -04:00
Jes Sorensen
3e71669acc staging: rtl8723au: Remove obsolete struct ieee_parm
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-24 13:51:02 -04:00
Jes Sorensen
f0bf8dd53d staging: rtl8723au: rtw_cfg80211_{ap_}set_encryption(): Stop passing ieee_parms argument
struct ieee_parms is obsolete, so stop passing it on.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-24 13:51:02 -04:00
Jes Sorensen
f88ab54c10 staging: rtl8723au: rtw_cfg80211_{ap_}set_encryption(): Add sta_addr argument
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-24 13:51:01 -04:00
Jes Sorensen
efd4216c2d staging: rtl8723au: rtw_cfg80211_{ap_}set_encryption(): No more string parsing to determine cipher
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-24 13:51:01 -04:00
Jes Sorensen
6e6e2d633b staging: rtl8723au: Stop setting ieee_parm arguments that aren't used
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-24 13:51:01 -04:00
Jes Sorensen
0996cf9c69 staging: rtl8723au: rtw_cfg80211_{ap_}set_encryption(): Add set_tx argument
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-24 13:51:01 -04:00
Jes Sorensen
fd381874eb staging: rtl8723au: rtw_cfg80211_ap_set_encryption(): obtain key from key_params
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-24 13:51:01 -04:00
Jes Sorensen
f7ce87cdb7 staging: rtl8723au: rtw_cfg80211_ap_set_encryption(): Pass key_index argument
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-24 13:51:01 -04:00
Jes Sorensen
5292a89197 staging: rtl8723au: rtw_cfg80211_set_encryption(): Pass key_index as argument
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-24 13:51:01 -04:00
Jes Sorensen
e1343f9080 staging: rtl8723au: rtw_cfg80211_set_encryption(): Obtain key from key_params->key
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-24 13:51:01 -04:00
Jes Sorensen
8188b1cb61 staging: rtl8723au: rtw_cfg80211_set_encryption(): Use key_params->cipher
Use key_params->cipher to determine WEP/TKIP

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-24 13:51:01 -04:00
Jes Sorensen
d0dc266692 staging: rtl8723au: rtw_cfg80211_set_encryption(): Obtain key_len from struct key_params
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-24 13:51:01 -04:00
Jes Sorensen
a9e346fb88 staging: rtl8723au: rtw_cfg80211_set_encryption(): Pass additional struct key_params
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-24 13:51:00 -04:00
Jes Sorensen
55db5d02f8 staging: rtl8723au: rtw_cfg80211_ap_set_encryption(): Use keyparms->cipher to set WEP size
We already know which type of WEP we are using when we get here, no
point trying to determine it from key_len.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-24 13:51:00 -04:00
Jes Sorensen
f84f97fd6a staging: rtl8723au: rtw_cfg80211_ap_set_encryption(): Stop using param->u.crypt.alg
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-24 13:51:00 -04:00
Jes Sorensen
c36e122f6e staging: rtl8723au: rtw_cfg80211_ap_set_encryption(): Use key len from struct key_params
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-24 13:51:00 -04:00
Jes Sorensen
4e297c21bf staging: rtl8723au: rtw_cfg80211_ap_set_encryption() is only called for WIFI_AP_STATE
No point checking it again in here, twice!

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-24 13:51:00 -04:00
Jes Sorensen
5dab9e7d2a staging: rtl8723au: rtw_cfg80211_ap_set_encryption(): Use key_params->cipher to determine encryption
Passing strings around for something we have defines for is just
silly.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-24 13:51:00 -04:00
Jes Sorensen
ef80f1f564 staging: rtl8723au: Remove unused RSN_VERSION_BSD23A
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-24 13:51:00 -04:00
Jes Sorensen
c250e07e99 staging: rtl8723au: rtw_get_wps_attr_content23a(): Remove unused argument
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-24 13:51:00 -04:00
Jes Sorensen
7ef2a15a40 staging: rtl8723au: Remove unused #define P80211CAPTURE_VERSION
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-24 13:51:00 -04:00
Jes Sorensen
71b0956b16 staging: rtl8723au: Remove unused #define EID_BSSIntolerantChlReport
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-24 13:51:00 -04:00
Jes Sorensen
1de65ccb1f staging: rtl8723au: Get rid of obsolete _FIXED_IE_LENGTH_ + _BEACON_IE_OFFSET
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-24 13:50:59 -04:00
Jes Sorensen
68e6c79609 staging: rtl8723au: Stop carrying half the beacon frame header in the stored IE array
This gets rid of the odd carrying of half the beacon frame in the IE
array stored for the network. Instead we rely on the relevant fields
(timestamp, beacon_interval, and capability) stored in struct
wlan_bssid_ex.

Carrying only half the ieee80211_mgmt header led to a number of bugs
and simply obfuscated the code.

I have tried catching all instances relying on these three elements in
the IEs array, but missed cases may still need to be tracked down.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-24 13:50:59 -04:00
Jes Sorensen
a4cf0d65e5 staging: rtl8723au: rtw_generate_ie23a(): update network info as well as IE
We need to make sure to update the network info as well as the IE
array.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-24 13:50:59 -04:00
Jes Sorensen
0f728f1033 staging: rtl8723au: issue_beacon23a(): Determine ie buffer location using 80211_mgmt
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-24 13:50:59 -04:00
Jes Sorensen
89060370db staging: rtl8723au: issue_beacon23a(): Fix another case issuing a corrupted beacon
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-24 13:50:59 -04:00
Jes Sorensen
2131891c6a staging: rtl8723au: Remove unused dump_txrpt_ccx_8723a()
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-24 13:50:59 -04:00
Jes Sorensen
559789d6cb staging: rtl8723au: Remove no-op CheckFwRsvdPageContent23a()
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-24 13:50:59 -04:00
Jes Sorensen
a22301ec96 staging: rtl8723au: ConstructProbeRsp(): Use struct ieee80211_mgmt
Use ieee80211_mgmt to construct the frame instead of relying on hard
coded offsets.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-24 13:50:59 -04:00
Jes Sorensen
e61fc7cf90 staging: rtl8723au: Use _FIXED_IE_LEN_ instead of hard coded value
This should help catching all the users once we stop carrying the
fixed beacon elements in the IE array.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-24 13:50:58 -04:00
Jes Sorensen
51a26d26fe staging: rtl8723au: rtw_check_beacon_data23a(): Capability is already uptodate in cur_network
Beacon capability was already added to mlme_priv->cur_network before
calling this function, so no need to retrieve it from the IE array
again.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-24 13:50:58 -04:00
Jes Sorensen
fb5fd46dbd staging: rtl8723au: rtw_add_beacon(): Construct a full beacon frame for validation
Clean up and correct the beacon frame validation using a full beacon
frame, and pass that to rtw_check_beacon_data23a(). Previous we went
through hoops to construct the frame, minus the ieee80211_3addr header
which just made it more complicated, and resulted in inconsistencies
and bugs.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-24 13:50:58 -04:00
Jes Sorensen
1d33b07663 staging: rtl8723au: rtw_get_cur_max_rate(): Use _FIXED_IE_LENGTH_ instead of hardcoded value
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-24 13:50:57 -04:00
Jes Sorensen
5b5cf9941f staging: rtl8723au: Remove unused IE offset #defines
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-24 13:50:57 -04:00
Jes Sorensen
60e78f3df4 staging: rtl8723au: Remove usage of _{RE, }ASOCREQ_IE_OFFSET_
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-24 13:50:57 -04:00
Jes Sorensen
40954b6385 staging: rtl8723au: Remove unused size defines for mgmt frame elements
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-24 13:50:57 -04:00
Jes Sorensen
ad8686bc05 staging: rtl8723au: issue_probersp(): No need to calculate location of IEs, we know where they are
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-21 13:08:37 -07:00
Jes Sorensen
d642a0a0b9 staging: rtl8723au: issue_probersp(): Don't insert beacon data twice
In case of AP mode, we were inserting the beacon data twice in the
probe_resp frame, leading to a corrupted on the wire frame.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-21 13:08:37 -07:00
Jes Sorensen
2bde052753 staging: rtl8723au: rtw_joinbss_update_network23a(): update beacon info as well
We need to copy over the beacon info (interval, capability, tsf) as
well as the IE data.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-21 13:08:37 -07:00
Jes Sorensen
eb4f07bf85 staging: rtl8723au: rtw_survey_event_cb23a(): Remember to clone beacon data
We need to clone all the beacon information, not just the IE data, in
particular as the long term goal is to stop carrying this information
in the IE data.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-21 13:08:37 -07:00
Jes Sorensen
a131aac3b6 staging: rtl8723au: Remove (hopefully) last duplicate define of WLAN_EID_RSN
So much for thinking the removal of the previous 217 duplicate copies
would suffice ....

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-21 13:08:37 -07:00
Jes Sorensen
2bd3b4fb37 staging: rtl8723au: Remove write-only struct security_priv->authenticator_ie
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-21 13:08:37 -07:00
Jes Sorensen
d4fc0213dd staging: rtl8723au: Remove unused struct mlme_priv->wfd_* entries
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-21 13:08:37 -07:00