Release 4.7 drivers/staging/rtl8712/rtl871x_cmd.c
/******************************************************************************
* rtl871x_cmd.c
*
* Copyright(c) 2007 - 2010 Realtek Corporation. All rights reserved.
* Linux device driver for RTL8192SU
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along with
* this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
*
* Modifications for inclusion into the Linux staging tree are
* Copyright(c) 2010 Larry Finger. All rights reserved.
*
* Contact information:
* WLAN FAE <wlanfae@realtek.com>
* Larry Finger <Larry.Finger@lwfinger.net>
*
******************************************************************************/
#define _RTL871X_CMD_C_
#include <linux/compiler.h>
#include <linux/kernel.h>
#include <linux/errno.h>
#include <linux/slab.h>
#include <linux/module.h>
#include <linux/kref.h>
#include <linux/netdevice.h>
#include <linux/skbuff.h>
#include <linux/usb.h>
#include <linux/usb/ch9.h>
#include <linux/circ_buf.h>
#include <linux/uaccess.h>
#include <asm/byteorder.h>
#include <linux/atomic.h>
#include <linux/semaphore.h>
#include <linux/rtnetlink.h>
#include "osdep_service.h"
#include "drv_types.h"
#include "recv_osdep.h"
#include "mlme_osdep.h"
/*
Caller and the r8712_cmd_thread can protect cmd_q by spin_lock.
No irqsave is necessary.
*/
static sint _init_cmd_priv(struct cmd_priv *pcmdpriv)
{
sema_init(&(pcmdpriv->cmd_queue_sema), 0);
sema_init(&(pcmdpriv->terminate_cmdthread_sema), 0);
_init_queue(&(pcmdpriv->cmd_queue));
/* allocate DMA-able/Non-Page memory for cmd_buf and rsp_buf */
pcmdpriv->cmd_seq = 1;
pcmdpriv->cmd_allocated_buf = kmalloc(MAX_CMDSZ + CMDBUFF_ALIGN_SZ,
GFP_ATOMIC);
if (pcmdpriv->cmd_allocated_buf == NULL)
return _FAIL;
pcmdpriv->cmd_buf = pcmdpriv->cmd_allocated_buf + CMDBUFF_ALIGN_SZ -
((addr_t)(pcmdpriv->cmd_allocated_buf) &
(CMDBUFF_ALIGN_SZ - 1));
pcmdpriv->rsp_allocated_buf = kmalloc(MAX_RSPSZ + 4, GFP_ATOMIC);
if (pcmdpriv->rsp_allocated_buf == NULL)
return _FAIL;
pcmdpriv->rsp_buf = pcmdpriv->rsp_allocated_buf + 4 -
((addr_t)(pcmdpriv->rsp_allocated_buf) & 3);
pcmdpriv->cmd_issued_cnt = 0;
pcmdpriv->cmd_done_cnt = 0;
pcmdpriv->rsp_cnt = 0;
return _SUCCESS;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
larry finger | larry finger | 165 | 96.49% | 1 | 50.00% |
vitaly osipov | vitaly osipov | 6 | 3.51% | 1 | 50.00% |
| Total | 171 | 100.00% | 2 | 100.00% |
static sint _init_evt_priv(struct evt_priv *pevtpriv)
{
/* allocate DMA-able/Non-Page memory for cmd_buf and rsp_buf */
pevtpriv->event_seq = 0;
pevtpriv->evt_allocated_buf = kmalloc(MAX_EVTSZ + 4, GFP_ATOMIC);
if (pevtpriv->evt_allocated_buf == NULL)
return _FAIL;
pevtpriv->evt_buf = pevtpriv->evt_allocated_buf + 4 -
((addr_t)(pevtpriv->evt_allocated_buf) & 3);
pevtpriv->evt_done_cnt = 0;
return _SUCCESS;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
larry finger | larry finger | 71 | 95.95% | 1 | 50.00% |
vitaly osipov | vitaly osipov | 3 | 4.05% | 1 | 50.00% |
| Total | 74 | 100.00% | 2 | 100.00% |
static void _free_evt_priv(struct evt_priv *pevtpriv)
{
kfree(pevtpriv->evt_allocated_buf);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
larry finger | larry finger | 18 | 100.00% | 1 | 100.00% |
| Total | 18 | 100.00% | 1 | 100.00% |
static void _free_cmd_priv(struct cmd_priv *pcmdpriv)
{
if (pcmdpriv) {
kfree(pcmdpriv->cmd_allocated_buf);
kfree(pcmdpriv->rsp_allocated_buf);
}
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
larry finger | larry finger | 31 | 100.00% | 1 | 100.00% |
| Total | 31 | 100.00% | 1 | 100.00% |
/*
Calling Context:
_enqueue_cmd can only be called between kernel thread,
since only spin_lock is used.
ISR/Call-Back functions can't call this sub-function.
*/
static sint _enqueue_cmd(struct __queue *queue, struct cmd_obj *obj)
{
unsigned long irqL;
if (obj == NULL)
return _SUCCESS;
spin_lock_irqsave(&queue->lock, irqL);
list_add_tail(&obj->list, &queue->queue);
spin_unlock_irqrestore(&queue->lock, irqL);
return _SUCCESS;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
larry finger | larry finger | 64 | 98.46% | 1 | 50.00% |
james a shackleford | james a shackleford | 1 | 1.54% | 1 | 50.00% |
| Total | 65 | 100.00% | 2 | 100.00% |
static struct cmd_obj *_dequeue_cmd(struct __queue *queue)
{
unsigned long irqL;
struct cmd_obj *obj;
spin_lock_irqsave(&queue->lock, irqL);
obj = list_first_entry_or_null(&queue->queue,
struct cmd_obj, list);
if (obj)
list_del_init(&obj->list);
spin_unlock_irqrestore(&queue->lock, irqL);
return obj;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
larry finger | larry finger | 65 | 90.28% | 1 | 33.33% |
geliang tang | geliang tang | 6 | 8.33% | 1 | 33.33% |
james a shackleford | james a shackleford | 1 | 1.39% | 1 | 33.33% |
| Total | 72 | 100.00% | 3 | 100.00% |
u32 r8712_init_cmd_priv(struct cmd_priv *pcmdpriv)
{
return _init_cmd_priv(pcmdpriv);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
larry finger | larry finger | 16 | 100.00% | 1 | 100.00% |
| Total | 16 | 100.00% | 1 | 100.00% |
u32 r8712_init_evt_priv(struct evt_priv *pevtpriv)
{
return _init_evt_priv(pevtpriv);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
larry finger | larry finger | 16 | 100.00% | 1 | 100.00% |
| Total | 16 | 100.00% | 1 | 100.00% |
void r8712_free_evt_priv(struct evt_priv *pevtpriv)
{
_free_evt_priv(pevtpriv);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
larry finger | larry finger | 15 | 100.00% | 1 | 100.00% |
| Total | 15 | 100.00% | 1 | 100.00% |
void r8712_free_cmd_priv(struct cmd_priv *pcmdpriv)
{
_free_cmd_priv(pcmdpriv);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
larry finger | larry finger | 15 | 100.00% | 1 | 100.00% |
| Total | 15 | 100.00% | 1 | 100.00% |
u32 r8712_enqueue_cmd(struct cmd_priv *pcmdpriv, struct cmd_obj *obj)
{
int res;
if (pcmdpriv->padapter->eeprompriv.bautoload_fail_flag)
return _FAIL;
res = _enqueue_cmd(&pcmdpriv->cmd_queue, obj);
up(&pcmdpriv->cmd_queue_sema);
return res;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
larry finger | larry finger | 54 | 100.00% | 1 | 100.00% |
| Total | 54 | 100.00% | 1 | 100.00% |
u32 r8712_enqueue_cmd_ex(struct cmd_priv *pcmdpriv, struct cmd_obj *obj)
{
unsigned long irqL;
struct __queue *queue;
if (obj == NULL)
return _SUCCESS;
if (pcmdpriv->padapter->eeprompriv.bautoload_fail_flag)
return _FAIL;
queue = &pcmdpriv->cmd_queue;
spin_lock_irqsave(&queue->lock, irqL);
list_add_tail(&obj->list, &queue->queue);
spin_unlock_irqrestore(&queue->lock, irqL);
up(&pcmdpriv->cmd_queue_sema);
return _SUCCESS;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
larry finger | larry finger | 96 | 98.97% | 1 | 50.00% |
james a shackleford | james a shackleford | 1 | 1.03% | 1 | 50.00% |
| Total | 97 | 100.00% | 2 | 100.00% |
struct cmd_obj *r8712_dequeue_cmd(struct __queue *queue)
{
return _dequeue_cmd(queue);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
larry finger | larry finger | 18 | 100.00% | 1 | 100.00% |
| Total | 18 | 100.00% | 1 | 100.00% |
void r8712_free_cmd_obj(struct cmd_obj *pcmd)
{
if ((pcmd->cmdcode != _JoinBss_CMD_) &&
(pcmd->cmdcode != _CreateBss_CMD_))
kfree(pcmd->parmbuf);
if (pcmd->rsp != NULL) {
if (pcmd->rspsz != 0)
kfree(pcmd->rsp);
}
kfree(pcmd);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
larry finger | larry finger | 65 | 100.00% | 1 | 100.00% |
| Total | 65 | 100.00% | 1 | 100.00% |
/*
r8712_sitesurvey_cmd(~)
### NOTE:#### (!!!!)
MUST TAKE CARE THAT BEFORE CALLING THIS FUNC,
YOU SHOULD HAVE LOCKED pmlmepriv->lock
*/
u8 r8712_sitesurvey_cmd(struct _adapter *padapter,
struct ndis_802_11_ssid *pssid)
{
struct cmd_obj *ph2c;
struct sitesurvey_parm *psurveyPara;
struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
ph2c = kmalloc(sizeof(*ph2c), GFP_ATOMIC);
if (!ph2c)
return _FAIL;
psurveyPara = kmalloc(sizeof(*psurveyPara), GFP_ATOMIC);
if (!psurveyPara) {
kfree(ph2c);
return _FAIL;
}
init_h2fwcmd_w_parm_no_rsp(ph2c, psurveyPara,
GEN_CMD_CODE(_SiteSurvey));
psurveyPara->bsslimit = cpu_to_le32(48);
psurveyPara->passive_mode = cpu_to_le32(pmlmepriv->passive_mode);
psurveyPara->ss_ssidlen = 0;
memset(psurveyPara->ss_ssid, 0, IW_ESSID_MAX_SIZE + 1);
if ((pssid != NULL) && (pssid->SsidLength)) {
memcpy(psurveyPara->ss_ssid, pssid->Ssid, pssid->SsidLength);
psurveyPara->ss_ssidlen = cpu_to_le32(pssid->SsidLength);
}
set_fwstate(pmlmepriv, _FW_UNDER_SURVEY);
r8712_enqueue_cmd(pcmdpriv, ph2c);
mod_timer(&pmlmepriv->scan_to_timer,
jiffies + msecs_to_jiffies(SCANNING_TIMEOUT));
padapter->ledpriv.LedControlHandler(padapter, LED_CTL_SITE_SURVEY);
padapter->blnEnableRxFF0Filter = 0;
return _SUCCESS;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
larry finger | larry finger | 209 | 88.56% | 1 | 16.67% |
vitaly osipov | vitaly osipov | 10 | 4.24% | 2 | 33.33% |
ali bahar | ali bahar | 9 | 3.81% | 1 | 16.67% |
vaishali thakkar | vaishali thakkar | 6 | 2.54% | 1 | 16.67% |
bhaktipriya shridhar | bhaktipriya shridhar | 2 | 0.85% | 1 | 16.67% |
| Total | 236 | 100.00% | 6 | 100.00% |
u8 r8712_setdatarate_cmd(struct _adapter *padapter, u8 *rateset)
{
struct cmd_obj *ph2c;
struct setdatarate_parm *pbsetdataratepara;
struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
ph2c = kmalloc(sizeof(*ph2c), GFP_ATOMIC);
if (!ph2c)
return _FAIL;
pbsetdataratepara = kmalloc(sizeof(*pbsetdataratepara), GFP_ATOMIC);
if (!pbsetdataratepara) {
kfree(ph2c);
return _FAIL;
}
init_h2fwcmd_w_parm_no_rsp(ph2c, pbsetdataratepara,
GEN_CMD_CODE(_SetDataRate));
pbsetdataratepara->mac_id = 5;
memcpy(pbsetdataratepara->datarates, rateset, NumRates);
r8712_enqueue_cmd(pcmdpriv, ph2c);
return _SUCCESS;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
larry finger | larry finger | 110 | 90.16% | 1 | 25.00% |
vitaly osipov | vitaly osipov | 10 | 8.20% | 2 | 50.00% |
bhaktipriya shridhar | bhaktipriya shridhar | 2 | 1.64% | 1 | 25.00% |
| Total | 122 | 100.00% | 4 | 100.00% |
u8 r8712_set_chplan_cmd(struct _adapter *padapter, int chplan)
{
struct cmd_obj *ph2c;
struct SetChannelPlan_param *psetchplanpara;
struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
ph2c = kmalloc(sizeof(*ph2c), GFP_ATOMIC);
if (!ph2c)
return _FAIL;
psetchplanpara = kmalloc(sizeof(*psetchplanpara), GFP_ATOMIC);
if (!psetchplanpara) {
kfree(ph2c);
return _FAIL;
}
init_h2fwcmd_w_parm_no_rsp(ph2c, psetchplanpara,
GEN_CMD_CODE(_SetChannelPlan));
psetchplanpara->ChannelPlan = chplan;
r8712_enqueue_cmd(pcmdpriv, ph2c);
return _SUCCESS;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
ali bahar | ali bahar | 98 | 89.09% | 1 | 25.00% |
vitaly osipov | vitaly osipov | 10 | 9.09% | 2 | 50.00% |
bhaktipriya shridhar | bhaktipriya shridhar | 2 | 1.82% | 1 | 25.00% |
| Total | 110 | 100.00% | 4 | 100.00% |
u8 r8712_setbasicrate_cmd(struct _adapter *padapter, u8 *rateset)
{
struct cmd_obj *ph2c;
struct setbasicrate_parm *pssetbasicratepara;
struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
ph2c = kmalloc(sizeof(*ph2c), GFP_ATOMIC);
if (!ph2c)
return _FAIL;
pssetbasicratepara = kmalloc(sizeof(*pssetbasicratepara), GFP_ATOMIC);
if (!pssetbasicratepara) {
kfree(ph2c);
return _FAIL;
}
init_h2fwcmd_w_parm_no_rsp(ph2c, pssetbasicratepara,
_SetBasicRate_CMD_);
memcpy(pssetbasicratepara->basicrates, rateset, NumRates);
r8712_enqueue_cmd(pcmdpriv, ph2c);
return _SUCCESS;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
ali bahar | ali bahar | 100 | 88.50% | 1 | 20.00% |
vitaly osipov | vitaly osipov | 10 | 8.85% | 2 | 40.00% |
bhaktipriya shridhar | bhaktipriya shridhar | 2 | 1.77% | 1 | 20.00% |
larry finger | larry finger | 1 | 0.88% | 1 | 20.00% |
| Total | 113 | 100.00% | 5 | 100.00% |
u8 r8712_setfwdig_cmd(struct _adapter *padapter, u8 type)
{
struct cmd_obj *ph2c;
struct writePTM_parm *pwriteptmparm;
struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
ph2c = kmalloc(sizeof(*ph2c), GFP_ATOMIC);
if (!ph2c)
return _FAIL;
pwriteptmparm = kmalloc(sizeof(*pwriteptmparm), GFP_ATOMIC);
if (!pwriteptmparm) {
kfree(ph2c);
return _FAIL;
}
init_h2fwcmd_w_parm_no_rsp(ph2c, pwriteptmparm, GEN_CMD_CODE(_SetDIG));
pwriteptmparm->type = type;
r8712_enqueue_cmd(pcmdpriv, ph2c);
return _SUCCESS;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
larry finger | larry finger | 82 | 74.55% | 1 | 20.00% |
ali bahar | ali bahar | 16 | 14.55% | 1 | 20.00% |
vitaly osipov | vitaly osipov | 10 | 9.09% | 2 | 40.00% |
bhaktipriya shridhar | bhaktipriya shridhar | 2 | 1.82% | 1 | 20.00% |
| Total | 110 | 100.00% | 5 | 100.00% |
u8 r8712_setfwra_cmd(struct _adapter *padapter, u8 type)
{
struct cmd_obj *ph2c;
struct writePTM_parm *pwriteptmparm;
struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
ph2c = kmalloc(sizeof(*ph2c), GFP_ATOMIC);
if (!ph2c)
return _FAIL;
pwriteptmparm = kmalloc(sizeof(*pwriteptmparm), GFP_ATOMIC);
if (!pwriteptmparm) {
kfree(ph2c);
return _FAIL;
}
init_h2fwcmd_w_parm_no_rsp(ph2c, pwriteptmparm, GEN_CMD_CODE(_SetRA));
pwriteptmparm->type = type;
r8712_enqueue_cmd(pcmdpriv, ph2c);
return _SUCCESS;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
larry finger | larry finger | 89 | 80.91% | 1 | 20.00% |
vitaly osipov | vitaly osipov | 10 | 9.09% | 2 | 40.00% |
ali bahar | ali bahar | 9 | 8.18% | 1 | 20.00% |
bhaktipriya shridhar | bhaktipriya shridhar | 2 | 1.82% | 1 | 20.00% |
| Total | 110 | 100.00% | 5 | 100.00% |
u8 r8712_setrfreg_cmd(struct _adapter *padapter, u8 offset, u32 val)
{
struct cmd_obj *ph2c;
struct writeRF_parm *pwriterfparm;
struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
ph2c = kmalloc(sizeof(*ph2c), GFP_ATOMIC);
if (!ph2c)
return _FAIL;
pwriterfparm = kmalloc(sizeof(*pwriterfparm), GFP_ATOMIC);
if (!pwriterfparm) {
kfree(ph2c);
return _FAIL;
}
init_h2fwcmd_w_parm_no_rsp(ph2c, pwriterfparm, GEN_CMD_CODE(_SetRFReg));
pwriterfparm->offset = offset;
pwriterfparm->value = val;
r8712_enqueue_cmd(pcmdpriv, ph2c);
return _SUCCESS;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
larry finger | larry finger | 107 | 89.92% | 1 | 25.00% |
vitaly osipov | vitaly osipov | 10 | 8.40% | 2 | 50.00% |
bhaktipriya shridhar | bhaktipriya shridhar | 2 | 1.68% | 1 | 25.00% |
| Total | 119 | 100.00% | 4 | 100.00% |
u8 r8712_getrfreg_cmd(struct _adapter *padapter, u8 offset, u8 *pval)
{
struct cmd_obj *ph2c;
struct readRF_parm *prdrfparm;
struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
ph2c = kmalloc(sizeof(*ph2c), GFP_ATOMIC);
if (!ph2c)
return _FAIL;
prdrfparm = kmalloc(sizeof(*prdrfparm), GFP_ATOMIC);
if (!prdrfparm) {
kfree(ph2c);
return _FAIL;
}
INIT_LIST_HEAD(&ph2c->list);
ph2c->cmdcode = GEN_CMD_CODE(_GetRFReg);
ph2c->parmbuf = (unsigned char *)prdrfparm;
ph2c->cmdsz = sizeof(struct readRF_parm);
ph2c->rsp = pval;
ph2c->rspsz = sizeof(struct readRF_rsp);
prdrfparm->offset = offset;
r8712_enqueue_cmd(pcmdpriv, ph2c);
return _SUCCESS;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
larry finger | larry finger | 143 | 91.67% | 1 | 20.00% |
vitaly osipov | vitaly osipov | 10 | 6.41% | 2 | 40.00% |
bhaktipriya shridhar | bhaktipriya shridhar | 2 | 1.28% | 1 | 20.00% |
james a shackleford | james a shackleford | 1 | 0.64% | 1 | 20.00% |
| Total | 156 | 100.00% | 5 | 100.00% |
void r8712_getbbrfreg_cmdrsp_callback(struct _adapter *padapter,
struct cmd_obj *pcmd)
{
kfree(pcmd->parmbuf);
kfree(pcmd);
padapter->mppriv.workparam.bcompleted = true;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
larry finger | larry finger | 23 | 62.16% | 1 | 50.00% |
ali bahar | ali bahar | 14 | 37.84% | 1 | 50.00% |
| Total | 37 | 100.00% | 2 | 100.00% |
void r8712_readtssi_cmdrsp_callback(struct _adapter *padapter,
struct cmd_obj *pcmd)
{
kfree(pcmd->parmbuf);
kfree(pcmd);
padapter->mppriv.workparam.bcompleted = true;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
ali bahar | ali bahar | 23 | 62.16% | 1 | 50.00% |
larry finger | larry finger | 14 | 37.84% | 1 | 50.00% |
| Total | 37 | 100.00% | 2 | 100.00% |
u8 r8712_createbss_cmd(struct _adapter *padapter)
{
struct cmd_obj *pcmd;
struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
struct wlan_bssid_ex *pdev_network =
&padapter->registrypriv.dev_network;
padapter->ledpriv.LedControlHandler(padapter, LED_CTL_START_TO_LINK);
pcmd = kmalloc(sizeof(*pcmd), GFP_ATOMIC);
if (!pcmd)
return _FAIL;
INIT_LIST_HEAD(&pcmd->list);
pcmd->cmdcode = _CreateBss_CMD_;
pcmd->parmbuf = (unsigned char *)pdev_network;
pcmd->cmdsz = r8712_get_wlan_bssid_ex_sz(pdev_network);
pcmd->rsp = NULL;
pcmd->rspsz = 0;
/* notes: translate IELength & Length after assign to cmdsz; */
pdev_network->Length = pcmd->cmdsz;
pdev_network->IELength = pdev_network->IELength;
pdev_network->Ssid.SsidLength = pdev_network->Ssid.SsidLength;
r8712_enqueue_cmd(pcmdpriv, pcmd);
return _SUCCESS;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
larry finger | larry finger | 146 | 94.81% | 1 | 16.67% |
vitaly osipov | vitaly osipov | 5 | 3.25% | 2 | 33.33% |
joshua clayton | joshua clayton | 1 | 0.65% | 1 | 16.67% |
bhaktipriya shridhar | bhaktipriya shridhar | 1 | 0.65% | 1 | 16.67% |
james a shackleford | james a shackleford | 1 | 0.65% | 1 | 16.67% |
| Total | 154 | 100.00% | 6 | 100.00% |
u8 r8712_joinbss_cmd(struct _adapter *padapter, struct wlan_network *pnetwork)
{
struct wlan_bssid_ex *psecnetwork;
struct cmd_obj *pcmd;
struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
struct qos_priv *pqospriv = &pmlmepriv->qospriv;
struct security_priv *psecuritypriv = &padapter->securitypriv;
struct registry_priv *pregistrypriv = &padapter->registrypriv;
enum NDIS_802_11_NETWORK_INFRASTRUCTURE ndis_network_mode = pnetwork->
network.InfrastructureMode;
padapter->ledpriv.LedControlHandler(padapter, LED_CTL_START_TO_LINK);
pcmd = kmalloc(sizeof(*pcmd), GFP_ATOMIC);
if (!pcmd)
return _FAIL;
/* for hidden ap to set fw_state here */
if (check_fwstate(pmlmepriv, WIFI_STATION_STATE | WIFI_ADHOC_STATE) !=
true) {
switch (ndis_network_mode) {
case Ndis802_11IBSS:
pmlmepriv->fw_state |= WIFI_ADHOC_STATE;
break;
case Ndis802_11Infrastructure:
pmlmepriv->fw_state |= WIFI_STATION_STATE;
break;
case Ndis802_11APMode:
case Ndis802_11AutoUnknown:
case Ndis802_11InfrastructureMax:
break;
}
}
psecnetwork = &psecuritypriv->sec_bss;
if (psecnetwork == NULL) {
kfree(pcmd);
return _FAIL;
}
memcpy(psecnetwork, &pnetwork->network, sizeof(*psecnetwork));
psecuritypriv->authenticator_ie[0] = (unsigned char)
psecnetwork->IELength;
if ((psecnetwork->IELength - 12) < (256 - 1))
memcpy(&psecuritypriv->authenticator_ie[1],
&psecnetwork->IEs[12], psecnetwork->IELength - 12);
else
memcpy(&psecuritypriv->authenticator_ie[1],
&psecnetwork->IEs[12], (256 - 1));
psecnetwork->IELength = 0;
/* If the driver wants to use the bssid to create the connection.
* If not, we copy the connecting AP's MAC address to it so that
* the driver just has the bssid information for PMKIDList searching.
*/
if (!pmlmepriv->assoc_by_bssid)
ether_addr_copy(&pmlmepriv->assoc_bssid[0],
&pnetwork->network.MacAddress[0]);
psecnetwork->IELength = r8712_restruct_sec_ie(padapter,
&pnetwork->network.IEs[0],
&psecnetwork->IEs[0],
pnetwork->network.IELength);
pqospriv->qos_option = 0;
if (pregistrypriv->wmm_enable) {
u32 tmp_len;
tmp_len = r8712_restruct_wmm_ie(padapter,
&pnetwork->network.IEs[0],
&psecnetwork->IEs[0],
pnetwork->network.IELength,
psecnetwork->IELength);
if (psecnetwork->IELength != tmp_len) {
psecnetwork->IELength = tmp_len;
pqospriv->qos_option = 1; /* WMM IE in beacon */
} else {
pqospriv->qos_option = 0; /* no WMM IE in beacon */
}
}
if (pregistrypriv->ht_enable) {
/* For WEP mode, we will use the bg mode to do the connection
* to avoid some IOT issues, especially for Realtek 8192u
* SoftAP.
*/
if ((padapter->securitypriv.PrivacyAlgrthm != _WEP40_) &&
(padapter->securitypriv.PrivacyAlgrthm != _WEP104_)) {
/* restructure_ht_ie */
r8712_restructure_ht_ie(padapter,
&pnetwork->network.IEs[0],
&psecnetwork->IEs[0],
pnetwork->network.IELength,
&psecnetwork->IELength);
}
}
psecuritypriv->supplicant_ie[0] = (u8)psecnetwork->IELength;
if (psecnetwork->IELength < 255)
memcpy(&psecuritypriv->supplicant_ie[1], &psecnetwork->IEs[0],
psecnetwork->IELength);
else
memcpy(&psecuritypriv->supplicant_ie[1], &psecnetwork->IEs[0],
255);
/* get cmdsz before endian conversion */
pcmd->cmdsz = r8712_get_wlan_bssid_ex_sz(psecnetwork);
#ifdef __BIG_ENDIAN
/* wlan_network endian conversion */
psecnetwork->Length = cpu_to_le32(psecnetwork->Length);
psecnetwork->Ssid.SsidLength = cpu_to_le32(
psecnetwork->Ssid.SsidLength);
psecnetwork->Privacy = cpu_to_le32(psecnetwork->Privacy);
psecnetwork->Rssi = cpu_to_le32(psecnetwork->Rssi);
psecnetwork->NetworkTypeInUse = cpu_to_le32(
psecnetwork->NetworkTypeInUse);
psecnetwork->Configuration.ATIMWindow = cpu_to_le32(
psecnetwork->Configuration.ATIMWindow);
psecnetwork->Configuration.BeaconPeriod = cpu_to_le32(
psecnetwork->Configuration.BeaconPeriod);
psecnetwork->Configuration.DSConfig = cpu_to_le32(
psecnetwork->Configuration.DSConfig);
psecnetwork->Configuration.FHConfig.DwellTime = cpu_to_le32(
psecnetwork->Configuration.FHConfig.DwellTime);
psecnetwork->Configuration.FHConfig.HopPattern = cpu_to_le32(
psecnetwork->Configuration.FHConfig.HopPattern);
psecnetwork->Configuration.FHConfig.HopSet = cpu_to_le32(
psecnetwork->Configuration.FHConfig.HopSet);
psecnetwork->Configuration.FHConfig.Length = cpu_to_le32(
psecnetwork->Configuration.FHConfig.Length);
psecnetwork->Configuration.Length = cpu_to_le32(
psecnetwork->Configuration.Length);
psecnetwork->InfrastructureMode = cpu_to_le32(
psecnetwork->InfrastructureMode);
psecnetwork->IELength = cpu_to_le32(psecnetwork->IELength);
#endif
INIT_LIST_HEAD(&pcmd->list);
pcmd->cmdcode = _JoinBss_CMD_;
pcmd->parmbuf = (unsigned char *)psecnetwork;
pcmd->rsp = NULL;
pcmd->rspsz = 0;
r8712_enqueue_cmd(pcmdpriv, pcmd);
return _SUCCESS;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
larry finger | larry finger | 839 | 97.79% | 2 | 15.38% |
joshua clayton | joshua clayton | 7 | 0.82% | 3 | 23.08% |
vitaly osipov | vitaly osipov | 5 | 0.58% | 2 | 15.38% |
luis de bethencourt | luis de bethencourt | 3 | 0.35% | 2 | 15.38% |
james a shackleford | james a shackleford | 1 | 0.12% | 1 | 7.69% |
melike yurtoglu | melike yurtoglu | 1 | 0.12% | 1 | 7.69% |
tapasweni pathak | tapasweni pathak | 1 | 0.12% | 1 | 7.69% |
bhaktipriya shridhar | bhaktipriya shridhar | 1 | 0.12% | 1 | 7.69% |
| Total | 858 | 100.00% | 13 | 100.00% |
u8 r8712_disassoc_cmd(struct _adapter *padapter) /* for sta_mode */
{
struct cmd_obj *pdisconnect_cmd;
struct disconnect_parm *pdisconnect;
struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
pdisconnect_cmd = kmalloc(sizeof(*pdisconnect_cmd), GFP_ATOMIC);
if (!pdisconnect_cmd)
return _FAIL;
pdisconnect = kmalloc(sizeof(*pdisconnect), GFP_ATOMIC);
if (!pdisconnect) {
kfree(pdisconnect_cmd);
return _FAIL;
}
init_h2fwcmd_w_parm_no_rsp(pdisconnect_cmd, pdisconnect,
_DisConnect_CMD_);
r8712_enqueue_cmd(pcmdpriv, pdisconnect_cmd);
return _SUCCESS;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
larry finger | larry finger | 87 | 87.88% | 1 | 25.00% |
vitaly osipov | vitaly osipov | 10 | 10.10% | 2 | 50.00% |
bhaktipriya shridhar | bhaktipriya shridhar | 2 | 2.02% | 1 | 25.00% |
| Total | 99 | 100.00% | 4 | 100.00% |
u8 r8712_setopmode_cmd(struct _adapter *padapter,
enum NDIS_802_11_NETWORK_INFRASTRUCTURE networktype)
{
struct cmd_obj *ph2c;
struct setopmode_parm *psetop;
struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
ph2c = kmalloc(sizeof(*ph2c), GFP_ATOMIC);
if (!ph2c)
return _FAIL;
psetop = kmalloc(sizeof(*psetop), GFP_ATOMIC);
if (!psetop) {
kfree(ph2c);
return _FAIL;
}
init_h2fwcmd_w_parm_no_rsp(ph2c, psetop, _SetOpMode_CMD_);
psetop->mode = (u8)networktype;
r8712_enqueue_cmd(pcmdpriv, ph2c);
return _SUCCESS;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
larry finger | larry finger | 99 | 89.19% | 1 | 25.00% |
vitaly osipov | vitaly osipov | 10 | 9.01% | 2 | 50.00% |
bhaktipriya shridhar | bhaktipriya shridhar | 2 | 1.80% | 1 | 25.00% |
| Total | 111 | 100.00% | 4 | 100.00% |
u8 r8712_setstakey_cmd(struct _adapter *padapter, u8 *psta, u8 unicast_key)
{
struct cmd_obj *ph2c;
struct set_stakey_parm *psetstakey_para;
struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
struct set_stakey_rsp *psetstakey_rsp = NULL;
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
struct security_priv *psecuritypriv = &padapter->securitypriv;
struct sta_info *sta = (struct sta_info *)psta;
ph2c = kmalloc(sizeof(*ph2c), GFP_ATOMIC);
if (!ph2c)
return _FAIL;
psetstakey_para = kmalloc(sizeof(*psetstakey_para), GFP_ATOMIC);
if (!psetstakey_para) {
kfree(ph2c);
return _FAIL;
}
psetstakey_rsp = kmalloc(sizeof(*psetstakey_rsp), GFP_ATOMIC);
if (!psetstakey_rsp) {
kfree(ph2c);
kfree(psetstakey_para);
return _FAIL;
}
init_h2fwcmd_w_parm_no_rsp(ph2c, psetstakey_para, _SetStaKey_CMD_);
ph2c->rsp = (u8 *) psetstakey_rsp;
ph2c->rspsz = sizeof(struct set_stakey_rsp);
ether_addr_copy(psetstakey_para->addr, sta->hwaddr);
if (check_fwstate(pmlmepriv, WIFI_STATION_STATE))
psetstakey_para->algorithm = (unsigned char)
psecuritypriv->PrivacyAlgrthm;
else
GET_ENCRY_ALGO(psecuritypriv, sta,
psetstakey_para->algorithm, false);
if (unicast_key)
memcpy(&psetstakey_para->key, &sta->x_UncstKey, 16);
else
memcpy(&psetstakey_para->key,
&psecuritypriv->XGrpKey[
psecuritypriv->XGrpKeyid - 1]. skey, 16);
r8712_enqueue_cmd(pcmdpriv, ph2c);
return _SUCCESS;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
larry finger | larry finger | 268 | 93.38% | 1 | 20.00% |
vitaly osipov | vitaly osipov | 15 | 5.23% | 2 | 40.00% |
bhaktipriya shridhar | bhaktipriya shridhar | 3 | 1.05% | 1 | 20.00% |
melike yurtoglu | melike yurtoglu | 1 | 0.35% | 1 | 20.00% |
| Total | 287 | 100.00% | 5 | 100.00% |
u8 r8712_setrfintfs_cmd(struct _adapter *padapter, u8 mode)
{
struct cmd_obj *ph2c;
struct setrfintfs_parm *psetrfintfsparm;
struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
ph2c = kmalloc(sizeof(*ph2c), GFP_ATOMIC);
if (!ph2c)
return _FAIL;
psetrfintfsparm = kmalloc(sizeof(*psetrfintfsparm), GFP_ATOMIC);
if (!psetrfintfsparm) {
kfree(ph2c);
return _FAIL;
}
init_h2fwcmd_w_parm_no_rsp(ph2c, psetrfintfsparm,
GEN_CMD_CODE(_SetRFIntFs));
psetrfintfsparm->rfintfs = mode;
r8712_enqueue_cmd(pcmdpriv, ph2c);
return _SUCCESS;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
larry finger | larry finger | 98 | 89.09% | 1 | 25.00% |
vitaly osipov | vitaly osipov | 10 | 9.09% | 2 | 50.00% |
bhaktipriya shridhar | bhaktipriya shridhar | 2 | 1.82% | 1 | 25.00% |
| Total | 110 | 100.00% | 4 | 100.00% |
u8 r8712_setrttbl_cmd(struct _adapter *padapter,
struct setratable_parm *prate_table)
{
struct cmd_obj *ph2c;
struct setratable_parm *psetrttblparm;
struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
ph2c = kmalloc(sizeof(*ph2c), GFP_ATOMIC);
if (!ph2c)
return _FAIL;
psetrttblparm = kmalloc(sizeof(*psetrttblparm), GFP_ATOMIC);
if (!psetrttblparm) {
kfree(ph2c);
return _FAIL;
}
init_h2fwcmd_w_parm_no_rsp(ph2c, psetrttblparm,
GEN_CMD_CODE(_SetRaTable));
memcpy(psetrttblparm, prate_table, sizeof(struct setratable_parm));
r8712_enqueue_cmd(pcmdpriv, ph2c);
return _SUCCESS;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
larry finger | larry finger | 102 | 85.71% | 1 | 20.00% |
vitaly osipov | vitaly osipov | 10 | 8.40% | 2 | 40.00% |
ali bahar | ali bahar | 5 | 4.20% | 1 | 20.00% |
bhaktipriya shridhar | bhaktipriya shridhar | 2 | 1.68% | 1 | 20.00% |
| Total | 119 | 100.00% | 5 | 100.00% |
u8 r8712_setMacAddr_cmd(struct _adapter *padapter, u8 *mac_addr)
{
struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
struct cmd_obj *ph2c;
struct SetMacAddr_param *psetMacAddr_para;
ph2c = kmalloc(sizeof(*ph2c), GFP_ATOMIC);
if (!ph2c)
return _FAIL;
psetMacAddr_para = kmalloc(sizeof(*psetMacAddr_para), GFP_ATOMIC);
if (!psetMacAddr_para) {
kfree(ph2c);
return _FAIL;
}
init_h2fwcmd_w_parm_no_rsp(ph2c, psetMacAddr_para,
_SetMacAddress_CMD_);
ether_addr_copy(psetMacAddr_para->MacAddr, mac_addr);
r8712_enqueue_cmd(pcmdpriv, ph2c);
return _SUCCESS;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
larry finger | larry finger | 98 | 88.29% | 1 | 20.00% |
vitaly osipov | vitaly osipov | 10 | 9.01% | 2 | 40.00% |
bhaktipriya shridhar | bhaktipriya shridhar | 2 | 1.80% | 1 | 20.00% |
melike yurtoglu | melike yurtoglu | 1 | 0.90% | 1 | 20.00% |
| Total | 111 | 100.00% | 5 | 100.00% |
u8 r8712_setassocsta_cmd(struct _adapter *padapter, u8 *mac_addr)
{
struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
struct cmd_obj *ph2c;
struct set_assocsta_parm *psetassocsta_para;
struct set_assocsta_rsp *psetassocsta_rsp = NULL;
ph2c = kmalloc(sizeof(*ph2c), GFP_ATOMIC);
if (!ph2c)
return _FAIL;
psetassocsta_para = kmalloc(sizeof(*psetassocsta_para), GFP_ATOMIC);
if (!psetassocsta_para) {
kfree(ph2c);
return _FAIL;
}
psetassocsta_rsp = kmalloc(sizeof(*psetassocsta_rsp), GFP_ATOMIC);
if (!psetassocsta_rsp) {
kfree(ph2c);
kfree(psetassocsta_para);
return _FAIL;
}
init_h2fwcmd_w_parm_no_rsp(ph2c, psetassocsta_para, _SetAssocSta_CMD_);
ph2c->rsp = (u8 *) psetassocsta_rsp;
ph2c->rspsz = sizeof(struct set_assocsta_rsp);
ether_addr_copy(psetassocsta_para->addr, mac_addr);
r8712_enqueue_cmd(pcmdpriv, ph2c);
return _SUCCESS;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
larry finger | larry finger | 151 | 88.30% | 1 | 16.67% |
vitaly osipov | vitaly osipov | 15 | 8.77% | 2 | 33.33% |
bhaktipriya shridhar | bhaktipriya shridhar | 3 | 1.75% | 1 | 16.67% |
melike yurtoglu | melike yurtoglu | 1 | 0.58% | 1 | 16.67% |
dan carpenter | dan carpenter | 1 | 0.58% | 1 | 16.67% |
| Total | 171 | 100.00% | 6 | 100.00% |
u8 r8712_addbareq_cmd(struct _adapter *padapter, u8 tid)
{
struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
struct cmd_obj *ph2c;
struct addBaReq_parm *paddbareq_parm;
ph2c = kmalloc(sizeof(*ph2c), GFP_ATOMIC);
if (!ph2c)
return _FAIL;
paddbareq_parm = kmalloc(sizeof(*paddbareq_parm), GFP_ATOMIC);
if (!paddbareq_parm) {
kfree(ph2c);
return _FAIL;
}
paddbareq_parm->tid = tid;
init_h2fwcmd_w_parm_no_rsp(ph2c, paddbareq_parm,
GEN_CMD_CODE(_AddBAReq));
r8712_enqueue_cmd_ex(pcmdpriv, ph2c);
return _SUCCESS;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
larry finger | larry finger | 98 | 89.09% | 1 | 25.00% |
vitaly osipov | vitaly osipov | 10 | 9.09% | 2 | 50.00% |
bhaktipriya shridhar | bhaktipriya shridhar | 2 | 1.82% | 1 | 25.00% |
| Total | 110 | 100.00% | 4 | 100.00% |
u8 r8712_wdg_wk_cmd(struct _adapter *padapter)
{
struct cmd_obj *ph2c;
struct drvint_cmd_parm *pdrvintcmd_param;
struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
ph2c = kmalloc(sizeof(*ph2c), GFP_ATOMIC);
if (!ph2c)
return _FAIL;
pdrvintcmd_param = kmalloc(sizeof(*pdrvintcmd_param), GFP_ATOMIC);
if (!pdrvintcmd_param) {
kfree(ph2c);
return _FAIL;
}
pdrvintcmd_param->i_cid = WDG_WK_CID;
pdrvintcmd_param->sz = 0;
pdrvintcmd_param->pbuf = NULL;
init_h2fwcmd_w_parm_no_rsp(ph2c, pdrvintcmd_param, _DRV_INT_CMD_);
r8712_enqueue_cmd_ex(pcmdpriv, ph2c);
return _SUCCESS;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
larry finger | larry finger | 104 | 89.66% | 1 | 25.00% |
vitaly osipov | vitaly osipov | 10 | 8.62% | 2 | 50.00% |
bhaktipriya shridhar | bhaktipriya shridhar | 2 | 1.72% | 1 | 25.00% |
| Total | 116 | 100.00% | 4 | 100.00% |
void r8712_survey_cmd_callback(struct _adapter *padapter, struct cmd_obj *pcmd)
{
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
if (pcmd->res != H2C_SUCCESS)
clr_fwstate(pmlmepriv, _FW_UNDER_SURVEY);
r8712_free_cmd_obj(pcmd);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
larry finger | larry finger | 45 | 100.00% | 1 | 100.00% |
| Total | 45 | 100.00% | 1 | 100.00% |
void r8712_disassoc_cmd_callback(struct _adapter *padapter,
struct cmd_obj *pcmd)
{
unsigned long irqL;
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
if (pcmd->res != H2C_SUCCESS) {
spin_lock_irqsave(&pmlmepriv->lock, irqL);
set_fwstate(pmlmepriv, _FW_LINKED);
spin_unlock_irqrestore(&pmlmepriv->lock, irqL);
return;
}
r8712_free_cmd_obj(pcmd);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
larry finger | larry finger | 72 | 100.00% | 1 | 100.00% |
| Total | 72 | 100.00% | 1 | 100.00% |
void r8712_joinbss_cmd_callback(struct _adapter *padapter, struct cmd_obj *pcmd)
{
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
if (pcmd->res != H2C_SUCCESS)
mod_timer(&pmlmepriv->assoc_timer,
jiffies + msecs_to_jiffies(1));
r8712_free_cmd_obj(pcmd);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
larry finger | larry finger | 47 | 88.68% | 1 | 50.00% |
vaishali thakkar | vaishali thakkar | 6 | 11.32% | 1 | 50.00% |
| Total | 53 | 100.00% | 2 | 100.00% |
void r8712_createbss_cmd_callback(struct _adapter *padapter,
struct cmd_obj *pcmd)
{
unsigned long irqL;
struct sta_info *psta = NULL;
struct wlan_network *pwlan = NULL;
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
struct wlan_bssid_ex *pnetwork = (struct wlan_bssid_ex *)pcmd->parmbuf;
struct wlan_network *tgt_network = &(pmlmepriv->cur_network);
if (pcmd->res != H2C_SUCCESS)
mod_timer(&pmlmepriv->assoc_timer,
jiffies + msecs_to_jiffies(1));
del_timer(&pmlmepriv->assoc_timer);
#ifdef __BIG_ENDIAN
/* endian_convert */
pnetwork->Length = le32_to_cpu(pnetwork->Length);
pnetwork->Ssid.SsidLength = le32_to_cpu(pnetwork->Ssid.SsidLength);
pnetwork->Privacy = le32_to_cpu(pnetwork->Privacy);
pnetwork->Rssi = le32_to_cpu(pnetwork->Rssi);
pnetwork->NetworkTypeInUse = le32_to_cpu(pnetwork->NetworkTypeInUse);
pnetwork->Configuration.ATIMWindow = le32_to_cpu(pnetwork->
Configuration.ATIMWindow);
pnetwork->Configuration.DSConfig = le32_to_cpu(pnetwork->
Configuration.DSConfig);
pnetwork->Configuration.FHConfig.DwellTime = le32_to_cpu(pnetwork->
Configuration.FHConfig.DwellTime);
pnetwork->Configuration.FHConfig.HopPattern = le32_to_cpu(pnetwork->
Configuration.FHConfig.HopPattern);
pnetwork->Configuration.FHConfig.HopSet = le32_to_cpu(pnetwork->
Configuration.FHConfig.HopSet);
pnetwork->Configuration.FHConfig.Length = le32_to_cpu(pnetwork->
Configuration.FHConfig.Length);
pnetwork->Configuration.Length = le32_to_cpu(pnetwork->
Configuration.Length);
pnetwork->InfrastructureMode = le32_to_cpu(pnetwork->
InfrastructureMode);
pnetwork->IELength = le32_to_cpu(pnetwork->IELength);
#endif
spin_lock_irqsave(&pmlmepriv->lock, irqL);
if ((pmlmepriv->fw_state) & WIFI_AP_STATE) {
psta = r8712_get_stainfo(&padapter->stapriv,
pnetwork->MacAddress);
if (!psta) {
psta = r8712_alloc_stainfo(&padapter->stapriv,
pnetwork->MacAddress);
if (psta == NULL)
goto createbss_cmd_fail;
}
r8712_indicate_connect(padapter);
} else {
pwlan = _r8712_alloc_network(pmlmepriv);
if (pwlan == NULL) {
pwlan = r8712_get_oldest_wlan_network(
&pmlmepriv->scanned_queue);
if (pwlan == NULL)
goto createbss_cmd_fail;
pwlan->last_scanned = jiffies;
} else
list_add_tail(&(pwlan->list),
&pmlmepriv->scanned_queue.queue);
pnetwork->Length = r8712_get_wlan_bssid_ex_sz(pnetwork);
memcpy(&(pwlan->network), pnetwork, pnetwork->Length);
pwlan->fixed = true;
memcpy(&tgt_network->network, pnetwork,
(r8712_get_wlan_bssid_ex_sz(pnetwork)));
if (pmlmepriv->fw_state & _FW_UNDER_LINKING)
pmlmepriv->fw_state ^= _FW_UNDER_LINKING;
/* we will set _FW_LINKED when there is one more sat to
* join us (stassoc_event_callback) */
}
createbss_cmd_fail:
spin_unlock_irqrestore(&pmlmepriv->lock, irqL);
r8712_free_cmd_obj(pcmd);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
larry finger | larry finger | 508 | 97.69% | 1 | 16.67% |
vaishali thakkar | vaishali thakkar | 6 | 1.15% | 1 | 16.67% |
joshua clayton | joshua clayton | 4 | 0.77% | 2 | 33.33% |
james a shackleford | james a shackleford | 1 | 0.19% | 1 | 16.67% |
sudip mukherjee | sudip mukherjee | 1 | 0.19% | 1 | 16.67% |
| Total | 520 | 100.00% | 6 | 100.00% |
void r8712_setstaKey_cmdrsp_callback(struct _adapter *padapter,
struct cmd_obj *pcmd)
{
struct sta_priv *pstapriv = &padapter->stapriv;
struct set_stakey_rsp *psetstakey_rsp = (struct set_stakey_rsp *)
(pcmd->rsp);
struct sta_info *psta = r8712_get_stainfo(pstapriv,
psetstakey_rsp->addr);
if (psta == NULL)
goto exit;
psta->aid = psta->mac_id = psetstakey_rsp->keyid; /*CAM_ID(CAM_ENTRY)*/
exit:
r8712_free_cmd_obj(pcmd);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
larry finger | larry finger | 84 | 100.00% | 1 | 100.00% |
| Total | 84 | 100.00% | 1 | 100.00% |
void r8712_setassocsta_cmdrsp_callback(struct _adapter *padapter,
struct cmd_obj *pcmd)
{
unsigned long irqL;
struct sta_priv *pstapriv = &padapter->stapriv;
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
struct set_assocsta_parm *passocsta_parm =
(struct set_assocsta_parm *)(pcmd->parmbuf);
struct set_assocsta_rsp *passocsta_rsp =
(struct set_assocsta_rsp *) (pcmd->rsp);
struct sta_info *psta = r8712_get_stainfo(pstapriv,
passocsta_parm->addr);
if (psta == NULL)
return;
psta->aid = psta->mac_id = passocsta_rsp->cam_id;
spin_lock_irqsave(&pmlmepriv->lock, irqL);
if ((check_fwstate(pmlmepriv, WIFI_MP_STATE)) &&
(check_fwstate(pmlmepriv, _FW_UNDER_LINKING)))
pmlmepriv->fw_state ^= _FW_UNDER_LINKING;
set_fwstate(pmlmepriv, _FW_LINKED);
spin_unlock_irqrestore(&pmlmepriv->lock, irqL);
r8712_free_cmd_obj(pcmd);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
larry finger | larry finger | 162 | 100.00% | 1 | 100.00% |
| Total | 162 | 100.00% | 1 | 100.00% |
u8 r8712_disconnectCtrlEx_cmd(struct _adapter *adapter, u32 enableDrvCtrl,
u32 tryPktCnt, u32 tryPktInterval, u32 firstStageTO)
{
struct cmd_obj *ph2c;
struct DisconnectCtrlEx_param *param;
struct cmd_priv *pcmdpriv = &adapter->cmdpriv;
ph2c = kmalloc(sizeof(*ph2c), GFP_ATOMIC);
if (!ph2c)
return _FAIL;
param = kzalloc(sizeof(*param), GFP_ATOMIC);
if (!param) {
kfree(ph2c);
return _FAIL;
}
param->EnableDrvCtrl = (unsigned char)enableDrvCtrl;
param->TryPktCnt = (unsigned char)tryPktCnt;
param->TryPktInterval = (unsigned char)tryPktInterval;
param->FirstStageTO = (unsigned int)firstStageTO;
init_h2fwcmd_w_parm_no_rsp(ph2c, param,
GEN_CMD_CODE(_DisconnectCtrlEx));
r8712_enqueue_cmd(pcmdpriv, ph2c);
return _SUCCESS;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
ali bahar | ali bahar | 141 | 92.16% | 1 | 25.00% |
vitaly osipov | vitaly osipov | 10 | 6.54% | 2 | 50.00% |
bhaktipriya shridhar | bhaktipriya shridhar | 2 | 1.31% | 1 | 25.00% |
| Total | 153 | 100.00% | 4 | 100.00% |
Overall Contributors
| Person | Tokens | Prop | Commits | CommitProp |
larry finger | larry finger | 4514 | 85.51% | 2 | 8.70% |
ali bahar | ali bahar | 463 | 8.77% | 4 | 17.39% |
vitaly osipov | vitaly osipov | 209 | 3.96% | 2 | 8.70% |
bhaktipriya shridhar | bhaktipriya shridhar | 40 | 0.76% | 1 | 4.35% |
vaishali thakkar | vaishali thakkar | 18 | 0.34% | 1 | 4.35% |
joshua clayton | joshua clayton | 12 | 0.23% | 3 | 13.04% |
james a shackleford | james a shackleford | 7 | 0.13% | 3 | 13.04% |
geliang tang | geliang tang | 6 | 0.11% | 1 | 4.35% |
melike yurtoglu | melike yurtoglu | 4 | 0.08% | 1 | 4.35% |
luis de bethencourt | luis de bethencourt | 3 | 0.06% | 2 | 8.70% |
tapasweni pathak | tapasweni pathak | 1 | 0.02% | 1 | 4.35% |
sudip mukherjee | sudip mukherjee | 1 | 0.02% | 1 | 4.35% |
dan carpenter | dan carpenter | 1 | 0.02% | 1 | 4.35% |
| Total | 5279 | 100.00% | 23 | 100.00% |
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.