OSDN Git Service

staging:rtl8192u: Rename IsLegalChannel - Style
authorJohn Whitmore <johnfwhitmore@gmail.com>
Wed, 8 Aug 2018 21:00:35 +0000 (22:00 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 27 Aug 2018 17:17:08 +0000 (19:17 +0200)
The function IsLegalChannel causes a checkpatch issue due to its use
of CamelCase naming. The function has been renamed to is_legal_channel.

This is a coding style change which should have no impact on runtime
code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8192u/ieee80211/dot11d.c
drivers/staging/rtl8192u/ieee80211/dot11d.h
drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c
drivers/staging/rtl8192u/r819xU_phy.c

index 48911c6..a116858 100644 (file)
@@ -136,19 +136,19 @@ void dot11d_scan_complete(struct ieee80211_device *dev)
 }
 EXPORT_SYMBOL(dot11d_scan_complete);
 
-int IsLegalChannel(struct ieee80211_device *dev, u8 channel)
+int is_legal_channel(struct ieee80211_device *dev, u8 channel)
 {
        struct rt_dot11d_info *pDot11dInfo = GET_DOT11D_INFO(dev);
 
        if (channel > MAX_CHANNEL_NUMBER) {
-               netdev_err(dev->dev, "IsLegalChannel(): Invalid Channel\n");
+               netdev_err(dev->dev, "is_legal_channel(): Invalid Channel\n");
                return 0;
        }
        if (pDot11dInfo->channel_map[channel] > 0)
                return 1;
        return 0;
 }
-EXPORT_SYMBOL(IsLegalChannel);
+EXPORT_SYMBOL(is_legal_channel);
 
 int ToLegalChannel(struct ieee80211_device *dev, u8 channel)
 {
@@ -164,7 +164,7 @@ int ToLegalChannel(struct ieee80211_device *dev, u8 channel)
        }
 
        if (channel > MAX_CHANNEL_NUMBER) {
-               netdev_err(dev->dev, "IsLegalChannel(): Invalid Channel\n");
+               netdev_err(dev->dev, "is_legal_channel(): Invalid Channel\n");
                return default_chn;
        }
 
index 00e59e9..37c4937 100644 (file)
@@ -51,7 +51,7 @@ void dot11d_update_country_ie(struct ieee80211_device *dev,
                              u8 *coutry_ie);
 u8 dot11d_get_max_tx_pwr_in_dbm(struct ieee80211_device *dev, u8 channel);
 void dot11d_scan_complete(struct ieee80211_device *dev);
-int IsLegalChannel(struct ieee80211_device *dev, u8 channel);
+int is_legal_channel(struct ieee80211_device *dev, u8 channel);
 int ToLegalChannel(struct ieee80211_device *dev, u8 channel);
 
 #endif /* #ifndef __INC_DOT11D_H */
index 787aefa..e1897bd 100644 (file)
@@ -2439,7 +2439,7 @@ static inline void ieee80211_process_probe_response(
        //       then wireless adapter should do active scan from ch1~11 and
        //       passive scan from ch12~14
 
-       if (!IsLegalChannel(ieee, network->channel))
+       if (!is_legal_channel(ieee, network->channel))
                goto out;
        if (ieee->bGlobalDomain)
        {
@@ -2448,7 +2448,7 @@ static inline void ieee80211_process_probe_response(
                        // Case 1: Country code
                        if(IS_COUNTRY_IE_VALID(ieee) )
                        {
-                               if (!IsLegalChannel(ieee, network->channel)) {
+                               if (!is_legal_channel(ieee, network->channel)) {
                                        printk("GetScanInfo(): For Country code, filter probe response at channel(%d).\n", network->channel);
                                        goto out;
                                }
@@ -2469,7 +2469,7 @@ static inline void ieee80211_process_probe_response(
                        // Case 1: Country code
                        if(IS_COUNTRY_IE_VALID(ieee) )
                        {
-                               if (!IsLegalChannel(ieee, network->channel)) {
+                               if (!is_legal_channel(ieee, network->channel)) {
                                        printk("GetScanInfo(): For Country code, filter beacon at channel(%d).\n",network->channel);
                                        goto out;
                                }
index 7ee10d4..0a13a1f 100644 (file)
@@ -1271,7 +1271,7 @@ static u8 rtl8192_phy_SwChnlStepByStep(struct net_device *dev, u8 channel,
 
        RT_TRACE(COMP_CH, "%s() stage: %d, step: %d, channel: %d\n",
                 __func__, *stage, *step, channel);
-       if (!IsLegalChannel(priv->ieee80211, channel)) {
+       if (!is_legal_channel(priv->ieee80211, channel)) {
                RT_TRACE(COMP_ERR, "set to illegal channel: %d\n", channel);
                /* return true to tell upper caller function this channel
                 * setting is finished! Or it will in while loop.