Lines Matching defs:priv

237 mgt_init(islpci_private *priv)
241 priv->mib = kcalloc(OID_NUM_LAST, sizeof (void *), GFP_KERNEL);
242 if (!priv->mib)
248 priv->mib[i] = kzalloc(isl_oid[i].size *
251 if (!priv->mib[i])
254 priv->mib[i] = NULL;
257 init_rwsem(&priv->mib_sem);
258 prism54_mib_init(priv);
264 mgt_clean(islpci_private *priv)
268 if (!priv->mib)
271 kfree(priv->mib[i]);
272 priv->mib[i] = NULL;
274 kfree(priv->mib);
275 priv->mib = NULL;
419 mgt_set_request(islpci_private *priv, enum oid_num_t n, int extra, void *data)
431 if (!priv->mib)
436 cache = priv->mib[n];
452 down_write(&priv->mib_sem);
454 if (islpci_get_state(priv) >= PRV_STATE_READY) {
455 ret = islpci_mgt_transaction(priv->ndev, PIMFOR_OP_SET, oid,
469 up_write(&priv->mib_sem);
481 mgt_set_varlen(islpci_private *priv, enum oid_num_t n, void *data, int extra_len)
496 if (islpci_get_state(priv) >= PRV_STATE_READY) {
497 ret = islpci_mgt_transaction(priv->ndev, PIMFOR_OP_SET, oid,
516 mgt_get_request(islpci_private *priv, enum oid_num_t n, int extra, void *data,
533 if (!priv->mib)
538 cache = priv->mib[n];
544 down_read(&priv->mib_sem);
546 if (islpci_get_state(priv) >= PRV_STATE_READY) {
547 ret = islpci_mgt_transaction(priv->ndev, PIMFOR_OP_GET,
577 up_read(&priv->mib_sem);
593 mgt_commit_list(islpci_private *priv, enum oid_num_t *l, int n)
600 void *data = priv->mib[l[i]];
605 int r = islpci_mgt_transaction(priv->ndev, PIMFOR_OP_SET,
615 priv->ndev->name, oid, r);
628 mgt_set(islpci_private *priv, enum oid_num_t n, void *data)
631 BUG_ON(priv->mib[n] == NULL);
633 memcpy(priv->mib[n], data, isl_oid[n].size);
634 mgt_cpu_to_le(isl_oid[n].flags & OID_FLAG_TYPE, priv->mib[n]);
638 mgt_get(islpci_private *priv, enum oid_num_t n, void *res)
641 BUG_ON(priv->mib[n] == NULL);
644 memcpy(res, priv->mib[n], isl_oid[n].size);
675 mgt_update_addr(islpci_private *priv)
680 ret = islpci_mgt_transaction(priv->ndev, PIMFOR_OP_GET,
685 memcpy(priv->ndev->dev_addr, res->data, 6);
692 printk(KERN_ERR "%s: mgt_update_addr: failure\n", priv->ndev->name);
699 mgt_commit(islpci_private *priv)
704 if (islpci_get_state(priv) < PRV_STATE_INIT)
707 rvalue = mgt_commit_list(priv, commit_part1, VEC_SIZE(commit_part1));
709 if (priv->iw_mode != IW_MODE_MONITOR)
710 rvalue |= mgt_commit_list(priv, commit_part2, VEC_SIZE(commit_part2));
713 rvalue |= mgt_commit_list(priv, &u, 1);
714 rvalue |= mgt_update_addr(priv);
719 printk(KERN_DEBUG "%s: mgt_commit: failure\n", priv->ndev->name);
733 mgt_unlatch_all(islpci_private *priv)
738 if (islpci_get_state(priv) < PRV_STATE_INIT)
742 rvalue = mgt_commit_list(priv, &u, 1);
746 rvalue |= mgt_commit_list(priv, &u, 1);
749 rvalue |= mgt_commit_list(priv, &u, 1);
752 rvalue |= mgt_commit_list(priv, &u, 1);
756 printk(KERN_DEBUG "%s: Unlatching OIDs failed\n", priv->ndev->name);
763 mgt_mlme_answer(islpci_private *priv)
770 down_read(&priv->mib_sem);
772 le32_to_cpu(*(u32 *) priv->mib[DOT11_OID_MLMEAUTOLEVEL]);
773 up_read(&priv->mib_sem);
775 return ((priv->iw_mode == IW_MODE_MASTER) &&