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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
This patch removes the uchar typedef in dgap.h
and changes all uses of it to u8.
Signed-off-by: Mark Hounschell <markh@compro.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This patch renames and changes the dgap_wait_for_bios and
dgap_wait_for_fep functions from boolean functions to return
zero on success and a negative error code on error.
Signed-off-by: Mark Hounschell <markh@compro.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This patch just fixes a pr_info. brd->state is not proper
at this point in time.
Signed-off-by: Mark Hounschell <markh@compro.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This patch fixes checkpatch warnings about using volatiles in dgap.h
Signed-off-by: Mark Hounschell <markh@compro.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This patch fixes a checkpatch warning
"Macros with complex values should be enclosed in parenthesis"
Signed-off-by: Mark Hounschell <markh@compro.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
The config file is currently read for each board found.
It only needs to be read one time. The buffer it is read
into can now be freed immediately after it is parsed
instead of at driver unload time.
Signed-off-by: Mark Hounschell <markh@compro.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>