Staging: wlan-ng: Eliminate a boatload of tertiaryAP-only code.

Signed-off-by: Solomon Peachy <pizza@shaftnet.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
Solomon Peachy 2008-10-27 11:14:01 -04:00 committed by Greg Kroah-Hartman
parent 8a1396ef7e
commit f980c178ea
6 changed files with 102 additions and 1270 deletions

View File

@ -1189,52 +1189,6 @@
(P80211DID_MKSECTION(5) | \
P80211DID_MKGROUP(16) | \
P80211DID_MKITEM(2) | 0x00000000)
#define DIDmsg_p2req_channel_info \
(P80211DID_MKSECTION(5) | \
P80211DID_MKGROUP(17))
#define DIDmsg_p2req_channel_info_channellist \
(P80211DID_MKSECTION(5) | \
P80211DID_MKGROUP(17) | \
P80211DID_MKITEM(1) | 0x00000000)
#define DIDmsg_p2req_channel_info_channeldwelltime \
(P80211DID_MKSECTION(5) | \
P80211DID_MKGROUP(17) | \
P80211DID_MKITEM(2) | 0x00000000)
#define DIDmsg_p2req_channel_info_resultcode \
(P80211DID_MKSECTION(5) | \
P80211DID_MKGROUP(17) | \
P80211DID_MKITEM(3) | 0x00000000)
#define DIDmsg_p2req_channel_info_numchinfo \
(P80211DID_MKSECTION(5) | \
P80211DID_MKGROUP(17) | \
P80211DID_MKITEM(4) | 0x00000000)
#define DIDmsg_p2req_channel_info_results \
(P80211DID_MKSECTION(5) | \
P80211DID_MKGROUP(18))
#define DIDmsg_p2req_channel_info_results_channel \
(P80211DID_MKSECTION(5) | \
P80211DID_MKGROUP(18) | \
P80211DID_MKITEM(1) | 0x00000000)
#define DIDmsg_p2req_channel_info_results_resultcode \
(P80211DID_MKSECTION(5) | \
P80211DID_MKGROUP(18) | \
P80211DID_MKITEM(2) | 0x00000000)
#define DIDmsg_p2req_channel_info_results_avgnoiselevel \
(P80211DID_MKSECTION(5) | \
P80211DID_MKGROUP(18) | \
P80211DID_MKITEM(3) | 0x00000000)
#define DIDmsg_p2req_channel_info_results_peaknoiselevel \
(P80211DID_MKSECTION(5) | \
P80211DID_MKGROUP(18) | \
P80211DID_MKITEM(4) | 0x00000000)
#define DIDmsg_p2req_channel_info_results_bssactive \
(P80211DID_MKSECTION(5) | \
P80211DID_MKGROUP(18) | \
P80211DID_MKITEM(5) | 0x00000000)
#define DIDmsg_p2req_channel_info_results_pcfactive \
(P80211DID_MKSECTION(5) | \
P80211DID_MKGROUP(18) | \
P80211DID_MKITEM(6) | 0x00000000)
#define DIDmsg_p2req_enable \
(P80211DID_MKSECTION(5) | \
P80211DID_MKGROUP(19))
@ -1258,22 +1212,10 @@
(P80211DID_MKSECTION(1) | \
P80211DID_MKGROUP(2) | \
P80211DID_MKITEM(1) | 0x18000000)
#define DIDmib_dot11smt_dot11StationConfigTable_dot11MediumOccupancyLimit \
(P80211DID_MKSECTION(1) | \
P80211DID_MKGROUP(2) | \
P80211DID_MKITEM(2) | 0x18000000)
#define DIDmib_dot11smt_dot11StationConfigTable_dot11CFPollable \
(P80211DID_MKSECTION(1) | \
P80211DID_MKGROUP(2) | \
P80211DID_MKITEM(3) | 0x10000000)
#define DIDmib_dot11smt_dot11StationConfigTable_dot11CFPPeriod \
(P80211DID_MKSECTION(1) | \
P80211DID_MKGROUP(2) | \
P80211DID_MKITEM(4) | 0x18000000)
#define DIDmib_dot11smt_dot11StationConfigTable_dot11CFPMaxDuration \
(P80211DID_MKSECTION(1) | \
P80211DID_MKGROUP(2) | \
P80211DID_MKITEM(5) | 0x18000000)
#define DIDmib_dot11smt_dot11StationConfigTable_dot11AuthenticationResponseTimeOut \
(P80211DID_MKSECTION(1) | \
P80211DID_MKGROUP(2) | \
@ -1915,10 +1857,6 @@
(P80211DID_MKSECTION(5) | \
P80211DID_MKGROUP(1) | \
P80211DID_MKITEM(1) | 0x18000000)
#define DIDmib_p2_p2Table_p2EarlyBeacon \
(P80211DID_MKSECTION(5) | \
P80211DID_MKGROUP(1) | \
P80211DID_MKITEM(2) | 0x18000000)
#define DIDmib_p2_p2Table_p2ReceivedFrameStatistics \
(P80211DID_MKSECTION(5) | \
P80211DID_MKGROUP(1) | \
@ -1927,38 +1865,10 @@
(P80211DID_MKSECTION(5) | \
P80211DID_MKGROUP(1) | \
P80211DID_MKITEM(4) | 0x10000000)
#define DIDmib_p2_p2Table_p2Authenticated \
(P80211DID_MKSECTION(5) | \
P80211DID_MKGROUP(1) | \
P80211DID_MKITEM(5) | 0x10000000)
#define DIDmib_p2_p2Table_p2Associated \
(P80211DID_MKSECTION(5) | \
P80211DID_MKGROUP(1) | \
P80211DID_MKITEM(6) | 0x10000000)
#define DIDmib_p2_p2Table_p2PowerSaveUserCount \
(P80211DID_MKSECTION(5) | \
P80211DID_MKGROUP(1) | \
P80211DID_MKITEM(7) | 0x10000000)
#define DIDmib_p2_p2Table_p2Comment \
(P80211DID_MKSECTION(5) | \
P80211DID_MKGROUP(1) | \
P80211DID_MKITEM(8) | 0x18000000)
#define DIDmib_p2_p2Table_p2AccessMode \
(P80211DID_MKSECTION(5) | \
P80211DID_MKGROUP(1) | \
P80211DID_MKITEM(9) | 0x18000000)
#define DIDmib_p2_p2Table_p2AccessAllow \
(P80211DID_MKSECTION(5) | \
P80211DID_MKGROUP(1) | \
P80211DID_MKITEM(10) | 0x18000000)
#define DIDmib_p2_p2Table_p2AccessDeny \
(P80211DID_MKSECTION(5) | \
P80211DID_MKGROUP(1) | \
P80211DID_MKITEM(11) | 0x18000000)
#define DIDmib_p2_p2Table_p2ChannelInfoResults \
(P80211DID_MKSECTION(5) | \
P80211DID_MKGROUP(1) | \
P80211DID_MKITEM(12) | 0x10000000)
#define DIDmib_p2_p2Static \
(P80211DID_MKSECTION(5) | \
P80211DID_MKGROUP(2))
@ -2026,34 +1936,6 @@
(P80211DID_MKSECTION(5) | \
P80211DID_MKGROUP(2) | \
P80211DID_MKITEM(16) | 0x18000000)
#define DIDmib_p2_p2Static_p2CnfWDSAddress1 \
(P80211DID_MKSECTION(5) | \
P80211DID_MKGROUP(2) | \
P80211DID_MKITEM(17) | 0x18000000)
#define DIDmib_p2_p2Static_p2CnfWDSAddress2 \
(P80211DID_MKSECTION(5) | \
P80211DID_MKGROUP(2) | \
P80211DID_MKITEM(18) | 0x18000000)
#define DIDmib_p2_p2Static_p2CnfWDSAddress3 \
(P80211DID_MKSECTION(5) | \
P80211DID_MKGROUP(2) | \
P80211DID_MKITEM(19) | 0x18000000)
#define DIDmib_p2_p2Static_p2CnfWDSAddress4 \
(P80211DID_MKSECTION(5) | \
P80211DID_MKGROUP(2) | \
P80211DID_MKITEM(20) | 0x18000000)
#define DIDmib_p2_p2Static_p2CnfWDSAddress5 \
(P80211DID_MKSECTION(5) | \
P80211DID_MKGROUP(2) | \
P80211DID_MKITEM(21) | 0x18000000)
#define DIDmib_p2_p2Static_p2CnfWDSAddress6 \
(P80211DID_MKSECTION(5) | \
P80211DID_MKGROUP(2) | \
P80211DID_MKITEM(22) | 0x18000000)
#define DIDmib_p2_p2Static_p2CnfMulticastPMBuffering \
(P80211DID_MKSECTION(5) | \
P80211DID_MKGROUP(2) | \
P80211DID_MKITEM(23) | 0x18000000)
#define DIDmib_p2_p2Static_p2CnfWEPDefaultKeyID \
(P80211DID_MKSECTION(5) | \
P80211DID_MKGROUP(2) | \
@ -2082,10 +1964,6 @@
(P80211DID_MKSECTION(5) | \
P80211DID_MKGROUP(2) | \
P80211DID_MKITEM(30) | 0x18000000)
#define DIDmib_p2_p2Static_p2CnfMaxAssociatedStations \
(P80211DID_MKSECTION(5) | \
P80211DID_MKGROUP(2) | \
P80211DID_MKITEM(31) | 0x18000000)
#define DIDmib_p2_p2Static_p2CnfTxControl \
(P80211DID_MKSECTION(5) | \
P80211DID_MKGROUP(2) | \
@ -2094,10 +1972,6 @@
(P80211DID_MKSECTION(5) | \
P80211DID_MKGROUP(2) | \
P80211DID_MKITEM(33) | 0x18000000)
#define DIDmib_p2_p2Static_p2CnfHostAuthentication \
(P80211DID_MKSECTION(5) | \
P80211DID_MKGROUP(2) | \
P80211DID_MKITEM(34) | 0x18000000)
#define DIDmib_p2_p2Static_p2CnfRcvCrcError \
(P80211DID_MKSECTION(5) | \
P80211DID_MKGROUP(2) | \
@ -2106,26 +1980,6 @@
(P80211DID_MKSECTION(5) | \
P80211DID_MKGROUP(2) | \
P80211DID_MKITEM(36) | 0x18000000)
#define DIDmib_p2_p2Static_p2CnfBeaconInterval \
(P80211DID_MKSECTION(5) | \
P80211DID_MKGROUP(2) | \
P80211DID_MKITEM(37) | 0x18000000)
#define DIDmib_p2_p2Static_p2CnfMediumOccupancyLimit \
(P80211DID_MKSECTION(5) | \
P80211DID_MKGROUP(2) | \
P80211DID_MKITEM(38) | 0x18000000)
#define DIDmib_p2_p2Static_p2CnfCFPPeriod \
(P80211DID_MKSECTION(5) | \
P80211DID_MKGROUP(2) | \
P80211DID_MKITEM(39) | 0x18000000)
#define DIDmib_p2_p2Static_p2CnfCFPMaxDuration \
(P80211DID_MKSECTION(5) | \
P80211DID_MKGROUP(2) | \
P80211DID_MKITEM(40) | 0x18000000)
#define DIDmib_p2_p2Static_p2CnfCFPFlags \
(P80211DID_MKSECTION(5) | \
P80211DID_MKGROUP(2) | \
P80211DID_MKITEM(41) | 0x18000000)
#define DIDmib_p2_p2Static_p2CnfSTAPCFInfo \
(P80211DID_MKSECTION(5) | \
P80211DID_MKGROUP(2) | \
@ -2142,18 +1996,10 @@
(P80211DID_MKSECTION(5) | \
P80211DID_MKGROUP(2) | \
P80211DID_MKITEM(45) | 0x18000000)
#define DIDmib_p2_p2Static_p2CnfEnhSecurity \
(P80211DID_MKSECTION(5) | \
P80211DID_MKGROUP(2) | \
P80211DID_MKITEM(46) | 0x18000000)
#define DIDmib_p2_p2Static_p2CnfShortPreamble \
(P80211DID_MKSECTION(5) | \
P80211DID_MKGROUP(2) | \
P80211DID_MKITEM(47) | 0x18000000)
#define DIDmib_p2_p2Static_p2CnfExcludeLongPreamble \
(P80211DID_MKSECTION(5) | \
P80211DID_MKGROUP(2) | \
P80211DID_MKITEM(48) | 0x18000000)
#define DIDmib_p2_p2Static_p2CnfAuthenticationRspTO \
(P80211DID_MKSECTION(5) | \
P80211DID_MKGROUP(2) | \
@ -2367,10 +2213,6 @@
(P80211DID_MKSECTION(5) | \
P80211DID_MKGROUP(5) | \
P80211DID_MKITEM(21) | 0x10000000)
#define DIDmib_p2_p2NIC_p2TertiaryFWID \
(P80211DID_MKSECTION(5) | \
P80211DID_MKGROUP(5) | \
P80211DID_MKITEM(22) | 0x10000000)
#define DIDmib_p2_p2MAC \
(P80211DID_MKSECTION(5) | \
P80211DID_MKGROUP(6))
@ -2430,10 +2272,6 @@
(P80211DID_MKSECTION(5) | \
P80211DID_MKGROUP(6) | \
P80211DID_MKITEM(14) | 0x10000000)
#define DIDmib_p2_p2MAC_p2APCurrentScaleThresholds \
(P80211DID_MKSECTION(5) | \
P80211DID_MKGROUP(6) | \
P80211DID_MKITEM(15) | 0x10000000)
#define DIDmib_p2_p2MAC_p2ProtocolRspTime \
(P80211DID_MKSECTION(5) | \
P80211DID_MKGROUP(6) | \
@ -2466,34 +2304,6 @@
(P80211DID_MKSECTION(5) | \
P80211DID_MKGROUP(6) | \
P80211DID_MKITEM(23) | 0x10000000)
#define DIDmib_p2_p2MAC_p2CurrentTxRate1 \
(P80211DID_MKSECTION(5) | \
P80211DID_MKGROUP(6) | \
P80211DID_MKITEM(24) | 0x10000000)
#define DIDmib_p2_p2MAC_p2CurrentTxRate2 \
(P80211DID_MKSECTION(5) | \
P80211DID_MKGROUP(6) | \
P80211DID_MKITEM(25) | 0x10000000)
#define DIDmib_p2_p2MAC_p2CurrentTxRate3 \
(P80211DID_MKSECTION(5) | \
P80211DID_MKGROUP(6) | \
P80211DID_MKITEM(26) | 0x10000000)
#define DIDmib_p2_p2MAC_p2CurrentTxRate4 \
(P80211DID_MKSECTION(5) | \
P80211DID_MKGROUP(6) | \
P80211DID_MKITEM(27) | 0x10000000)
#define DIDmib_p2_p2MAC_p2CurrentTxRate5 \
(P80211DID_MKSECTION(5) | \
P80211DID_MKGROUP(6) | \
P80211DID_MKITEM(28) | 0x10000000)
#define DIDmib_p2_p2MAC_p2CurrentTxRate6 \
(P80211DID_MKSECTION(5) | \
P80211DID_MKGROUP(6) | \
P80211DID_MKITEM(29) | 0x10000000)
#define DIDmib_p2_p2MAC_p2OwnMACAddress \
(P80211DID_MKSECTION(5) | \
P80211DID_MKGROUP(6) | \
P80211DID_MKITEM(30) | 0x10000000)
#define DIDmib_p2_p2Modem \
(P80211DID_MKSECTION(5) | \
P80211DID_MKGROUP(7))

View File

@ -609,30 +609,6 @@ typedef struct p80211msg_p2req_dump_state
p80211item_uint32_t resultcode ;
} __WLAN_ATTRIB_PACK__ p80211msg_p2req_dump_state_t;
typedef struct p80211msg_p2req_channel_info
{
UINT32 msgcode ;
UINT32 msglen ;
UINT8 devname[WLAN_DEVNAMELEN_MAX] ;
p80211item_uint32_t channellist ;
p80211item_uint32_t channeldwelltime ;
p80211item_uint32_t resultcode ;
p80211item_uint32_t numchinfo ;
} __WLAN_ATTRIB_PACK__ p80211msg_p2req_channel_info_t;
typedef struct p80211msg_p2req_channel_info_results
{
UINT32 msgcode ;
UINT32 msglen ;
UINT8 devname[WLAN_DEVNAMELEN_MAX] ;
p80211item_uint32_t channel ;
p80211item_uint32_t resultcode ;
p80211item_uint32_t avgnoiselevel ;
p80211item_uint32_t peaknoiselevel ;
p80211item_uint32_t bssactive ;
p80211item_uint32_t pcfactive ;
} __WLAN_ATTRIB_PACK__ p80211msg_p2req_channel_info_results_t;
typedef struct p80211msg_p2req_enable
{
UINT32 msgcode ;

View File

@ -2305,175 +2305,6 @@ int prism2mgmt_dump_state(wlandevice_t *wlandev, void *msgp)
return result;
}
/*----------------------------------------------------------------
* prism2mgmt_channel_info
*
* Issues a ChannelInfoRequest.
*
* Arguments:
* wlandev wlan device structure
* msgp ptr to msg buffer
*
* Returns:
* 0 success and done
* <0 success, but we're waiting for something to finish.
* >0 an error occurred while handling the message.
* Side effects:
*
* Call context:
* process thread (usually)
----------------------------------------------------------------*/
int prism2mgmt_channel_info(wlandevice_t *wlandev, void *msgp)
{
p80211msg_p2req_channel_info_t *msg=msgp;
hfa384x_t *hw = wlandev->priv;
int result, i, n=0;
UINT16 channel_mask=0;
hfa384x_ChannelInfoRequest_data_t chinforeq;
// unsigned long now;
DBFENTER;
if (!hw->ap) {
/*** STATION ***/
/* Not supported in STA f/w */
P80211_SET_INT(msg->resultcode, P80211ENUM_resultcode_not_supported);
goto done;
}
/*** ACCESS POINT ***/
#define CHINFO_TIMEOUT 2
P80211_SET_INT(msg->resultcode, P80211ENUM_resultcode_success);
/* setting default value for channellist = all channels */
if (!msg->channellist.data) {
P80211_SET_INT(msg->channellist, 0x00007FFE);
}
/* setting default value for channeldwelltime = 100 ms */
if (!msg->channeldwelltime.data) {
P80211_SET_INT(msg->channeldwelltime, 100);
}
channel_mask = (UINT16) (msg->channellist.data >> 1);
for (i=0, n=0; i < 14; i++) {
if (channel_mask & (1<<i)) {
n++;
}
}
P80211_SET_INT(msg->numchinfo, n);
chinforeq.channelList = host2hfa384x_16(channel_mask);
chinforeq.channelDwellTime = host2hfa384x_16(msg->channeldwelltime.data);
atomic_set(&hw->channel_info.done, 1);
result = hfa384x_drvr_setconfig( hw, HFA384x_RID_CHANNELINFOREQUEST,
&chinforeq, HFA384x_RID_CHANNELINFOREQUEST_LEN);
if ( result ) {
WLAN_LOG_ERROR("setconfig(CHANNELINFOREQUEST) failed. result=%d\n",
result);
msg->resultcode.data = P80211ENUM_resultcode_not_supported;
goto done;
}
/*
now = jiffies;
while (atomic_read(&hw->channel_info.done) != 1) {
if ((jiffies - now) > CHINFO_TIMEOUT*HZ) {
WLAN_LOG_NOTICE("ChannelInfo results not received in %d seconds, aborting.\n",
CHINFO_TIMEOUT);
msg->resultcode.data = P80211ENUM_resultcode_timeout;
goto done;
}
current->state = TASK_INTERRUPTIBLE;
schedule_timeout(HZ/4);
current->state = TASK_RUNNING;
}
*/
done:
DBFEXIT;
return 0;
}
/*----------------------------------------------------------------
* prism2mgmt_channel_info_results
*
* Returns required ChannelInfo result.
*
* Arguments:
* wlandev wlan device structure
* msgp ptr to msg buffer
*
* Returns:
* 0 success and done
* <0 success, but we're waiting for something to finish.
* >0 an error occurred while handling the message.
* Side effects:
*
* Call context:
* process thread (usually)
----------------------------------------------------------------*/
int prism2mgmt_channel_info_results(wlandevice_t *wlandev, void *msgp)
{
hfa384x_t *hw = wlandev->priv;
p80211msg_p2req_channel_info_results_t *msg=msgp;
int result=0;
int channel;
DBFENTER;
if (!hw->ap) {
/*** STATION ***/
/* Not supported in STA f/w */
P80211_SET_INT(msg->resultcode, P80211ENUM_resultcode_not_supported);
goto done;
}
/*** ACCESS POINT ***/
switch (atomic_read(&hw->channel_info.done)) {
case 0: msg->resultcode.status = P80211ENUM_msgitem_status_no_value;
goto done;
case 1: msg->resultcode.status = P80211ENUM_msgitem_status_incomplete_itemdata;
goto done;
}
P80211_SET_INT(msg->resultcode, P80211ENUM_resultcode_success);
channel=msg->channel.data-1;
if (channel < 0 || ! (hw->channel_info.results.scanchannels & 1<<channel) ) {
msg->resultcode.data = P80211ENUM_resultcode_invalid_parameters;
goto done;
}
WLAN_LOG_DEBUG(2, "chinfo_results: channel %d, avg/peak level=%d/%d dB, active=%d\n",
channel+1,
hw->channel_info.results.result[channel].anl,
hw->channel_info.results.result[channel].pnl,
hw->channel_info.results.result[channel].active
);
P80211_SET_INT(msg->avgnoiselevel, hw->channel_info.results.result[channel].anl);
P80211_SET_INT(msg->peaknoiselevel, hw->channel_info.results.result[channel].pnl);
P80211_SET_INT(msg->bssactive, hw->channel_info.results.result[channel].active &
HFA384x_CHINFORESULT_BSSACTIVE
? P80211ENUM_truth_true
: P80211ENUM_truth_false) ;
P80211_SET_INT(msg->pcfactive, hw->channel_info.results.result[channel].active &
HFA384x_CHINFORESULT_PCFACTIVE
? P80211ENUM_truth_true
: P80211ENUM_truth_false) ;
done:
DBFEXIT;
return result;
}
/*----------------------------------------------------------------
* prism2mgmt_autojoin
*

View File

@ -129,8 +129,6 @@ int prism2mgmt_flashdl_write(wlandevice_t *wlandev, void *msgp);
int prism2mgmt_mm_state(wlandevice_t *wlandev, void *msgp);
int prism2mgmt_dump_state(wlandevice_t *wlandev, void *msgp);
int prism2mgmt_enable(wlandevice_t *wlandev, void *msgp);
int prism2mgmt_channel_info(wlandevice_t *wlandev, void *msgp);
int prism2mgmt_channel_info_results(wlandevice_t *wlandev, void *msgp);
int prism2mgmt_autojoin(wlandevice_t *wlandev, void *msgp);
/*---------------------------------------------------------------

File diff suppressed because it is too large Load Diff

View File

@ -497,14 +497,6 @@ static int prism2sta_mlmerequest(wlandevice_t *wlandev, p80211msg_t *msg)
WLAN_LOG_DEBUG(2,"Received mlme dump_state request\n");
result = prism2mgmt_dump_state(wlandev, msg);
break;
case DIDmsg_p2req_channel_info :
WLAN_LOG_DEBUG(2,"Received mlme channel_info request\n");
result = prism2mgmt_channel_info(wlandev, msg);
break;
case DIDmsg_p2req_channel_info_results :
WLAN_LOG_DEBUG(2,"Received mlme channel_info_results request\n");
result = prism2mgmt_channel_info_results(wlandev, msg);
break;
/*
* Linux specific messages
*/