Mark these variables local to avoid namespace clash with other RTL
drivers.
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
In addition, this would globally disable HT if one device in the
system would mark it unsupported. If any device ended up requiring
this, it should be handled on a per-instance basis.
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>