Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a9873673 authored by Malcolm Priestley's avatar Malcolm Priestley Committed by Greg Kroah-Hartman
Browse files

staging: vt6655: Replace typedef enum _CARD_OP_MODE eOPMode with enum nl80211_iftype op_mode.



Using the nl80211 header.

Using enum changes
OP_MODE_ADHOC -> NL80211_IFTYPE_ADHOC
OP_MODE_AP ->  NL80211_IFTYPE_AP
OP_MODE_INFRASTRUCTURE -> NL80211_IFTYPE_STATION
OP_MODE_UNKNOWN -> NL80211_IFTYPE_UNSPECIFIED

Signed-off-by: default avatarMalcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 96372bd9
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -698,7 +698,7 @@ bool CARDbStartTxPacket(struct vnt_private *pDevice, CARD_PKT_TYPE ePktType)

	if ((pDevice->bStopBeacon == false) &&
	    (pDevice->bBeaconBufReady == true) &&
	    (pDevice->eOPMode == OP_MODE_ADHOC)) {
	    (pDevice->op_mode == NL80211_IFTYPE_ADHOC)) {
		MACvRegBitsOn(pDevice->PortOffset, MAC_REG_TCR, TCR_AUTOBCNTX);
	}

@@ -720,22 +720,22 @@ bool CARDbStartTxPacket(struct vnt_private *pDevice, CARD_PKT_TYPE ePktType)
 *
 */
bool CARDbSetBSSID(struct vnt_private *pDevice,
		   unsigned char *pbyBSSID, CARD_OP_MODE eOPMode)
		   unsigned char *pbyBSSID, enum nl80211_iftype op_mode)
{

	MACvWriteBSSIDAddress(pDevice->PortOffset, pbyBSSID);
	memcpy(pDevice->abyBSSID, pbyBSSID, WLAN_BSSID_LEN);
	if (eOPMode == OP_MODE_ADHOC)
	if (op_mode == NL80211_IFTYPE_ADHOC)
		MACvRegBitsOn(pDevice->PortOffset, MAC_REG_HOSTCR, HOSTCR_ADHOC);
	else
		MACvRegBitsOff(pDevice->PortOffset, MAC_REG_HOSTCR, HOSTCR_ADHOC);

	if (eOPMode == OP_MODE_AP)
	if (op_mode == NL80211_IFTYPE_AP)
		MACvRegBitsOn(pDevice->PortOffset, MAC_REG_HOSTCR, HOSTCR_AP);
	else
		MACvRegBitsOff(pDevice->PortOffset, MAC_REG_HOSTCR, HOSTCR_AP);

	if (eOPMode == OP_MODE_UNKNOWN) {
	if (op_mode == NL80211_IFTYPE_UNSPECIFIED) {
		MACvRegBitsOff(pDevice->PortOffset, MAC_REG_RCR, RCR_BSSID);
		pDevice->bBSSIDFilter = false;
		pDevice->byRxMode &= ~RCR_BSSID;
@@ -749,7 +749,7 @@ bool CARDbSetBSSID(struct vnt_private *pDevice,
		pr_debug("wmgr: rx_mode = %x\n", pDevice->byRxMode);
	}
	// Adopt BSS state in Adapter Device Object
	pDevice->eOPMode = eOPMode;
	pDevice->op_mode = op_mode;
	return true;
}

+2 −8
Original line number Diff line number Diff line
@@ -31,6 +31,7 @@

#include "ttype.h"
#include <linux/types.h>
#include <linux/nl80211.h>

//
// Loopback mode
@@ -70,13 +71,6 @@ typedef enum _CARD_STATUS_TYPE {
	CARD_STATUS_PMKID
} CARD_STATUS_TYPE, *PCARD_STATUS_TYPE;

typedef enum _CARD_OP_MODE {
	OP_MODE_INFRASTRUCTURE,
	OP_MODE_ADHOC,
	OP_MODE_AP,
	OP_MODE_UNKNOWN
} CARD_OP_MODE, *PCARD_OP_MODE;

struct vnt_private;

void CARDvSetRSPINF(struct vnt_private *, CARD_PHY_TYPE ePHYType);
@@ -108,7 +102,7 @@ bool CARDbStopTxPacket(struct vnt_private *, CARD_PKT_TYPE ePktType);
bool CARDbStartTxPacket(struct vnt_private *, CARD_PKT_TYPE ePktType);
bool CARDbSetBeaconPeriod(struct vnt_private *, unsigned short wBeaconInterval);
bool CARDbSetBSSID(struct vnt_private *,
		   unsigned char *pbyBSSID, CARD_OP_MODE eOPMode);
		   unsigned char *pbyBSSID, enum nl80211_iftype);

bool CARDbPowerDown(struct vnt_private *);

+1 −1
Original line number Diff line number Diff line
@@ -470,7 +470,7 @@ struct vnt_private {
	unsigned short wFragmentationThreshold;
	unsigned char byShortRetryLimit;
	unsigned char byLongRetryLimit;
	CARD_OP_MODE                eOPMode;
	enum nl80211_iftype op_mode;
	unsigned char byOpMode;
	bool bBSSIDFilter;
	unsigned short wMaxTransmitMSDULifetime;
+7 −7
Original line number Diff line number Diff line
@@ -2341,7 +2341,7 @@ static irqreturn_t device_intr(int irq, void *dev_instance)
				}
			}
			if (pDevice->bChannelSwitch &&
			    (pDevice->eOPMode == OP_MODE_INFRASTRUCTURE)) {
			    (pDevice->op_mode == NL80211_IFTYPE_STATION)) {
				pDevice->byChannelSwitchCount--;
				if (pDevice->byChannelSwitchCount == 0) {
					pDevice->bChannelSwitch = false;
@@ -2354,7 +2354,7 @@ static irqreturn_t device_intr(int irq, void *dev_instance)

				}
			}
			if (pDevice->eOPMode != OP_MODE_ADHOC) {
			if (pDevice->op_mode != NL80211_IFTYPE_ADHOC) {
				if ((pDevice->bUpdateBBVGA) && pDevice->bLinkPass && (pDevice->uCurrRSSI != 0)) {
					long            ldBm;

@@ -2394,8 +2394,8 @@ static irqreturn_t device_intr(int irq, void *dev_instance)
			if (pDevice->bEnablePSMode)
				PSbIsNextTBTTWakeUp((void *)pDevice);

			if ((pDevice->eOPMode == OP_MODE_AP) ||
			    (pDevice->eOPMode == OP_MODE_ADHOC)) {
			if ((pDevice->op_mode == NL80211_IFTYPE_AP) ||
			    (pDevice->op_mode == NL80211_IFTYPE_ADHOC)) {
				MACvOneShotTimer1MicroSec(pDevice->PortOffset,
							  (pMgmt->wIBSSBeaconPeriod - MAKE_BEACON_RESERVED) << 10);
			}
@@ -2405,12 +2405,12 @@ static irqreturn_t device_intr(int irq, void *dev_instance)
		}

		if (pDevice->dwIsr & ISR_BNTX) {
			if (pDevice->eOPMode == OP_MODE_ADHOC) {
			if (pDevice->op_mode == NL80211_IFTYPE_ADHOC) {
				pDevice->bIsBeaconBufReadySet = false;
				pDevice->cbBeaconBufReadySetCnt = 0;
			}

			if (pDevice->eOPMode == OP_MODE_AP) {
			if (pDevice->op_mode == NL80211_IFTYPE_AP) {
				if (pMgmt->byDTIMCount > 0) {
					pMgmt->byDTIMCount--;
					pMgmt->sNodeDBTable[0].bRxPSPoll = false;
@@ -2453,7 +2453,7 @@ static irqreturn_t device_intr(int irq, void *dev_instance)
			max_count += device_tx_srv(pDevice, TYPE_AC0DMA);

		if (pDevice->dwIsr & ISR_SOFTTIMER1) {
			if (pDevice->eOPMode == OP_MODE_AP) {
			if (pDevice->op_mode == NL80211_IFTYPE_AP) {
				if (pDevice->bShortSlotTime)
					pMgmt->wCurrCapInfo |= WLAN_SET_CAP_INFO_SHORTSLOTTIME(1);
				else
+1 −1
Original line number Diff line number Diff line
@@ -603,7 +603,7 @@ device_receive_frame(

	// Now it only supports 802.11g Infrastructure Mode, and support rate must up to 54 Mbps
	if (pDevice->bDiversityEnable && (FrameSize > 50) &&
	    (pDevice->eOPMode == OP_MODE_INFRASTRUCTURE) &&
	    (pDevice->op_mode == NL80211_IFTYPE_STATION) &&
	    pDevice->bLinkPass) {
		BBvAntennaDiversity(pDevice, s_byGetRateIdx(*pbyRxRate), 0);
	}
Loading