summaryrefslogtreecommitdiff
path: root/net-wireless/compat-wireless/files/compat-wireless-3.6.6-grsec-warnings.patch
blob: 825b40927f8759a728414be5bc08abe187c3e0a5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
Fixes for:
drivers/net/wireless/ath/wil6210/cfg80211.c:527:2: warning: initialization from incompatible pointer type [enabled by default]
drivers/net/wireless/ath/wil6210/cfg80211.c:527:2: warning: (near initialization for ‘wil_cfg80211_ops.scan’) [enabled by default]
drivers/net/wireless/ath/wil6210/cfg80211.c:534:2: warning: initialization from incompatible pointer type [enabled by default]
drivers/net/wireless/ath/wil6210/cfg80211.c:534:2: warning: (near initialization for ‘wil_cfg80211_ops.mgmt_tx’) [enabled by default]
drivers/net/wireless/ath/wil6210/cfg80211.c:535:2: warning: initialization from incompatible pointer type [enabled by default]
drivers/net/wireless/ath/wil6210/cfg80211.c:535:2: warning: (near initialization for ‘wil_cfg80211_ops.mgmt_frame_register’) [enabled by default]
--- drivers/net/wireless/ath/wil6210/cfg80211.c
+++ drivers/net/wireless/ath/wil6210/cfg80211.c
@@ -351,6 +351,12 @@
 	return wmi_send_cmd(wil, &wmi_scan);
 }
 
+static int wil_cfg80211_scan_no_ndev(struct wiphy *wiphy,
+                 struct cfg80211_scan_request *request)
+{                                         
+    return wil_cfg80211_scan(wiphy, NULL, request);
+}
+
 static int wil_cfg80211_connect(struct wiphy *wiphy, struct net_device *ndev,
 				 struct cfg80211_connect_params *sme)
 {
@@ -486,7 +492,7 @@
 	return 0;
 }
 
-static int wil_mgmt_tx(struct wiphy *wiphy, struct net_device *ndev,
+static int wil_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *ndev,
 		struct ieee80211_channel *chan, bool offchan,
 		enum nl80211_channel_type channel_type,
 		bool channel_type_valid, unsigned int wait,
@@ -502,7 +508,7 @@
 }
 
 static void wil_mgmt_frame_register(struct wiphy *wiphy,
-		struct net_device *ndev, u16 frame_type, bool reg)
+		struct wireless_dev *ndev, u16 frame_type, bool reg)
 {
 	struct wil6210_priv *wil = wiphy_to_wil(wiphy);
 	wil_info(wil, "%s()\n", __func__);
@@ -524,7 +530,7 @@
 }
 
 static struct cfg80211_ops wil_cfg80211_ops = {
-	.scan = wil_cfg80211_scan,
+	.scan = wil_cfg80211_scan_no_ndev,
 	.connect = wil_cfg80211_connect,
 	.disconnect = wil_cfg80211_disconnect,
 	.set_tx_power = wil_cfg80211_set_txpower,
Fixes for:
drivers/net/wireless/ath/ath6kl/sdio.c: In function ‘ath6kl_sdio_alloc_prep_scat_req’:
drivers/net/wireless/ath/ath6kl/sdio.c:1478:1: warning: find_arg_number: cannot find the buf_sz argument in ath6kl_sdio_alloc_prep_scat_req [enabled by default]
drivers/net/wireless/ath/ath6kl/sdio.c:1478:1: warning: find_arg_number: cannot find the sg_sz argument in ath6kl_sdio_alloc_prep_scat_req [enabled by default]
--- drivers/net/wireless/ath/ath6kl/sdio.c
+++ drivers/net/wireless/ath/ath6kl/sdio.c
@@ -341,11 +341,14 @@
 	scat_list_sz = (n_scat_entry - 1) * sizeof(struct hif_scatter_item);
 	scat_req_sz = sizeof(*s_req) + scat_list_sz;
 
-	if (!virt_scat)
+	if (!virt_scat) {
 		sg_sz = sizeof(struct scatterlist) * n_scat_entry;
-	else
+		buf_sz = 0;
+	} else {
+		sg_sz = 0;
 		buf_sz =  2 * L1_CACHE_BYTES +
 			  ATH6KL_MAX_TRANSFER_SIZE_PER_SCATTER;
+	}
 
 	for (i = 0; i < n_scat_req; i++) {
 		/* allocate the scatter request */
Fixes for:
drivers/net/wireless/ipw2x00/libipw_wx.c:526:21: warning: unused variable ‘dev’ [-Wunused-variable]
--- drivers/net/wireless/ipw2x00/libipw_wx.c
+++ drivers/net/wireless/ipw2x00/libipw_wx.c
@@ -523,7 +523,7 @@
 			       struct iw_request_info *info,
 			       union iwreq_data *wrqu, char *extra)
 {
-	struct net_device *dev = ieee->dev;
+	// struct net_device *dev = ieee->dev;
 	struct iw_point *encoding = &wrqu->encoding;
 	struct iw_encode_ext *ext = (struct iw_encode_ext *)extra;
 	int i, idx, ret = 0;
@@ -599,7 +599,7 @@
 		break;
 	default:
 		LIBIPW_DEBUG_WX("%s: unknown crypto alg %d\n",
-				   dev->name, ext->alg);
+				   ieee->dev->name, ext->alg);
 		ret = -EINVAL;
 		goto done;
 	}
@@ -611,7 +611,7 @@
 	}
 	if (ops == NULL) {
 		LIBIPW_DEBUG_WX("%s: unknown crypto alg %d\n",
-				   dev->name, ext->alg);
+				   ieee->dev->name, ext->alg);
 		ret = -EINVAL;
 		goto done;
 	}
@@ -640,7 +640,7 @@
 	if (ext->key_len > 0 && (*crypt)->ops->set_key &&
 	    (*crypt)->ops->set_key(ext->key, ext->key_len, ext->rx_seq,
 				   (*crypt)->priv) < 0) {
-		LIBIPW_DEBUG_WX("%s: key setting failed\n", dev->name);
+		LIBIPW_DEBUG_WX("%s: key setting failed\n", ieee->dev->name);
 		ret = -EINVAL;
 		goto done;
 	}
Fixes for:
compat/compat-3.7.c:37:2: warning: passing argument 1 of ‘pci_find_capability’ discards ‘const’ qualifier from pointer target type [enabled by default]
--- compat/compat-3.7.c
+++ compat/compat-3.7.c
@@ -29,7 +29,7 @@
  * pci_dev but if we found it we likely would remove it from
  * the kernel anyway right? Bite me.
  */
-static inline u16 pcie_flags_reg(const struct pci_dev *dev)
+static inline u16 pcie_flags_reg(struct pci_dev *dev)
 {
 	int pos;
 	u16 reg16;
@@ -43,12 +43,12 @@
 	return reg16;
 }
 
-static inline int pci_pcie_type(const struct pci_dev *dev)
+static inline int pci_pcie_type(struct pci_dev *dev)
 {
 	return (pcie_flags_reg(dev) & PCI_EXP_FLAGS_TYPE) >> 4;
 }
 
-static inline int pcie_cap_version(const struct pci_dev *dev)
+static inline int pcie_cap_version(struct pci_dev *dev)
 {
 	return pcie_flags_reg(dev) & PCI_EXP_FLAGS_VERS;
 }
@@ -58,7 +58,7 @@
 	return true;
 }
 
-static inline bool pcie_cap_has_lnkctl(const struct pci_dev *dev)
+static inline bool pcie_cap_has_lnkctl(struct pci_dev *dev)
 {
 	int type = pci_pcie_type(dev);
 
@@ -68,7 +68,7 @@
 	       type == PCI_EXP_TYPE_LEG_END;
 }
 
-static inline bool pcie_cap_has_sltctl(const struct pci_dev *dev)
+static inline bool pcie_cap_has_sltctl(struct pci_dev *dev)
 {
 	int type = pci_pcie_type(dev);
 
@@ -78,7 +78,7 @@
 		pcie_flags_reg(dev) & PCI_EXP_FLAGS_SLOT);
 }
 
-static inline bool pcie_cap_has_rtctl(const struct pci_dev *dev)
+static inline bool pcie_cap_has_rtctl(struct pci_dev *dev)
 {
 	int type = pci_pcie_type(dev);
 
--- drivers/net/wireless/ath/ath5k/debug.c
+++ drivers/net/wireless/ath/ath5k/debug.c
@@ -58,6 +58,7 @@
  * THE POSSIBILITY OF SUCH DAMAGES.
  */
 
+#undef pr_fmt
 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
 
 #include <linux/export.h>