Plan 9 from Bell Labs’s /usr/web/sources/contrib/axel/wlanfastkey/inspiration/greps

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


static inline int
hermes_read_ltv(hermes_t *hw, int bap, u16 rid,
				  unsigned buflen, u16 *length, void *buf)
{
	return hw->ops->read_ltv(hw, bap, rid, buflen, length, buf);
}
static inline int
hermes_bap_pread(hermes_t *hw, int bap,
				   void *buf, unsigned len,
				   u16 id, s32 offset)
{
	return hw->ops->bap_pread(hw, bap, buf, len, id, offset);
}
static inline int
hermes_read_wordrec(hermes_t *hw, int bap, u16 rid, u16 *word)
{
	u16 rec;
	int err;

	err = HERMES_READ_RECORD(hw, bap, rid, &rec);
	*word = le16_to_cpu(rec);
	return err;
}

#define HERMES_WRITE_RECORD(hw, bap, rid, buf) \
	(hermes_write_ltv((hw),(bap),(rid),HERMES_BYTES_TO_RECLEN(sizeof(*buf)),(buf)))
static inline int
hermes_write_wordrec(hermes_t *hw, int bap, u16 rid, u16 word)
{
	u16 rec = cpu_to_le16(word);
	return HERMES_WRITE_RECORD(hw, bap, rid, &rec);
}
static inline int
hermes_write_ltv(hermes_t *hw, int bap, u16 rid,
				   u16 length, const void *value)
{
	return hw->ops->write_ltv(hw, bap, rid, length, value);
}

IRQ_BAP
orinoco.c.2:154:#define BAP1			1

orinoco.c.2:1072	err = hermes_read_ltv(hw, BAP1, HERMES_RID_CURRENTBSSID, ETH_ALEN, NULL, wrqu.ap_addr.sa_data);

orinoco.c.2:614	err = hermes_bap_pread(hw, BAP1, &hdr,
orinoco.c.2:798	err = hermes_bap_pread(hw, BAP1, skb_put(skb, datalen),
orinoco.c.2:897	err = hermes_bap_pread(hw, BAP1, skb_put(skb, length),
orinoco.c.2:839	err = hermes_bap_pread(hw, BAP1, &desc, sizeof(desc), rxfid, 0);
orinoco.c.2:1101	err = hermes_bap_pread(hw, BAP1, &info, sizeof(info), infofid, 0);
orinoco.c.2:1120	err = hermes_bap_pread(hw, BAP1, &tallies, len,
orinoco.c.2:1155	err = hermes_bap_pread(hw, BAP1, &linkstatus, len,
orinoco.c.2:1223	err = hermes_bap_pread(hw, BAP1, (void *) buf, len,

USER_BAP
orinoco.c.2:153:#define BAP0		0

orinoco.c.2:1026	err = hermes_read_ltv(hw, BAP0, HERMES_RID_SCANRESULTSTABLE, MAX_SCAN_LEN, &len, buf);
orinoco.c.2:2032	err = hermes_read_ltv(hw, BAP0, HERMES_RID_SECONDARYVERSION_SYMBOL, SYMBOL_MAX_VER_LEN, NULL, &tmp);
orinoco.c.2:2136	err = hermes_read_ltv(hw, BAP0, HERMES_RID_CNFOWNMACADDR, ETH_ALEN, NULL, dev->dev_addr);
orinoco.c.2:2145	err = hermes_read_ltv(hw, BAP0, HERMES_RID_CNFOWNNAME,
orinoco.c.2:2335	err = hermes_read_ltv(hw, BAP0, HERMES_RID_CURRENTSSID,
orinoco.c.2:2405	err = hermes_read_ltv(hw, BAP0, HERMES_RID_SUPPORTEDDATARATES,
orinoco.c.2:2505	err = hermes_read_ltv(hw, BAP0, HERMES_RID_CURRENTBSSID, ETH_ALEN, NULL, ap_addr->sa_data);

orinoco.c.2:399	err = hermes_read_ltv(hw, BAP0, HERMES_RID_COMMSQUALITY, sizeof(cq), NULL, &cq);
orinoco.c.2:1952	err = hermes_read_ltv(hw, BAP0, HERMES_RID_NICID, sizeof(nic_id), NULL, &nic_id);
orinoco.c.2:1967	err = hermes_read_ltv(hw, BAP0, HERMES_RID_STAID, sizeof(sta_id), NULL, &sta_id);

orinoco.c.2:3503	err = hermes_read_ltv(hw, BAP0, rid, MAX_RID_LEN, &length, extra);
orinoco.c.2:2329	err = hermes_read_ltv(hw, BAP0, rid, sizeof(essidbuf), NULL, &essidbuf);

orinoco.c.2:2161	err = hermes_read_wordrec(hw, BAP0, HERMES_RID_CHANNELLIST, &priv->channel_mask);
orinoco.c.2:2168	err = hermes_read_wordrec(hw, BAP0, HERMES_RID_CNFSYSTEMSCALE, &priv->ap_density);
orinoco.c.2:2174	err = hermes_read_wordrec(hw, BAP0, HERMES_RID_CNFRTSTHRESHOLD, &priv->rts_thresh);
orinoco.c.2:2182	err = hermes_read_wordrec(hw, BAP0, HERMES_RID_CNFMWOROBUST_AGERE, &priv->mwo_robust);
orinoco.c.2:2184	err = hermes_read_wordrec(hw, BAP0, HERMES_RID_CNFFRAGMENTATIONTHRESHOLD, &priv->frag_thresh);
orinoco.c.2:2194	err = hermes_read_wordrec(hw, BAP0, HERMES_RID_CNFMAXSLEEPDURATION, &priv->pm_period);
orinoco.c.2:2199	err = hermes_read_wordrec(hw, BAP0, HERMES_RID_CNFPMHOLDOVERDURATION, &priv->pm_timeout);
orinoco.c.2:2208	err = hermes_read_wordrec(hw, BAP0, HERMES_RID_CNFPREAMBLE_SYMBOL, &priv->preamble);
orinoco.c.2:2366	err = hermes_read_wordrec(hw, BAP0, HERMES_RID_CURRENTCHANNEL, &channel);
orinoco.c.2:2955	err = hermes_read_wordrec(hw, BAP0, HERMES_RID_CNFSYSTEMSCALE, &val);
orinoco.c.2:3064	err = hermes_read_wordrec(hw, BAP0, HERMES_RID_CNFMWOROBUST_AGERE, &val);
orinoco.c.2:3072	err = hermes_read_wordrec(hw, BAP0, HERMES_RID_CNFFRAGMENTATIONTHRESHOLD, &val);
orinoco.c.2:3151	err = hermes_read_wordrec(hw, BAP0, HERMES_RID_CURRENTTXRATE, &val);
orinoco.c.2:3253	err = hermes_read_wordrec(hw, BAP0, HERMES_RID_CNFPMENABLED, &enable);
orinoco.c.2:3257	err = hermes_read_wordrec(hw, BAP0, HERMES_RID_CNFMAXSLEEPDURATION, &period);
orinoco.c.2:3261	err = hermes_read_wordrec(hw, BAP0, HERMES_RID_CNFPMHOLDOVERDURATION, &timeout);
orinoco.c.2:3265	err = hermes_read_wordrec(hw, BAP0, HERMES_RID_CNFMULTICASTRECEIVE, &mcast);
orinoco.c.2:3300	err = hermes_read_wordrec(hw, BAP0, HERMES_RID_SHORTRETRYLIMIT, &short_limit);
orinoco.c.2:3304	err = hermes_read_wordrec(hw, BAP0, HERMES_RID_LONGRETRYLIMIT, &long_limit);
orinoco.c.2:3308	err = hermes_read_wordrec(hw, BAP0, HERMES_RID_MAXTRANSMITLIFETIME, &lifetime);

orinoco.c.2:1447	err = hermes_write_ltv(hw, BAP0, HERMES_RID_CNFDEFAULTKEY0 + i, HERMES_BYTES_TO_RECLEN(keylen), priv->keys[i].data);
orinoco.c.2:1527	err = hermes_write_ltv(hw, BAP0, HERMES_RID_CNFOWNMACADDR,
orinoco.c.2:1579	err = hermes_write_ltv(hw, BAP0, HERMES_RID_CNFOWNSSID,
orinoco.c.2:1585	err = hermes_write_ltv(hw, BAP0, HERMES_RID_CNFDESIREDSSID,
orinoco.c.2:1595	err = hermes_write_ltv(hw, BAP0, HERMES_RID_CNFOWNNAME,
orinoco.c.2:1745	err = hermes_write_ltv(hw, BAP0, HERMES_RID_CNFGROUPADDRESSES,

orinoco.c.2:1051	err = HERMES_WRITE_RECORD(hw, BAP0, HERMES_RID_CNFJOINREQUEST, &req);
orinoco.c.2:1406	err = HERMES_WRITE_RECORD(hw, BAP0, HERMES_RID_CNFMANDATORYBSSID_SYMBOL, &priv->desired_bssid);
orinoco.c.2:1424	err = HERMES_WRITE_RECORD(hw, BAP0, HERMES_RID_CNFWEPKEYS_AGERE, &priv->keys);
orinoco.c.2:3662	err = HERMES_WRITE_RECORD(hw, BAP0, HERMES_RID_CNFHOSTSCAN, &req);

orinoco.c.2:1373	err = hermes_write_wordrec(hw, BAP0, HERMES_RID_CNFTXRATECONTROL, bitrate_table[priv->bitratemode].agere_txratectrl);
orinoco.c.2:1377	err = hermes_write_wordrec(hw, BAP0, HERMES_RID_CNFTXRATECONTROL, bitrate_table[priv->bitratemode].intersil_txratectrl);
orinoco.c.2:1403	err = hermes_write_wordrec(hw, BAP0, HERMES_RID_CNFROAMINGMODE, roaming_flag);
orinoco.c.2:1427	err = hermes_write_wordrec(hw, BAP0, HERMES_RID_CNFTXKEY_AGERE, priv->tx_key);
orinoco.c.2:1453	err = hermes_write_wordrec(hw, BAP0, HERMES_RID_CNFWEPDEFAULTKEYID, priv->tx_key);
orinoco.c.2:1482	err = hermes_write_wordrec(hw, BAP0, HERMES_RID_CNFAUTHENTICATION_AGERE, auth_flag);
orinoco.c.2:1484	err = hermes_write_wordrec(hw, BAP0, HERMES_RID_CNFWEPENABLED_AGERE, priv->wep_on);
orinoco.c.2:1499	err = hermes_write_wordrec(hw, BAP0, HERMES_RID_CNFAUTHENTICATION, auth_flag);
orinoco.c.2:1509	err = hermes_write_wordrec(hw, BAP0, HERMES_RID_CNFWEPFLAGS_INTERSIL, master_wep_flag);
orinoco.c.2:1535	err = hermes_write_wordrec(hw, BAP0, HERMES_RID_CNFPORTTYPE, priv->port_type);
orinoco.c.2:1542	err = hermes_write_wordrec(hw, BAP0, HERMES_RID_CNFOWNCHANNEL, priv->channel);
orinoco.c.2:1562	err = hermes_write_wordrec(hw, BAP0, HERMES_RID_CNFCREATEIBSS, createibss);
orinoco.c.2:1604	err = hermes_write_wordrec(hw, BAP0, HERMES_RID_CNFSYSTEMSCALE, priv->ap_density);
orinoco.c.2:1613	err = hermes_write_wordrec(hw, BAP0, HERMES_RID_CNFRTSTHRESHOLD, priv->rts_thresh);
orinoco.c.2:1621	err = hermes_write_wordrec(hw, BAP0, HERMES_RID_CNFMWOROBUST_AGERE, priv->mwo_robust);
orinoco.c.2:1623	err = hermes_write_wordrec(hw, BAP0, HERMES_RID_CNFFRAGMENTATIONTHRESHOLD, priv->frag_thresh);
orinoco.c.2:1638	err = hermes_write_wordrec(hw, BAP0, HERMES_RID_CNFPMENABLED, priv->pm_on);
orinoco.c.2:1644	err = hermes_write_wordrec(hw, BAP0, HERMES_RID_CNFMULTICASTRECEIVE, priv->pm_mcast);
orinoco.c.2:1649	err = hermes_write_wordrec(hw, BAP0, HERMES_RID_CNFMAXSLEEPDURATION, priv->pm_period);
orinoco.c.2:1654	err = hermes_write_wordrec(hw, BAP0, HERMES_RID_CNFPMHOLDOVERDURATION, priv->pm_timeout);
orinoco.c.2:1663	err = hermes_write_wordrec(hw, BAP0, HERMES_RID_CNFPREAMBLE_SYMBOL, priv->preamble);
orinoco.c.2:1720	err = hermes_write_wordrec(hw, BAP0, HERMES_RID_CNFPROMISCUOUSMODE, promisc);
orinoco.c.2:3654	err = hermes_write_wordrec(hw, BAP0, HERMES_RID_CNFHOSTSCAN_SYMBOL, HERMES_HOSTSCAN_SYMBOL_ONCE | HERMES_HOSTSCAN_SYMBOL_BCAST);
orinoco.c.2:3666	err = hermes_write_wordrec(hw, BAP0, HERMES_RID_CNFSCANSSID_AGERE, 0);	/* Any ESSID */

orinoco.c.2:498	err = hermes_bap_pwrite(hw, BAP0, &desc, sizeof(desc), txfid, 0);
orinoco.c.2:527	err  = hermes_bap_pwrite(hw, BAP0, &hdr, sizeof(hdr), txfid, HERMES_802_3_OFFSET);
orinoco.c.2:541	err = hermes_bap_pwrite(hw, BAP0, p, ALIGN(data_len, 2), txfid, data_off);

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.