summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorAna Rey <anarey@gmail.com>2014-03-18 17:50:41 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-03-18 11:11:34 -0700
commitc21ce6c73de6d489ad978837991bd0f3004b340e (patch)
treedd25dad2116ad1b661a7cf506ac3051fd94cacdb /drivers
parentabc79b18411929b27e34e4f2dadd0686b810e09c (diff)
staging: rtl8192u: Clean-up comment line style in ieee80211/dot11d.c
Convert style of comments from C99-style to C89 and fix coding style in these lines when It is necessary. Signed-off-by: Ana Rey <anarey@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/rtl8192u/ieee80211/dot11d.c57
1 files changed, 24 insertions, 33 deletions
diff --git a/drivers/staging/rtl8192u/ieee80211/dot11d.c b/drivers/staging/rtl8192u/ieee80211/dot11d.c
index e0a9feabed86..2a9865733571 100644
--- a/drivers/staging/rtl8192u/ieee80211/dot11d.c
+++ b/drivers/staging/rtl8192u/ieee80211/dot11d.c
@@ -1,11 +1,4 @@
-//-----------------------------------------------------------------------------
-// File:
-// Dot11d.c
-//
-// Description:
-// Implement 802.11d.
-//
-//-----------------------------------------------------------------------------
+/* Implement 802.11d. */
#include "dot11d.h"
@@ -25,19 +18,16 @@ Dot11d_Init(struct ieee80211_device *ieee)
printk("Dot11d_Init()\n");
}
-//
-// Description:
-// Reset to the state as we are just entering a regulatory domain.
-//
+/* Reset to the state as we are just entering a regulatory domain. */
void
Dot11d_Reset(struct ieee80211_device *ieee)
{
u32 i;
PRT_DOT11D_INFO pDot11dInfo = GET_DOT11D_INFO(ieee);
- // Clear old channel map
+ /* Clear old channel map */
memset(pDot11dInfo->channel_map, 0, MAX_CHANNEL_NUMBER+1);
memset(pDot11dInfo->MaxTxPwrDbmList, 0xFF, MAX_CHANNEL_NUMBER+1);
- // Set new channel map
+ /* Set new channel map */
for (i=1; i<=11; i++) {
(pDot11dInfo->channel_map)[i] = 1;
}
@@ -50,18 +40,15 @@ Dot11d_Reset(struct ieee80211_device *ieee)
RESET_CIE_WATCHDOG(ieee);
}
-//
-// Description:
-// Update country IE from Beacon or Probe Resopnse
-// and configure PHY for operation in the regulatory domain.
-//
-// TODO:
-// Configure Tx power.
-//
-// Assumption:
-// 1. IS_DOT11D_ENABLE() is TRUE.
-// 2. Input IE is an valid one.
-//
+/*
+ * Update country IE from Beacon or Probe Resopnse and configure PHY for
+ * operation in the regulatory domain.
+ *
+ * TODO: Configure Tx power.
+ * Assumption:
+ * 1. IS_DOT11D_ENABLE() is TRUE.
+ * 2. Input IE is an valid one.
+ */
void
Dot11d_UpdateCountryIe(
struct ieee80211_device *dev,
@@ -77,17 +64,21 @@ Dot11d_UpdateCountryIe(
memset(pDot11dInfo->channel_map, 0, MAX_CHANNEL_NUMBER+1);
memset(pDot11dInfo->MaxTxPwrDbmList, 0xFF, MAX_CHANNEL_NUMBER+1);
MaxChnlNum = 0;
- NumTriples = (CoutryIeLen - 3) / 3; // skip 3-byte country string.
+ NumTriples = (CoutryIeLen - 3) / 3; /* skip 3-byte country string. */
pTriple = (PCHNL_TXPOWER_TRIPLE)(pCoutryIe + 3);
for(i = 0; i < NumTriples; i++)
{
- if(MaxChnlNum >= pTriple->FirstChnl)
- { // It is not in a monotonically increasing order, so stop processing.
+ if (MaxChnlNum >= pTriple->FirstChnl) {
+ /* It is not in a monotonically increasing order, so
+ * stop processing.
+ */
printk("Dot11d_UpdateCountryIe(): Invalid country IE, skip it........1\n");
return;
}
- if(MAX_CHANNEL_NUMBER < (pTriple->FirstChnl + pTriple->NumChnls))
- { // It is not a valid set of channel id, so stop processing.
+ if (MAX_CHANNEL_NUMBER < (pTriple->FirstChnl + pTriple->NumChnls)) {
+ /* It is not a valid set of channel id, so stop
+ * processing.
+ */
printk("Dot11d_UpdateCountryIe(): Invalid country IE, skip it........2\n");
return;
}
@@ -152,8 +143,8 @@ DOT11D_ScanComplete(
break;
case DOT11D_STATE_DONE:
- if( GET_CIE_WATCHDOG(dev) == 0 )
- { // Reset country IE if previous one is gone.
+ if (GET_CIE_WATCHDOG(dev) == 0) {
+ /* Reset country IE if previous one is gone. */
Dot11d_Reset(dev);
}
break;