From: Claudiu Beznea <claudiu.beznea@gmail.com>
To: gregkh@linuxfoundation.org
Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org,
Claudiu Beznea <claudiu.beznea@gmail.com>
Subject: [PATCH 2/2] Staging: wlan-ng: convert p80211_stt_findproto() to static inline functions
Date: Tue, 15 Mar 2016 21:24:37 +0200 [thread overview]
Message-ID: <1458069877-20354-2-git-send-email-claudiu.beznea@gmail.com> (raw)
In-Reply-To: <1458069877-20354-1-git-send-email-claudiu.beznea@gmail.com>
This patch convert p80211_stt_findproto() to "static inline"
since it is used only in p80211conv.c file and also has
few instructins. After the scope was changed to static
the function definition was moved at the beginning of the
file to avoid undefined references.
Signed-off-by: Claudiu Beznea <claudiu.beznea@gmail.com>
---
drivers/staging/wlan-ng/p80211conv.c | 64 ++++++++++++++++++------------------
1 file changed, 32 insertions(+), 32 deletions(-)
diff --git a/drivers/staging/wlan-ng/p80211conv.c b/drivers/staging/wlan-ng/p80211conv.c
index 0a8f396..d3f62329 100644
--- a/drivers/staging/wlan-ng/p80211conv.c
+++ b/drivers/staging/wlan-ng/p80211conv.c
@@ -79,6 +79,38 @@ static u8 oui_rfc1042[] = { 0x00, 0x00, 0x00 };
static u8 oui_8021h[] = { 0x00, 0x00, 0xf8 };
/*----------------------------------------------------------------
+* p80211_stt_findproto
+*
+* Searches the 802.1h Selective Translation Table for a given
+* protocol.
+*
+* Arguments:
+* proto protocol number (in host order) to search for.
+*
+* Returns:
+* 1 - if the table is empty or a match is found.
+* 0 - if the table is non-empty and a match is not found.
+*
+* Call context:
+* May be called in interrupt or non-interrupt context
+*----------------------------------------------------------------
+*/
+static inline int p80211_stt_findproto(u16 proto)
+{
+ /* Always return found for now. This is the behavior used by the */
+ /* Zoom Win95 driver when 802.1h mode is selected */
+ /* TODO: If necessary, add an actual search we'll probably
+ * need this to match the CMAC's way of doing things.
+ * Need to do some testing to confirm.
+ */
+
+ if (proto == ETH_P_AARP) /* APPLETALK */
+ return 1;
+
+ return 0;
+}
+
+/*----------------------------------------------------------------
* p80211pb_ether_to_80211
*
* Uses the contents of the ether frame and the etherconv setting
@@ -509,38 +541,6 @@ int skb_p80211_to_ether(wlandevice_t *wlandev, u32 ethconv,
}
/*----------------------------------------------------------------
-* p80211_stt_findproto
-*
-* Searches the 802.1h Selective Translation Table for a given
-* protocol.
-*
-* Arguments:
-* proto protocol number (in host order) to search for.
-*
-* Returns:
-* 1 - if the table is empty or a match is found.
-* 0 - if the table is non-empty and a match is not found.
-*
-* Call context:
-* May be called in interrupt or non-interrupt context
-*----------------------------------------------------------------
-*/
-int p80211_stt_findproto(u16 proto)
-{
- /* Always return found for now. This is the behavior used by the */
- /* Zoom Win95 driver when 802.1h mode is selected */
- /* TODO: If necessary, add an actual search we'll probably
- * need this to match the CMAC's way of doing things.
- * Need to do some testing to confirm.
- */
-
- if (proto == ETH_P_AARP) /* APPLETALK */
- return 1;
-
- return 0;
-}
-
-/*----------------------------------------------------------------
* p80211skb_rxmeta_detach
*
* Disconnects the frmmeta and rxmeta from an skb.
--
1.9.1
next prev parent reply other threads:[~2016-03-15 19:25 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-15 19:24 [PATCH 1/2] Staging: wlan-ng: removed prototype of p80211_stt_findproto() from this file Claudiu Beznea
2016-03-15 19:24 ` Claudiu Beznea [this message]
2016-03-15 19:44 ` kbuild test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1458069877-20354-2-git-send-email-claudiu.beznea@gmail.com \
--to=claudiu.beznea@gmail.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®