hc
2023-12-09 b22da3d8526a935aa31e086e63f60ff3246cb61c
kernel/drivers/staging/rtl8192e/rtllib.h
....@@ -1,3 +1,4 @@
1
+/* SPDX-License-Identifier: GPL-2.0 */
12 /*
23 * Merged with mainline rtllib.h in Aug 2004. Original ieee802_11
34 * remains copyright by the original authors
....@@ -15,11 +16,6 @@
1516 *
1617 * Modified for Realtek's wi-fi cards by Andrea Merello
1718 * <andrea.merello@gmail.com>
18
- *
19
- * This program is free software; you can redistribute it and/or modify
20
- * it under the terms of the GNU General Public License version 2 as
21
- * published by the Free Software Foundation. See README and COPYING for
22
- * more details.
2319 */
2420 #ifndef RTLLIB_H
2521 #define RTLLIB_H
....@@ -483,7 +479,6 @@
483479 #define P80211_OUI_LEN 3
484480
485481 struct rtllib_snap_hdr {
486
-
487482 u8 dsap; /* always 0xAA */
488483 u8 ssap; /* always 0xAA */
489484 u8 ctrl; /* always 0x03 */
....@@ -733,14 +728,14 @@
733728 struct rtllib_hdr {
734729 __le16 frame_ctl;
735730 __le16 duration_id;
736
- u8 payload[0];
731
+ u8 payload[];
737732 } __packed;
738733
739734 struct rtllib_hdr_1addr {
740735 __le16 frame_ctl;
741736 __le16 duration_id;
742737 u8 addr1[ETH_ALEN];
743
- u8 payload[0];
738
+ u8 payload[];
744739 } __packed;
745740
746741 struct rtllib_hdr_2addr {
....@@ -748,7 +743,7 @@
748743 __le16 duration_id;
749744 u8 addr1[ETH_ALEN];
750745 u8 addr2[ETH_ALEN];
751
- u8 payload[0];
746
+ u8 payload[];
752747 } __packed;
753748
754749 struct rtllib_hdr_3addr {
....@@ -758,7 +753,7 @@
758753 u8 addr2[ETH_ALEN];
759754 u8 addr3[ETH_ALEN];
760755 __le16 seq_ctl;
761
- u8 payload[0];
756
+ u8 payload[];
762757 } __packed;
763758
764759 struct rtllib_hdr_4addr {
....@@ -769,7 +764,7 @@
769764 u8 addr3[ETH_ALEN];
770765 __le16 seq_ctl;
771766 u8 addr4[ETH_ALEN];
772
- u8 payload[0];
767
+ u8 payload[];
773768 } __packed;
774769
775770 struct rtllib_hdr_3addrqos {
....@@ -780,7 +775,7 @@
780775 u8 addr3[ETH_ALEN];
781776 __le16 seq_ctl;
782777 __le16 qos_ctl;
783
- u8 payload[0];
778
+ u8 payload[];
784779 } __packed;
785780
786781 struct rtllib_hdr_4addrqos {
....@@ -792,13 +787,13 @@
792787 __le16 seq_ctl;
793788 u8 addr4[ETH_ALEN];
794789 __le16 qos_ctl;
795
- u8 payload[0];
790
+ u8 payload[];
796791 } __packed;
797792
798793 struct rtllib_info_element {
799794 u8 id;
800795 u8 len;
801
- u8 data[0];
796
+ u8 data[];
802797 } __packed;
803798
804799 struct rtllib_authentication {
....@@ -807,7 +802,7 @@
807802 __le16 transaction;
808803 __le16 status;
809804 /*challenge*/
810
- struct rtllib_info_element info_element[0];
805
+ struct rtllib_info_element info_element[];
811806 } __packed;
812807
813808 struct rtllib_disauth {
....@@ -823,7 +818,7 @@
823818 struct rtllib_probe_request {
824819 struct rtllib_hdr_3addr header;
825820 /* SSID, supported rates */
826
- struct rtllib_info_element info_element[0];
821
+ struct rtllib_info_element info_element[];
827822 } __packed;
828823
829824 struct rtllib_probe_response {
....@@ -834,7 +829,7 @@
834829 /* SSID, supported rates, FH params, DS params,
835830 * CF params, IBSS params, TIM (if beacon), RSN
836831 */
837
- struct rtllib_info_element info_element[0];
832
+ struct rtllib_info_element info_element[];
838833 } __packed;
839834
840835 /* Alias beacon for probe_response */
....@@ -845,7 +840,7 @@
845840 __le16 capability;
846841 __le16 listen_interval;
847842 /* SSID, supported rates, RSN */
848
- struct rtllib_info_element info_element[0];
843
+ struct rtllib_info_element info_element[];
849844 } __packed;
850845
851846 struct rtllib_assoc_response_frame {
....@@ -853,7 +848,7 @@
853848 __le16 capability;
854849 __le16 status;
855850 __le16 aid;
856
- struct rtllib_info_element info_element[0]; /* supported rates */
851
+ struct rtllib_info_element info_element[]; /* supported rates */
857852 } __packed;
858853
859854 struct rtllib_txb {
....@@ -864,7 +859,7 @@
864859 u16 reserved;
865860 __le16 frag_size;
866861 __le16 payload_size;
867
- struct sk_buff *fragments[0];
862
+ struct sk_buff *fragments[];
868863 };
869864
870865 #define MAX_SUBFRAME_COUNT 64
....@@ -1560,11 +1555,11 @@
15601555 u16 scan_watch_dog;
15611556
15621557 /* map of allowed channels. 0 is dummy */
1563
- void *pDot11dInfo;
1564
- bool bGlobalDomain;
1558
+ void *dot11d_info;
1559
+ bool global_domain;
15651560 u8 active_channel_map[MAX_CHANNEL_NUMBER+1];
15661561
1567
- u8 IbssStartChnl;
1562
+ u8 bss_start_channel;
15681563 u8 ibss_maxjoin_chal;
15691564
15701565 int rate; /* current rate */
....@@ -1797,7 +1792,7 @@
17971792 /* This must be the last item so that it points to the data
17981793 * allocated beyond this structure by alloc_rtllib
17991794 */
1800
- u8 priv[0];
1795
+ u8 priv[];
18011796 };
18021797
18031798 #define IEEE_A (1<<0)
....@@ -1944,7 +1939,7 @@
19441939 int hdr_len);
19451940
19461941 int rtllib_xmit(struct sk_buff *skb, struct net_device *dev);
1947
-void rtllib_txb_free(struct rtllib_txb *);
1942
+void rtllib_txb_free(struct rtllib_txb *txb);
19481943
19491944 /* rtllib_rx.c */
19501945 int rtllib_rx(struct rtllib_device *ieee, struct sk_buff *skb,
....@@ -1987,7 +1982,7 @@
19871982 void rtllib_stop_send_beacons(struct rtllib_device *ieee);
19881983 void notify_wx_assoc_event(struct rtllib_device *ieee);
19891984 void rtllib_start_ibss(struct rtllib_device *ieee);
1990
-void rtllib_softmac_init(struct rtllib_device *ieee);
1985
+int rtllib_softmac_init(struct rtllib_device *ieee);
19911986 void rtllib_softmac_free(struct rtllib_device *ieee);
19921987 void rtllib_disassociate(struct rtllib_device *ieee);
19931988 void rtllib_stop_scan(struct rtllib_device *ieee);
....@@ -2136,7 +2131,7 @@
21362131 return escaped;
21372132 }
21382133
2139
- snprintf(escaped, sizeof(escaped), "%*pEn", essid_len, essid);
2134
+ snprintf(escaped, sizeof(escaped), "%*pE", essid_len, essid);
21402135 return escaped;
21412136 }
21422137