From: Malcolm Priestley Date: Sun, 21 Dec 2014 12:56:35 +0000 (+0000) Subject: staging: vt6655: Fix loss of distant/weak access points on channel change. X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=3a9dda79257589fe1ab10d0ce96b22e252354c6b;p=deliverable%2Flinux.git staging: vt6655: Fix loss of distant/weak access points on channel change. If the asssocated access point is strong byBBVGACurrent will be adjusted accordingly. Users will nolonger see distant access points without taking down interface. When changing channel reset byBBVGACurrent back to pDevice->abyBBVGA[0] for max sensitivity. Signed-off-by: Malcolm Priestley Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/vt6655/channel.c b/drivers/staging/vt6655/channel.c index c8f739dd346e..70f870541f92 100644 --- a/drivers/staging/vt6655/channel.c +++ b/drivers/staging/vt6655/channel.c @@ -182,6 +182,14 @@ bool set_channel(void *pDeviceHandler, unsigned int uConnectionChannel) if (pDevice->byCurrentCh == uConnectionChannel) return bResult; + /* Set VGA to max sensitivity */ + if (pDevice->bUpdateBBVGA && + pDevice->byBBVGACurrent != pDevice->abyBBVGA[0]) { + pDevice->byBBVGACurrent = pDevice->abyBBVGA[0]; + + BBvSetVGAGainOffset(pDevice, pDevice->byBBVGACurrent); + } + /* clear NAV */ MACvRegBitsOn(pDevice->PortOffset, MAC_REG_MACCR, MACCR_CLRNAV);