]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob
10afc87d6fcf3d4f9588638f0185fe66e09c6a78
[thirdparty/kernel/stable-queue.git] /
1 From 073863432f7eaa23c7c09733414d4be2eabf5eef Mon Sep 17 00:00:00 2001
2 From: Larry Finger <Larry.Finger@lwfinger.net>
3 Date: Thu, 9 Feb 2012 16:37:17 -0600
4 Subject: staging: r8712u: Add missing initialization and remove configuration parameter CONFIG_R8712_AP
5
6 From: Larry Finger <Larry.Finger@lwfinger.net>
7
8 commit 073863432f7eaa23c7c09733414d4be2eabf5eef upstream.
9
10 When this driver was upgraded to the vendor 20100831 version in
11 commit 93c55dda092c7 et al,, one listhead initialization was missed.
12 This broke complete operation of the driver whenever AP mode was
13 enabled. This fixes https://bugs.archlinux.org/task/27996.
14
15 The configuration parameter R8712_AP is misleading as the driver cannot
16 function as an AP without a heavily hacked version of hostapd. Thus, it
17 makes sense to remove the parameter; however the code and data configured
18 for the option is left in.
19
20 Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
21 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
22
23
24 ---
25 drivers/staging/rtl8712/Kconfig | 7 -------
26 drivers/staging/rtl8712/rtl871x_sta_mgt.c | 4 ----
27 drivers/staging/rtl8712/sta_info.h | 4 ----
28 3 files changed, 15 deletions(-)
29
30 --- a/drivers/staging/rtl8712/Kconfig
31 +++ b/drivers/staging/rtl8712/Kconfig
32 @@ -9,13 +9,6 @@ config R8712U
33 This option adds the Realtek RTL8712 USB device such as the D-Link DWA-130.
34 If built as a module, it will be called r8712u.
35
36 -config R8712_AP
37 - bool "Realtek RTL8712U AP code"
38 - depends on R8712U
39 - default N
40 - ---help---
41 - This option allows the Realtek RTL8712 USB device to be an Access Point.
42 -
43 config R8712_TX_AGGR
44 bool "Realtek RTL8712U Transmit Aggregation code"
45 depends on R8712U && BROKEN
46 --- a/drivers/staging/rtl8712/rtl871x_sta_mgt.c
47 +++ b/drivers/staging/rtl8712/rtl871x_sta_mgt.c
48 @@ -42,10 +42,8 @@ static void _init_stainfo(struct sta_inf
49 _init_listhead(&psta->hash_list);
50 _r8712_init_sta_xmit_priv(&psta->sta_xmitpriv);
51 _r8712_init_sta_recv_priv(&psta->sta_recvpriv);
52 -#ifdef CONFIG_R8712_AP
53 _init_listhead(&psta->asoc_list);
54 _init_listhead(&psta->auth_list);
55 -#endif
56 }
57
58 u32 _r8712_init_sta_priv(struct sta_priv *pstapriv)
59 @@ -72,10 +70,8 @@ u32 _r8712_init_sta_priv(struct sta_priv
60 get_list_head(&pstapriv->free_sta_queue));
61 psta++;
62 }
63 -#ifdef CONFIG_R8712_AP
64 _init_listhead(&pstapriv->asoc_list);
65 _init_listhead(&pstapriv->auth_list);
66 -#endif
67 return _SUCCESS;
68 }
69
70 --- a/drivers/staging/rtl8712/sta_info.h
71 +++ b/drivers/staging/rtl8712/sta_info.h
72 @@ -90,7 +90,6 @@ struct sta_info {
73 * curr_network(mlme_priv/security_priv/qos/ht) : AP CAP/INFO
74 * sta_info: (AP & STA) CAP/INFO
75 */
76 -#ifdef CONFIG_R8712_AP
77 struct list_head asoc_list;
78 struct list_head auth_list;
79 unsigned int expire_to;
80 @@ -98,7 +97,6 @@ struct sta_info {
81 unsigned int authalg;
82 unsigned char chg_txt[128];
83 unsigned int tx_ra_bitmap;
84 -#endif
85 };
86
87 struct sta_priv {
88 @@ -111,13 +109,11 @@ struct sta_priv {
89 struct __queue sleep_q;
90 struct __queue wakeup_q;
91 struct _adapter *padapter;
92 -#ifdef CONFIG_R8712_AP
93 struct list_head asoc_list;
94 struct list_head auth_list;
95 unsigned int auth_to; /* sec, time to expire in authenticating. */
96 unsigned int assoc_to; /* sec, time to expire before associating. */
97 unsigned int expire_to; /* sec , time to expire after associated. */
98 -#endif
99 };
100
101 static inline u32 wifi_mac_hash(u8 *mac)