staging: vt6656: rf.c/h rename RFvRSSITodBm to vnt_rf_rssi_to_dbm
authorMalcolm Priestley <tvboxspy@gmail.com>
Tue, 27 May 2014 20:05:23 +0000 (21:05 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 28 May 2014 21:10:46 +0000 (14:10 -0700)
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/vt6656/bssdb.c
drivers/staging/vt6656/iwctl.c
drivers/staging/vt6656/rf.c
drivers/staging/vt6656/rf.h

index f53d3bf629befccf873470036ae2f24866194618..8e9ce96442a0acbbf4d6a76927b16a60abf1e717 100644 (file)
@@ -457,8 +457,9 @@ int BSSbInsertToBSSList(struct vnt_private *pDevice,
 
        /* Monitor if RSSI is too strong. */
        pBSSList->byRSSIStatCnt = 0;
-       RFvRSSITodBm(pDevice, (u8) (pRxPacket->uRSSI),
-                            &pBSSList->ldBmMAX);
+
+       vnt_rf_rssi_to_dbm(pDevice, (u8)pRxPacket->uRSSI, &pBSSList->ldBmMAX);
+
        pBSSList->ldBmAverage[0] = pBSSList->ldBmMAX;
        pBSSList->ldBmAverRange = pBSSList->ldBmMAX;
        for (ii = 1; ii < RSSI_STAT_COUNT; ii++)
@@ -578,7 +579,7 @@ int BSSbUpdateToBSSList(struct vnt_private *pDevice,
        }
 
        if (pRxPacket->uRSSI != 0) {
-               RFvRSSITodBm(pDevice, (u8) (pRxPacket->uRSSI), &ldBm);
+               vnt_rf_rssi_to_dbm(pDevice, (u8)pRxPacket->uRSSI, &ldBm);
                /* Monitor if RSSI is too strong. */
                pBSSList->byRSSIStatCnt++;
                pBSSList->byRSSIStatCnt %= RSSI_STAT_COUNT;
@@ -1417,7 +1418,7 @@ static void s_uCalculateLinkQual(struct vnt_private *pDevice)
        if (pDevice->bLinkPass != true) {
                pDevice->wstats.qual.qual = 0;
        } else {
-               RFvRSSITodBm(pDevice, (u8) (pDevice->uCurrRSSI), &ldBm);
+               vnt_rf_rssi_to_dbm(pDevice, (u8) (pDevice->uCurrRSSI), &ldBm);
                if (-ldBm < 50)
                        RssiRatio = 4000;
                else if (-ldBm > 90)
index 94b7fe8940ceabab777dcbe2ac47e56b5fd0888b..c43718d788c0bf70d7ef4ed51ea09c8c541c2080 100644 (file)
@@ -57,7 +57,7 @@ struct iw_statistics *iwctl_get_wireless_stats(struct net_device *dev)
        long ldBm;
 
        pDevice->wstats.status = pDevice->op_mode;
-       RFvRSSITodBm(pDevice, (u8)(pDevice->uCurrRSSI), &ldBm);
+       vnt_rf_rssi_to_dbm(pDevice, (u8)(pDevice->uCurrRSSI), &ldBm);
        pDevice->wstats.qual.level = ldBm;
        pDevice->wstats.qual.noise = 0;
        pDevice->wstats.qual.updated = 1;
@@ -235,7 +235,7 @@ int iwctl_giwscan(struct net_device *dev, struct iw_request_info *info,
                        // ADD quality
                        memset(&iwe, 0, sizeof(iwe));
                        iwe.cmd = IWEVQUAL;
-                       RFvRSSITodBm(pDevice, (u8)(pBSS->uRSSI), &ldBm);
+                       vnt_rf_rssi_to_dbm(pDevice, (u8)(pBSS->uRSSI), &ldBm);
                        iwe.u.qual.level = ldBm;
                        iwe.u.qual.noise = 0;
 
@@ -1399,7 +1399,7 @@ int iwctl_giwsens(struct net_device *dev, struct iw_request_info *info,
 
        DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWSENS\n");
        if (pDevice->bLinkPass == true) {
-               RFvRSSITodBm(pDevice, (u8)(pDevice->uCurrRSSI), &ldBm);
+               vnt_rf_rssi_to_dbm(pDevice, (u8)(pDevice->uCurrRSSI), &ldBm);
                wrq->value = ldBm;
        } else {
                wrq->value = 0;
index fd699609b242461d100e2b252366733a5bac18bd..4e1a28d70f2ed705c30f5a1620ef74b472b427ea 100644 (file)
@@ -969,7 +969,7 @@ int vnt_rf_set_txpower(struct vnt_private *priv, u8 power, u32 rate)
  * Return Value: none
  *
 -*/
-void RFvRSSITodBm(struct vnt_private *priv, u8 rssi, long *dbm)
+void vnt_rf_rssi_to_dbm(struct vnt_private *priv, u8 rssi, long *dbm)
 {
        u8 idx = (((rssi & 0xc0) >> 6) & 0x03);
        long b = (rssi & 0x3f);
index 2040d5074a9a9b8499a7585e24928e72315851b6..bc0e9233a6619cdbe73e57df8526f5163c6c02e1 100644 (file)
@@ -60,7 +60,7 @@ extern const u8 RFaby11aChannelIndex[200];
 int vnt_rf_write_embedded(struct vnt_private *, u32);
 int vnt_rf_setpower(struct vnt_private *, u32, u32);
 int vnt_rf_set_txpower(struct vnt_private *, u8, u32);
-void RFvRSSITodBm(struct vnt_private *, u8 byCurrRSSI, long *pldBm);
+void vnt_rf_rssi_to_dbm(struct vnt_private *, u8, long *);
 void RFbRFTableDownload(struct vnt_private *pDevice);
 
 #endif /* __RF_H__ */