diff options
author | Solomon Peachy <pizza@shaftnet.org> | 2008-10-27 11:14:01 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-01-06 13:51:54 -0800 |
commit | f980c178ea9d631d17be73b2384ad692a9f64706 (patch) | |
tree | e2d65109a4b30246c45fb0d4483a6a0db67cb8dd /drivers/staging/wlan-ng/prism2mgmt.c | |
parent | 8a1396ef7ee4045bcbf0f9b9d8763e1b383ec690 (diff) | |
download | op-kernel-dev-f980c178ea9d631d17be73b2384ad692a9f64706.zip op-kernel-dev-f980c178ea9d631d17be73b2384ad692a9f64706.tar.gz |
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>
Diffstat (limited to 'drivers/staging/wlan-ng/prism2mgmt.c')
-rw-r--r-- | drivers/staging/wlan-ng/prism2mgmt.c | 169 |
1 files changed, 0 insertions, 169 deletions
diff --git a/drivers/staging/wlan-ng/prism2mgmt.c b/drivers/staging/wlan-ng/prism2mgmt.c index f850cf86..5996b64 100644 --- a/drivers/staging/wlan-ng/prism2mgmt.c +++ b/drivers/staging/wlan-ng/prism2mgmt.c @@ -2306,175 +2306,6 @@ failed: } /*---------------------------------------------------------------- -* 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 * * Associate with an ESS. |