summaryrefslogtreecommitdiffstats
path: root/drivers/staging/r8188eu/include/wifi.h
AgeCommit message (Collapse)AuthorFilesLines
2022-11-08staging: r8188eu: don't store addba requestMartin Kaiser1-8/+0
There's no need to store an incoming addba request in struct mlme_ext_info. We only need the addba request to copy some of its fields into our addba response. It's simpler to pass the incoming request's management frame to issue_action_BA as an additional parameter. issue_action_BA can then extract the required fields. If issue_action_BA prepares a request rather than a response, the caller sets the parameter for the incoming request to NULL. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150 Link: https://lore.kernel.org/r/20221106124901.720785-2-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-10-31staging: r8188eu: remove get_daMartin Kaiser1-22/+0
Replace the last get_da call with ieee80211_get_DA and remove the get_da function. Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150 Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20221029171011.1572091-3-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-10-25staging: r8188eu: remove unused macros from wifi.hMichael Straube1-27/+0
There are some unused macros in wifi.h. Remove them. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20221025152722.14926-1-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-10-25staging: r8188eu: use standard multicast addr checkMartin Kaiser1-5/+0
Use is_multicast_ether_addr to check for a multicast address instead of reimplementing this check in the driver. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150 Link: https://lore.kernel.org/r/20221023170808.46233-2-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-10-22staging: r8188eu: correct misspelled words in commentsDeepak R Varma1-6/+6
Fix spelling mistakes in code comments across the driver. Signed-off-by: Deepak R Varma <drv@mailo.com> Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150 Link: https://lore.kernel.org/r/00be5f2a97b0c899279bd8f9cd27634186b77b9d.1666299151.git.drv@mailo.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-14staging: r8188eu: use ieee80211 helper to read the qos tidMartin Kaiser1-2/+0
Replace the driver-specific GetPriority macro with ieee80211_get_tid, which does exactly the same thing. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220413200742.276806-2-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-05staging: r8188eu: drop redundant if check in IS_MCASTVihas Makwana1-4/+1
The if check is redundant. Drop it and simplify the funciton. Signed-off-by: Vihas Makwana <makvihas@gmail.com> Link: https://lore.kernel.org/r/20220405124239.3372-2-makvihas@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-04staging: r8188eu: remove to_fr_ds from struct rx_pkt_attribMartin Kaiser1-2/+0
to_fr_ds in struct rx_pkt_attrib stores the values of the to_ds and from_ds bits of an incoming data frame. to_fr_ds is set by parsing the frame control bytes and it's used only in validate_recv_data_frame. Remove to_fr_ds from struct rx_pkt_attrib and use the ieee80211 helpers to distinguish between the four different cases for to_ds, from_ds. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220403165438.357728-8-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-04staging: r8188eu: use ieee80211 struct for aidMartin Kaiser1-2/+0
Remove the GetAid macro and map the frame data to a struct ieee80211_pspoll instead. We can then read the aid component. psta->aid is in host endianness and has a 0x3FFF mask applied. We have to convert our read value as well and apply the mask before we compare it to psta->aid. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220403164526.357371-6-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-04staging: r8188eu: use ieee80211 define for fragment numberMartin Kaiser1-3/+0
Use the IEEE80211_SCTL_FRAG define to extract the fragment number from an incoming frame. pattrib->frag_num must be in host endianness, we have to convert hdr->seq_ctrl, this field is little-endian. Remove the local GetFragNum macro, it is not used any more. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220327180944.712545-10-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-04staging: r8188eu: use ieee80211 macro for sequence numberMartin Kaiser1-3/+0
Use the IEEE80211_SEQ_TO_SN macro in function validate_recv_frame to get the sequence number of an incoming frame. Map the incoming rx bytes to a struct ieee80211_hdr. Replace the fc variable with struct ieee80211_hdr's frame control component. The IEEE80211_SEQ_TO_SN macro takes the sequence control field of an ieee80211 header and extracts the sequence number. The macro's input parameter must be in host endianness, the sequence number in the 80211 header is little-endian, we have to convert it to host endianness. Remove the local GetSequence macro, it is not used any more. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220327180944.712545-9-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-04staging: r8188eu: remove unused control frame subtypesMartin Kaiser1-5/+0
Remove unused defines for control frame subtypes. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220327180944.712545-8-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-04staging: r8188eu: remove unused data frame subtypesMartin Kaiser1-3/+0
Remove unused defines for data frame subtypes. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220327180944.712545-7-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-04staging: r8188eu: use standard mechanisms for qos data framesMartin Kaiser1-5/+1
Use defines and macros from ieee80211.h to check for qos data frames and to mark a frame as qos data. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220327180944.712545-6-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-04staging: r8188eu: use standard mechanisms for data framesMartin Kaiser1-9/+8
Use defines and macros from ieee80211.h to check for data frames and to define data frame subtypes. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220327180944.712545-5-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-04staging: r8188eu: use standard mechanisms for control framesMartin Kaiser1-15/+6
Use defines and macros from ieee80211.h to check for control frames and to define control frame subtypes. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220327180944.712545-4-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-04staging: r8188eu: remove local BIT macroMartin Kaiser1-6/+1
The r8188eu driver defines a local BIT(x) macro. Remove this local macro and use the one from include/linux/bits.h. The global BIT macro returns an unsigned long value, the removed local BIT macro used a signed int. DYNAMIC_BB_DYNAMIC_TXPWR is defined as BIT(2), ~DYNAMIC_BB_DYNAMIC_TXPWR is passed to Switch_DM_Func as a u32 parameter. We need a cast in this case as ~DYNAMIC_BB_DYNAMIC_TXPWR is a 64-bit value on x86_64 systems. Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220319180342.3143734-1-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-03-16staging: r8188eu: remove some unused local ieee80211 macrosMartin Kaiser1-27/+0
Remove some macros from wifi.h which are not used by this driver. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220315205041.2714168-6-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-03-14staging: r8188eu: mark IsFrameTypeCtrl as boolVihas Makwana1-1/+1
Mark IsFrameTypeCtrl as bool as it returns true/false. Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Vihas Makwana <makvihas@gmail.com> Link: https://lore.kernel.org/r/20220302204737.49056-16-makvihas@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-03-14staging: r8188eu: mark IS_MCAST as boolVihas Makwana1-1/+1
Mark IS_MCAST as bool as it returns true/false. Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Vihas Makwana <makvihas@gmail.com> Link: https://lore.kernel.org/r/20220302204737.49056-15-makvihas@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-03-01staging: r8188eu: use ieee80211 helper to read the "order" bitMartin Kaiser1-3/+0
Use the ieee80211 helper to read the "order" bit. The driver-specific macro GetOrder can be removed. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220227164147.1168847-9-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-03-01staging: r8188eu: use ieee80211 helper to read "more data"Martin Kaiser1-2/+0
Use the ieee80211 helper to read the "more data" bit. The driver-specific macro GetMData can be removed. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220227164147.1168847-7-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-03-01staging: r8188eu: use ieee80211 helper to check for more fragmentsMartin Kaiser1-2/+0
Use the ieee80211 helper to check the "more fragments" bit. Remove the internal GetMFrag macro. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220227164147.1168847-6-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-03-01staging: r8188eu: use ieee80211 define for management frame typeMartin Kaiser1-13/+12
Replace the driver-internal define for management frame type with IEEE80211_FTYPE_MGMT. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220227164147.1168847-2-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-31staging: r8188eu: max_rx_ampdu_factor is always MAX_AMPDU_FACTOR_64KMichael Straube1-6/+1
The local variable max_rx_ampdu_factor in rtw_restructure_ht_ie() and issue_action_BA() is always set to MAX_AMPDU_FACTOR_64K. Remove the variable from both functions and use MAX_AMPDU_FACTOR_64K directly. The case HW_VAR_MAX_RX_AMPDU_FACTOR in GetHalDefVar8188EUsb() is now unused and can be removed. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20220128115445.6606-4-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-03staging: r8188eu: add spaces around P2P_AP_P2P_CH_SWITCH_PROCESS_WKAlberto Merciai1-1/+1
Remove checkpatch.pl error by adding spaces around P2P_AP_P2P_CH_SWITCH_PROCESS_WK. Signed-off-by: Alberto Merciai <alb3rt0.m3rciai@gmail.com> Link: https://lore.kernel.org/r/20220103115633.221853-1-alb3rt0.m3rciai@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-11-17staging: r8188eu: remove unused defines in wifi.hZameer Manji1-57/+0
None of these defines in wifi.h are used so they can be safely removed. Reviewed-by: Pavel Skripkin <paskripkin@gmail.com> Signed-off-by: Zameer Manji <zmanji@gmail.com> Link: https://lore.kernel.org/r/20211116011451.896714-1-zmanji@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-13staging: r8188eu: remove commented constants from wifi.hMichael Straube1-50/+0
Remove commented constants from wifi.h. Acked-by: Phillip Potter <phil@philpotter.co.uk> Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210829180717.15393-2-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-13staging: r8188eu: remove unused constants from wifi.hMichael Straube1-2/+0
The constants WLAN_REASON_PWR_CAPABILITY_NOT_VALID and WLAN_REASON_SUPPORTED_CHANNEL_NOT_VALID defined in wifi.h are unused, remove them. Acked-by: Phillip Potter <phil@philpotter.co.uk> Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210829180717.15393-1-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-08-16staging: r8188eu: use common ieee80211 constantsMichael Straube1-50/+0
Many defined constants in wifi.h are unused and/or available from <linux/ieee80211.h>, some with slightly different names. Remove the constants from wifi.h and use the common ones. Rename where necessary. Acked-by: Phillip Potter <phil@philpotter.co.uk> Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210814165518.8672-1-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-08-12staging: r8188eu: Remove all 5GHz network typesFabio M. De Francesco1-1/+1
Remove all 5Ghz network types. r8188eu works on 802.11bgn standards and on 2.4Ghz band. Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com> Link: https://lore.kernel.org/r/20210812002519.23678-2-fmdefrancesco@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-08-06staging: r8188eu: replace custom macros with is_broadcast_ether_addrMichael Straube1-7/+0
Replace usage of custom macros with is_broadcast_ether_addr. All buffers are properly aligned. Remove the now unsued macros MacAddr_isBcst and IS_MAC_ADDRESS_BROADCAST. Signed-off-by: Michael Straube <straube.linux@gmail.com> Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Link: https://lore.kernel.org/r/20210805205010.31192-1-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-07-30staging: r8188eu: Remove tests of kernel versionLarry Finger1-3/+0
In the GitHub repository from which this driver was derived, old kernels had to be supported. Now that the driver is included in the kernel, this code can be removed as well as all mention of version.h. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Link: https://lore.kernel.org/r/20210729170930.23171-3-Larry.Finger@lwfinger.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-07-30staging: r8188eu: Convert header copyright info to SPDX format, part 3Larry Finger1-19/+3
Before this driver can be incorporated in the drivers/net/wireless tree, the copyright info in all files must be converted to SPDX notation. This patch converts the next 49 files. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Link: https://lore.kernel.org/r/20210729164814.32097-4-Larry.Finger@lwfinger.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-07-28staging: r8188eu: introduce new include dir for RTL8188eu driverPhillip Potter1-0/+1105
This patchset is split in order to keep the file sizes down. This include directory is part of the newer/better driver from GitHub modified by Larry Finger. Import this as the basis for all future work going forward. Suggested-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Phillip Potter <phil@philpotter.co.uk> Link: https://lore.kernel.org/r/20210727232219.2948-5-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>