Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1252328

[PATCH 06/19] staging/wilc1000: avoid static definitions in header

Path csiph.com!goblin1!goblin2!goblin.stu.neva.ru!gothmog.csi.it!bofh.it!news.nic.it!robomod
From Arnd Bergmann <arnd@arndb.de>
Newsgroups linux.kernel
Subject [PATCH 06/19] staging/wilc1000: avoid static definitions in header
Date Wed, 21 Oct 2015 01:00:02 +0200
Message-ID <qlO2S-10k-19@gated-at.bofh.it> (permalink)
References <qlNTc-O7-17@gated-at.bofh.it>
X-Original-To linux-wireless@vger.kernel.org
X-Mailer git-send-email 2.1.0.rc2
X-Provags-ID V03:K0:58qLzjvo/MElXkBvj08kgu41bNOrOp4u4YQ5XxwfNDg6xmH+4vK a9ITu1+ooVNWUye1yDH0Ttj68AssqoXchO9pxppzU6UIIceZECuZt0b/cbVqWKzLLjUuyYV gS0wiY9cRb/wICsigAjIYQ6nUBo+tstdFUnkZqXT0aXOO5x4TW3lhuSkuRW5OO/BgW2cgbd 1xAGwHIarrwDPjG1dWQHA==
X-Ui-Out-Filterresults notjunk:1;V01:K0:glamqFMsdpE=:PlV+Q6ELpirSFwQLmhDO4N uZ4lUJuRLnfObU/tD95zv6VmlJI76vecyAuJJe3pii5ugZ2gkDAt5c3nE6MGwCcHA7WOS3v+L +3nyGGWSt8RvmONtmUg6sn0v4WrQrjyvkr2UAoHYY1xKOVSKKLI0lJGOFzEjLaSxBTrva9Vn8 34PBzpweWmmuQsRx5IgCjlmicP7gaZ7TyL4op/sjGMFfUL87z8RnmE5dJprKKLxYIvsyIoBaa to5mDuNpEGHMJo28gKiH2v8ck94Rfjox9NqOOm/UpuNpd/QjVcTTalC1EmafVX9IzEz6S9Wbz 7zXE6FcCIrORbR1gSFn/40YLJuHvaIL6j6dUYUlIgmGe1C+djb11zGJ9G4O1uLKAnLbTJnq4T SP7UzBwTUU7Cs+yEWbjZvlk4AA1CKn/S7iQbcIMoVZ1sHCu6RPEdkxa84j3l1jJrpxxS9EsjZ ahH2Fc8y/4szaVffOv9nYYNbaAsKrkbCcrX+u5zWMZb1ArzytNPKTF5sgPOGZBVXZWK/fZqpL 2V9T326tRhIKFhTJ0g8ttMKrvq4V8Kwc2eai74+CQsj2YxCIDv+Nb0YhlHUmMRfqRtmPeF8KD Txq9fft7pRrhb4lVH3JfoGuJjpZvY0TF2ijU6Tau0WzEHLNpMsYzgaOC2xtWFbBaqL3AScAYh rjDpRhxtcGsZClJdsreEHtrKDYegciR4Zh2Wd0q7Qo0P2CtQ6GSyiNUOvzVBa9wL4YZQ=
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 215
Organization linux.* mail to news gateway
X-Original-Cc Rachel Kim <rachel.kim@atmel.com>, devel@driverdev.osuosl.org, Chris Park <chris.park@atmel.com>, gregkh@linuxfoundation.org, Stanislav Kholmanskikh <kholmanskikh.s.s@gmail.com>, Johnny Kim <johnny.kim@atmel.com>, linux-kernel@vger.kernel.org, Tony Cho <tony.cho@atmel.com>, Glen Lee <glen.lee@atmel.com>, Leo Kim <leo.kim@atmel.com>, Arnd Bergmann <arnd@arndb.de>
X-Original-Date Wed, 21 Oct 2015 00:47:25 +0200
X-Original-Message-ID <1445381258-1455986-7-git-send-email-arnd@arndb.de>
X-Original-References <1445381258-1455986-1-git-send-email-arnd@arndb.de>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1252328

Show key headers only | View raw


The wilc_wfi_cfgoperations.h header defines the ieee80211_txrx_stypes
and cipher_suites variables that are only used in wilc_wfi_cfgoperations.c
and should not be shared in a header file.

This moves over all that data into the .c file, and also moves all
the macro definitions from the file that are also not needed here.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 84 +++++++++++++++++++++++
 drivers/staging/wilc1000/wilc_wfi_cfgoperations.h | 83 ----------------------
 2 files changed, 84 insertions(+), 83 deletions(-)

diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
index 0ed05aafa5bf..702c40c1df4b 100644
--- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
+++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
@@ -17,6 +17,90 @@
 #include "host_interface.h"
 #include <linux/errno.h>
 
+/* The following macros describe the bitfield map used by the firmware to determine its 11i mode */
+#define NO_ENCRYPT		0
+#define ENCRYPT_ENABLED		BIT(0)
+#define WEP			BIT(1)
+#define WEP_EXTENDED		BIT(2)
+#define WPA			BIT(3)
+#define WPA2			BIT(4)
+#define AES			BIT(5)
+#define TKIP			BIT(6)
+
+/*Public action frame index IDs*/
+#define FRAME_TYPE_ID			0
+#define ACTION_CAT_ID			24
+#define ACTION_SUBTYPE_ID		25
+#define P2P_PUB_ACTION_SUBTYPE		30
+
+/*Public action frame Attribute IDs*/
+#define ACTION_FRAME			0xd0
+#define GO_INTENT_ATTR_ID		0x04
+#define CHANLIST_ATTR_ID		0x0b
+#define OPERCHAN_ATTR_ID		0x11
+#define PUB_ACTION_ATTR_ID		0x04
+#define P2PELEM_ATTR_ID			0xdd
+
+/*Public action subtype values*/
+#define GO_NEG_REQ			0x00
+#define GO_NEG_RSP			0x01
+#define GO_NEG_CONF			0x02
+#define P2P_INV_REQ			0x03
+#define P2P_INV_RSP			0x04
+#define PUBLIC_ACT_VENDORSPEC		0x09
+#define GAS_INTIAL_REQ			0x0a
+#define GAS_INTIAL_RSP			0x0b
+
+#define INVALID_CHANNEL			0
+
+#define nl80211_SCAN_RESULT_EXPIRE	(3 * HZ)
+#define SCAN_RESULT_EXPIRE		(40 * HZ)
+
+static const u32 cipher_suites[] = {
+	WLAN_CIPHER_SUITE_WEP40,
+	WLAN_CIPHER_SUITE_WEP104,
+	WLAN_CIPHER_SUITE_TKIP,
+	WLAN_CIPHER_SUITE_CCMP,
+	WLAN_CIPHER_SUITE_AES_CMAC,
+};
+
+static const struct ieee80211_txrx_stypes
+	wilc_wfi_cfg80211_mgmt_types[NUM_NL80211_IFTYPES] = {
+	[NL80211_IFTYPE_STATION] = {
+		.tx = 0xffff,
+		.rx = BIT(IEEE80211_STYPE_ACTION >> 4) |
+			BIT(IEEE80211_STYPE_PROBE_REQ >> 4)
+	},
+	[NL80211_IFTYPE_AP] = {
+		.tx = 0xffff,
+		.rx = BIT(IEEE80211_STYPE_ASSOC_REQ >> 4) |
+			BIT(IEEE80211_STYPE_REASSOC_REQ >> 4) |
+			BIT(IEEE80211_STYPE_PROBE_REQ >> 4) |
+			BIT(IEEE80211_STYPE_DISASSOC >> 4) |
+			BIT(IEEE80211_STYPE_AUTH >> 4) |
+			BIT(IEEE80211_STYPE_DEAUTH >> 4) |
+			BIT(IEEE80211_STYPE_ACTION >> 4)
+	},
+	[NL80211_IFTYPE_P2P_CLIENT] = {
+		.tx = 0xffff,
+		.rx = BIT(IEEE80211_STYPE_ACTION >> 4) |
+			BIT(IEEE80211_STYPE_PROBE_REQ >> 4) |
+			BIT(IEEE80211_STYPE_ASSOC_REQ >> 4) |
+			BIT(IEEE80211_STYPE_REASSOC_REQ >> 4) |
+			BIT(IEEE80211_STYPE_DISASSOC >> 4) |
+			BIT(IEEE80211_STYPE_AUTH >> 4) |
+			BIT(IEEE80211_STYPE_DEAUTH >> 4)
+	}
+};
+
+/* Time to stay on the channel */
+#define WILC_WFI_DWELL_PASSIVE 100
+#define WILC_WFI_DWELL_ACTIVE  40
+
+#define TCP_ACK_FILTER_LINK_SPEED_THRESH	54
+#define DEFAULT_LINK_SPEED			72
+
+
 #define IS_MANAGMEMENT				0x100
 #define IS_MANAGMEMENT_CALLBACK			0x080
 #define IS_MGMT_STATUS_SUCCES			0x040
diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.h b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.h
index ae2aaea508db..158d98c0eb87 100644
--- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.h
+++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.h
@@ -10,86 +10,6 @@
 #define NM_WFI_CFGOPERATIONS
 #include "wilc_wfi_netdevice.h"
 
-/* The following macros describe the bitfield map used by the firmware to determine its 11i mode */
-#define NO_ENCRYPT		0
-#define ENCRYPT_ENABLED		BIT(0)
-#define WEP			BIT(1)
-#define WEP_EXTENDED		BIT(2)
-#define WPA			BIT(3)
-#define WPA2			BIT(4)
-#define AES			BIT(5)
-#define TKIP			BIT(6)
-
-/*Public action frame index IDs*/
-#define FRAME_TYPE_ID			0
-#define ACTION_CAT_ID			24
-#define ACTION_SUBTYPE_ID		25
-#define P2P_PUB_ACTION_SUBTYPE		30
-
-/*Public action frame Attribute IDs*/
-#define ACTION_FRAME			0xd0
-#define GO_INTENT_ATTR_ID		0x04
-#define CHANLIST_ATTR_ID		0x0b
-#define OPERCHAN_ATTR_ID		0x11
-#define PUB_ACTION_ATTR_ID		0x04
-#define P2PELEM_ATTR_ID			0xdd
-
-/*Public action subtype values*/
-#define GO_NEG_REQ			0x00
-#define GO_NEG_RSP			0x01
-#define GO_NEG_CONF			0x02
-#define P2P_INV_REQ			0x03
-#define P2P_INV_RSP			0x04
-#define PUBLIC_ACT_VENDORSPEC		0x09
-#define GAS_INTIAL_REQ			0x0a
-#define GAS_INTIAL_RSP			0x0b
-
-#define INVALID_CHANNEL			0
-
-#define nl80211_SCAN_RESULT_EXPIRE	(3 * HZ)
-#define SCAN_RESULT_EXPIRE		(40 * HZ)
-
-static const u32 cipher_suites[] = {
-	WLAN_CIPHER_SUITE_WEP40,
-	WLAN_CIPHER_SUITE_WEP104,
-	WLAN_CIPHER_SUITE_TKIP,
-	WLAN_CIPHER_SUITE_CCMP,
-	WLAN_CIPHER_SUITE_AES_CMAC,
-};
-
-static const struct ieee80211_txrx_stypes
-	wilc_wfi_cfg80211_mgmt_types[NUM_NL80211_IFTYPES] = {
-	[NL80211_IFTYPE_STATION] = {
-		.tx = 0xffff,
-		.rx = BIT(IEEE80211_STYPE_ACTION >> 4) |
-			BIT(IEEE80211_STYPE_PROBE_REQ >> 4)
-	},
-	[NL80211_IFTYPE_AP] = {
-		.tx = 0xffff,
-		.rx = BIT(IEEE80211_STYPE_ASSOC_REQ >> 4) |
-			BIT(IEEE80211_STYPE_REASSOC_REQ >> 4) |
-			BIT(IEEE80211_STYPE_PROBE_REQ >> 4) |
-			BIT(IEEE80211_STYPE_DISASSOC >> 4) |
-			BIT(IEEE80211_STYPE_AUTH >> 4) |
-			BIT(IEEE80211_STYPE_DEAUTH >> 4) |
-			BIT(IEEE80211_STYPE_ACTION >> 4)
-	},
-	[NL80211_IFTYPE_P2P_CLIENT] = {
-		.tx = 0xffff,
-		.rx = BIT(IEEE80211_STYPE_ACTION >> 4) |
-			BIT(IEEE80211_STYPE_PROBE_REQ >> 4) |
-			BIT(IEEE80211_STYPE_ASSOC_REQ >> 4) |
-			BIT(IEEE80211_STYPE_REASSOC_REQ >> 4) |
-			BIT(IEEE80211_STYPE_DISASSOC >> 4) |
-			BIT(IEEE80211_STYPE_AUTH >> 4) |
-			BIT(IEEE80211_STYPE_DEAUTH >> 4)
-	}
-};
-
-/* Time to stay on the channel */
-#define WILC_WFI_DWELL_PASSIVE 100
-#define WILC_WFI_DWELL_ACTIVE  40
-
 struct wireless_dev *wilc_create_wiphy(struct net_device *net);
 void wilc_free_wiphy(struct net_device *net);
 int WILC_WFI_update_stats(struct wiphy *wiphy, u32 pktlen, u8 changed);
@@ -101,7 +21,4 @@ struct net_device *WILC_WFI_init_mon_interface(const char *name, struct net_devi
 void wilc_mgmt_frame_register(struct wiphy *wiphy, struct wireless_dev *wdev,
 			      u16 frame_type, bool reg);
 
-#define TCP_ACK_FILTER_LINK_SPEED_THRESH	54
-#define DEFAULT_LINK_SPEED			72
-
 #endif
-- 
2.1.0.rc2

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 00/19] staging/wilc1000 cleanups Arnd Bergmann <arnd@arndb.de> - 2015-10-21 00:50 +0200
  [PATCH 17/19] staging/wilc1000: pass hif operations through initialization Arnd Bergmann <arnd@arndb.de> - 2015-10-21 00:50 +0200
  [PATCH 19/19] [RFC] staging/wilc1000: use more regular probing Arnd Bergmann <arnd@arndb.de> - 2015-10-21 00:50 +0200
  [PATCH 08/19] staging/wilc1000: move wilc_wlan_inp_t into struct wilc Arnd Bergmann <arnd@arndb.de> - 2015-10-21 01:00 +0200
  [PATCH 10/19] staging/wilc1000: unify device pointer Arnd Bergmann <arnd@arndb.de> - 2015-10-21 01:00 +0200
  [PATCH 04/19] staging/wilc1000: move extern declarations to headers Arnd Bergmann <arnd@arndb.de> - 2015-10-21 01:00 +0200
  [PATCH 05/19] staging/wilc1000: use NO_SECURITY instead of NO_ENCRYPT Arnd Bergmann <arnd@arndb.de> - 2015-10-21 01:00 +0200
  [PATCH 16/19] staging/wilc1000: remove WILC_SDIO/WILC_SPI macros Arnd Bergmann <arnd@arndb.de> - 2015-10-21 01:00 +0200
  [PATCH 14/19] staging/wilc1000: get rid of WILC_SDIO_IRQ_GPIO Arnd Bergmann <arnd@arndb.de> - 2015-10-21 01:00 +0200
  [PATCH 01/19] staging/wilc1000: remove unused functions Arnd Bergmann <arnd@arndb.de> - 2015-10-21 01:00 +0200
    Re: [PATCH 01/19] staging/wilc1000: remove unused functions Greg KH <gregkh@linuxfoundation.org> - 2015-10-25 09:30 +0100
  [PATCH 06/19] staging/wilc1000: avoid static definitions in header Arnd Bergmann <arnd@arndb.de> - 2015-10-21 01:00 +0200
  [PATCH 09/19] staging/wilc1000: move init/exit functions to driver files Arnd Bergmann <arnd@arndb.de> - 2015-10-21 01:00 +0200
  [PATCH 07/19] staging/wilc1000: remove linux_wlan_{device_power,device_detection} Arnd Bergmann <arnd@arndb.de> - 2015-10-21 01:00 +0200
  [PATCH 13/19] staging/wilc1000: move COMPLEMENT_BOOT code to linux_wlan_sdio.c Arnd Bergmann <arnd@arndb.de> - 2015-10-21 01:00 +0200
  [PATCH 18/19] staging/wilc1000: split out bus specific modules Arnd Bergmann <arnd@arndb.de> - 2015-10-21 01:00 +0200
    [PATCH] fixup! staging/wilc1000: split out bus specific modules Arnd Bergmann <arnd@arndb.de> - 2015-10-21 16:30 +0200
  [PATCH 02/19] staging/wilc1000: make symbols static if possible Arnd Bergmann <arnd@arndb.de> - 2015-10-21 01:00 +0200
  [PATCH 12/19] staging/wilc1000: use device pointer for phy creation Arnd Bergmann <arnd@arndb.de> - 2015-10-21 01:00 +0200
  Re: [PATCH 00/19] staging/wilc1000 cleanups glen lee <glen.lee@atmel.com> - 2015-10-21 12:10 +0200
    Re: [PATCH 00/19] staging/wilc1000 cleanups Arnd Bergmann <arnd@arndb.de> - 2015-10-21 13:00 +0200
    Re: [PATCH 00/19] staging/wilc1000 cleanups Arnd Bergmann <arnd@arndb.de> - 2015-10-22 14:30 +0200
      Re: [PATCH 00/19] staging/wilc1000 cleanups glen lee <glen.lee@atmel.com> - 2015-10-23 03:40 +0200
        Re: [PATCH 00/19] staging/wilc1000 cleanups Tony Cho <tony.cho@atmel.com> - 2015-10-23 10:00 +0200
          Re: [PATCH 00/19] staging/wilc1000 cleanups Tony Cho <tony.cho@atmel.com> - 2015-10-27 08:20 +0100

csiph-web