cfg.c 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674
  1. /*
  2. * mac80211 configuration hooks for cfg80211
  3. *
  4. * Copyright 2006, 2007 Johannes Berg <johannes@sipsolutions.net>
  5. *
  6. * This file is GPLv2 as found in COPYING.
  7. */
  8. #include <linux/ieee80211.h>
  9. #include <linux/nl80211.h>
  10. #include <linux/rtnetlink.h>
  11. #include <net/net_namespace.h>
  12. #include <linux/rcupdate.h>
  13. #include <net/cfg80211.h>
  14. #include "ieee80211_i.h"
  15. #include "cfg.h"
  16. #include "ieee80211_rate.h"
  17. static enum ieee80211_if_types
  18. nl80211_type_to_mac80211_type(enum nl80211_iftype type)
  19. {
  20. switch (type) {
  21. case NL80211_IFTYPE_UNSPECIFIED:
  22. return IEEE80211_IF_TYPE_STA;
  23. case NL80211_IFTYPE_ADHOC:
  24. return IEEE80211_IF_TYPE_IBSS;
  25. case NL80211_IFTYPE_STATION:
  26. return IEEE80211_IF_TYPE_STA;
  27. case NL80211_IFTYPE_MONITOR:
  28. return IEEE80211_IF_TYPE_MNTR;
  29. default:
  30. return IEEE80211_IF_TYPE_INVALID;
  31. }
  32. }
  33. static int ieee80211_add_iface(struct wiphy *wiphy, char *name,
  34. enum nl80211_iftype type, u32 *flags,
  35. struct vif_params *params)
  36. {
  37. struct ieee80211_local *local = wiphy_priv(wiphy);
  38. enum ieee80211_if_types itype;
  39. struct net_device *dev;
  40. struct ieee80211_sub_if_data *sdata;
  41. int err;
  42. if (unlikely(local->reg_state != IEEE80211_DEV_REGISTERED))
  43. return -ENODEV;
  44. itype = nl80211_type_to_mac80211_type(type);
  45. if (itype == IEEE80211_IF_TYPE_INVALID)
  46. return -EINVAL;
  47. err = ieee80211_if_add(local->mdev, name, &dev, itype, params);
  48. if (err || itype != IEEE80211_IF_TYPE_MNTR || !flags)
  49. return err;
  50. sdata = IEEE80211_DEV_TO_SUB_IF(dev);
  51. sdata->u.mntr_flags = *flags;
  52. return 0;
  53. }
  54. static int ieee80211_del_iface(struct wiphy *wiphy, int ifindex)
  55. {
  56. struct ieee80211_local *local = wiphy_priv(wiphy);
  57. struct net_device *dev;
  58. char *name;
  59. if (unlikely(local->reg_state != IEEE80211_DEV_REGISTERED))
  60. return -ENODEV;
  61. /* we're under RTNL */
  62. dev = __dev_get_by_index(&init_net, ifindex);
  63. if (!dev)
  64. return 0;
  65. name = dev->name;
  66. return ieee80211_if_remove(local->mdev, name, -1);
  67. }
  68. static int ieee80211_change_iface(struct wiphy *wiphy, int ifindex,
  69. enum nl80211_iftype type, u32 *flags,
  70. struct vif_params *params)
  71. {
  72. struct ieee80211_local *local = wiphy_priv(wiphy);
  73. struct net_device *dev;
  74. enum ieee80211_if_types itype;
  75. struct ieee80211_sub_if_data *sdata;
  76. if (unlikely(local->reg_state != IEEE80211_DEV_REGISTERED))
  77. return -ENODEV;
  78. /* we're under RTNL */
  79. dev = __dev_get_by_index(&init_net, ifindex);
  80. if (!dev)
  81. return -ENODEV;
  82. if (netif_running(dev))
  83. return -EBUSY;
  84. itype = nl80211_type_to_mac80211_type(type);
  85. if (itype == IEEE80211_IF_TYPE_INVALID)
  86. return -EINVAL;
  87. sdata = IEEE80211_DEV_TO_SUB_IF(dev);
  88. if (sdata->vif.type == IEEE80211_IF_TYPE_VLAN)
  89. return -EOPNOTSUPP;
  90. ieee80211_if_reinit(dev);
  91. ieee80211_if_set_type(dev, itype);
  92. if (sdata->vif.type != IEEE80211_IF_TYPE_MNTR || !flags)
  93. return 0;
  94. sdata->u.mntr_flags = *flags;
  95. return 0;
  96. }
  97. static int ieee80211_add_key(struct wiphy *wiphy, struct net_device *dev,
  98. u8 key_idx, u8 *mac_addr,
  99. struct key_params *params)
  100. {
  101. struct ieee80211_sub_if_data *sdata;
  102. struct sta_info *sta = NULL;
  103. enum ieee80211_key_alg alg;
  104. int ret;
  105. struct ieee80211_key *key;
  106. sdata = IEEE80211_DEV_TO_SUB_IF(dev);
  107. switch (params->cipher) {
  108. case WLAN_CIPHER_SUITE_WEP40:
  109. case WLAN_CIPHER_SUITE_WEP104:
  110. alg = ALG_WEP;
  111. break;
  112. case WLAN_CIPHER_SUITE_TKIP:
  113. alg = ALG_TKIP;
  114. break;
  115. case WLAN_CIPHER_SUITE_CCMP:
  116. alg = ALG_CCMP;
  117. break;
  118. default:
  119. return -EINVAL;
  120. }
  121. key = ieee80211_key_alloc(alg, key_idx, params->key_len, params->key);
  122. if (!key)
  123. return -ENOMEM;
  124. if (mac_addr) {
  125. sta = sta_info_get(sdata->local, mac_addr);
  126. if (!sta) {
  127. ieee80211_key_free(key);
  128. return -ENOENT;
  129. }
  130. }
  131. ieee80211_key_link(key, sdata, sta);
  132. ret = 0;
  133. if (sta)
  134. sta_info_put(sta);
  135. return ret;
  136. }
  137. static int ieee80211_del_key(struct wiphy *wiphy, struct net_device *dev,
  138. u8 key_idx, u8 *mac_addr)
  139. {
  140. struct ieee80211_sub_if_data *sdata;
  141. struct sta_info *sta;
  142. int ret;
  143. struct ieee80211_key *key;
  144. sdata = IEEE80211_DEV_TO_SUB_IF(dev);
  145. if (mac_addr) {
  146. sta = sta_info_get(sdata->local, mac_addr);
  147. if (!sta)
  148. return -ENOENT;
  149. ret = 0;
  150. if (sta->key) {
  151. key = sta->key;
  152. ieee80211_key_free(key);
  153. WARN_ON(sta->key);
  154. } else
  155. ret = -ENOENT;
  156. sta_info_put(sta);
  157. return ret;
  158. }
  159. if (!sdata->keys[key_idx])
  160. return -ENOENT;
  161. key = sdata->keys[key_idx];
  162. ieee80211_key_free(key);
  163. WARN_ON(sdata->keys[key_idx]);
  164. return 0;
  165. }
  166. static int ieee80211_get_key(struct wiphy *wiphy, struct net_device *dev,
  167. u8 key_idx, u8 *mac_addr, void *cookie,
  168. void (*callback)(void *cookie,
  169. struct key_params *params))
  170. {
  171. struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
  172. struct sta_info *sta = NULL;
  173. u8 seq[6] = {0};
  174. struct key_params params;
  175. struct ieee80211_key *key;
  176. u32 iv32;
  177. u16 iv16;
  178. int err = -ENOENT;
  179. if (mac_addr) {
  180. sta = sta_info_get(sdata->local, mac_addr);
  181. if (!sta)
  182. goto out;
  183. key = sta->key;
  184. } else
  185. key = sdata->keys[key_idx];
  186. if (!key)
  187. goto out;
  188. memset(&params, 0, sizeof(params));
  189. switch (key->conf.alg) {
  190. case ALG_TKIP:
  191. params.cipher = WLAN_CIPHER_SUITE_TKIP;
  192. iv32 = key->u.tkip.iv32;
  193. iv16 = key->u.tkip.iv16;
  194. if (key->flags & KEY_FLAG_UPLOADED_TO_HARDWARE &&
  195. sdata->local->ops->get_tkip_seq)
  196. sdata->local->ops->get_tkip_seq(
  197. local_to_hw(sdata->local),
  198. key->conf.hw_key_idx,
  199. &iv32, &iv16);
  200. seq[0] = iv16 & 0xff;
  201. seq[1] = (iv16 >> 8) & 0xff;
  202. seq[2] = iv32 & 0xff;
  203. seq[3] = (iv32 >> 8) & 0xff;
  204. seq[4] = (iv32 >> 16) & 0xff;
  205. seq[5] = (iv32 >> 24) & 0xff;
  206. params.seq = seq;
  207. params.seq_len = 6;
  208. break;
  209. case ALG_CCMP:
  210. params.cipher = WLAN_CIPHER_SUITE_CCMP;
  211. seq[0] = key->u.ccmp.tx_pn[5];
  212. seq[1] = key->u.ccmp.tx_pn[4];
  213. seq[2] = key->u.ccmp.tx_pn[3];
  214. seq[3] = key->u.ccmp.tx_pn[2];
  215. seq[4] = key->u.ccmp.tx_pn[1];
  216. seq[5] = key->u.ccmp.tx_pn[0];
  217. params.seq = seq;
  218. params.seq_len = 6;
  219. break;
  220. case ALG_WEP:
  221. if (key->conf.keylen == 5)
  222. params.cipher = WLAN_CIPHER_SUITE_WEP40;
  223. else
  224. params.cipher = WLAN_CIPHER_SUITE_WEP104;
  225. break;
  226. }
  227. params.key = key->conf.key;
  228. params.key_len = key->conf.keylen;
  229. callback(cookie, &params);
  230. err = 0;
  231. out:
  232. if (sta)
  233. sta_info_put(sta);
  234. return err;
  235. }
  236. static int ieee80211_config_default_key(struct wiphy *wiphy,
  237. struct net_device *dev,
  238. u8 key_idx)
  239. {
  240. struct ieee80211_sub_if_data *sdata;
  241. sdata = IEEE80211_DEV_TO_SUB_IF(dev);
  242. ieee80211_set_default_key(sdata, key_idx);
  243. return 0;
  244. }
  245. static int ieee80211_get_station(struct wiphy *wiphy, struct net_device *dev,
  246. u8 *mac, struct station_info *sinfo)
  247. {
  248. struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
  249. struct sta_info *sta;
  250. sta = sta_info_get(local, mac);
  251. if (!sta)
  252. return -ENOENT;
  253. /* XXX: verify sta->dev == dev */
  254. sinfo->filled = STATION_INFO_INACTIVE_TIME |
  255. STATION_INFO_RX_BYTES |
  256. STATION_INFO_TX_BYTES;
  257. sinfo->inactive_time = jiffies_to_msecs(jiffies - sta->last_rx);
  258. sinfo->rx_bytes = sta->rx_bytes;
  259. sinfo->tx_bytes = sta->tx_bytes;
  260. sta_info_put(sta);
  261. return 0;
  262. }
  263. /*
  264. * This handles both adding a beacon and setting new beacon info
  265. */
  266. static int ieee80211_config_beacon(struct ieee80211_sub_if_data *sdata,
  267. struct beacon_parameters *params)
  268. {
  269. struct beacon_data *new, *old;
  270. int new_head_len, new_tail_len;
  271. int size;
  272. int err = -EINVAL;
  273. old = sdata->u.ap.beacon;
  274. /* head must not be zero-length */
  275. if (params->head && !params->head_len)
  276. return -EINVAL;
  277. /*
  278. * This is a kludge. beacon interval should really be part
  279. * of the beacon information.
  280. */
  281. if (params->interval) {
  282. sdata->local->hw.conf.beacon_int = params->interval;
  283. if (ieee80211_hw_config(sdata->local))
  284. return -EINVAL;
  285. /*
  286. * We updated some parameter so if below bails out
  287. * it's not an error.
  288. */
  289. err = 0;
  290. }
  291. /* Need to have a beacon head if we don't have one yet */
  292. if (!params->head && !old)
  293. return err;
  294. /* sorry, no way to start beaconing without dtim period */
  295. if (!params->dtim_period && !old)
  296. return err;
  297. /* new or old head? */
  298. if (params->head)
  299. new_head_len = params->head_len;
  300. else
  301. new_head_len = old->head_len;
  302. /* new or old tail? */
  303. if (params->tail || !old)
  304. /* params->tail_len will be zero for !params->tail */
  305. new_tail_len = params->tail_len;
  306. else
  307. new_tail_len = old->tail_len;
  308. size = sizeof(*new) + new_head_len + new_tail_len;
  309. new = kzalloc(size, GFP_KERNEL);
  310. if (!new)
  311. return -ENOMEM;
  312. /* start filling the new info now */
  313. /* new or old dtim period? */
  314. if (params->dtim_period)
  315. new->dtim_period = params->dtim_period;
  316. else
  317. new->dtim_period = old->dtim_period;
  318. /*
  319. * pointers go into the block we allocated,
  320. * memory is | beacon_data | head | tail |
  321. */
  322. new->head = ((u8 *) new) + sizeof(*new);
  323. new->tail = new->head + new_head_len;
  324. new->head_len = new_head_len;
  325. new->tail_len = new_tail_len;
  326. /* copy in head */
  327. if (params->head)
  328. memcpy(new->head, params->head, new_head_len);
  329. else
  330. memcpy(new->head, old->head, new_head_len);
  331. /* copy in optional tail */
  332. if (params->tail)
  333. memcpy(new->tail, params->tail, new_tail_len);
  334. else
  335. if (old)
  336. memcpy(new->tail, old->tail, new_tail_len);
  337. rcu_assign_pointer(sdata->u.ap.beacon, new);
  338. synchronize_rcu();
  339. kfree(old);
  340. return ieee80211_if_config_beacon(sdata->dev);
  341. }
  342. static int ieee80211_add_beacon(struct wiphy *wiphy, struct net_device *dev,
  343. struct beacon_parameters *params)
  344. {
  345. struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
  346. struct beacon_data *old;
  347. if (sdata->vif.type != IEEE80211_IF_TYPE_AP)
  348. return -EINVAL;
  349. old = sdata->u.ap.beacon;
  350. if (old)
  351. return -EALREADY;
  352. return ieee80211_config_beacon(sdata, params);
  353. }
  354. static int ieee80211_set_beacon(struct wiphy *wiphy, struct net_device *dev,
  355. struct beacon_parameters *params)
  356. {
  357. struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
  358. struct beacon_data *old;
  359. if (sdata->vif.type != IEEE80211_IF_TYPE_AP)
  360. return -EINVAL;
  361. old = sdata->u.ap.beacon;
  362. if (!old)
  363. return -ENOENT;
  364. return ieee80211_config_beacon(sdata, params);
  365. }
  366. static int ieee80211_del_beacon(struct wiphy *wiphy, struct net_device *dev)
  367. {
  368. struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
  369. struct beacon_data *old;
  370. if (sdata->vif.type != IEEE80211_IF_TYPE_AP)
  371. return -EINVAL;
  372. old = sdata->u.ap.beacon;
  373. if (!old)
  374. return -ENOENT;
  375. rcu_assign_pointer(sdata->u.ap.beacon, NULL);
  376. synchronize_rcu();
  377. kfree(old);
  378. return ieee80211_if_config_beacon(dev);
  379. }
  380. /* Layer 2 Update frame (802.2 Type 1 LLC XID Update response) */
  381. struct iapp_layer2_update {
  382. u8 da[ETH_ALEN]; /* broadcast */
  383. u8 sa[ETH_ALEN]; /* STA addr */
  384. __be16 len; /* 6 */
  385. u8 dsap; /* 0 */
  386. u8 ssap; /* 0 */
  387. u8 control;
  388. u8 xid_info[3];
  389. } __attribute__ ((packed));
  390. static void ieee80211_send_layer2_update(struct sta_info *sta)
  391. {
  392. struct iapp_layer2_update *msg;
  393. struct sk_buff *skb;
  394. /* Send Level 2 Update Frame to update forwarding tables in layer 2
  395. * bridge devices */
  396. skb = dev_alloc_skb(sizeof(*msg));
  397. if (!skb)
  398. return;
  399. msg = (struct iapp_layer2_update *)skb_put(skb, sizeof(*msg));
  400. /* 802.2 Type 1 Logical Link Control (LLC) Exchange Identifier (XID)
  401. * Update response frame; IEEE Std 802.2-1998, 5.4.1.2.1 */
  402. memset(msg->da, 0xff, ETH_ALEN);
  403. memcpy(msg->sa, sta->addr, ETH_ALEN);
  404. msg->len = htons(6);
  405. msg->dsap = 0;
  406. msg->ssap = 0x01; /* NULL LSAP, CR Bit: Response */
  407. msg->control = 0xaf; /* XID response lsb.1111F101.
  408. * F=0 (no poll command; unsolicited frame) */
  409. msg->xid_info[0] = 0x81; /* XID format identifier */
  410. msg->xid_info[1] = 1; /* LLC types/classes: Type 1 LLC */
  411. msg->xid_info[2] = 0; /* XID sender's receive window size (RW) */
  412. skb->dev = sta->dev;
  413. skb->protocol = eth_type_trans(skb, sta->dev);
  414. memset(skb->cb, 0, sizeof(skb->cb));
  415. netif_rx(skb);
  416. }
  417. static void sta_apply_parameters(struct ieee80211_local *local,
  418. struct sta_info *sta,
  419. struct station_parameters *params)
  420. {
  421. u32 rates;
  422. int i, j;
  423. struct ieee80211_supported_band *sband;
  424. if (params->station_flags & STATION_FLAG_CHANGED) {
  425. sta->flags &= ~WLAN_STA_AUTHORIZED;
  426. if (params->station_flags & STATION_FLAG_AUTHORIZED)
  427. sta->flags |= WLAN_STA_AUTHORIZED;
  428. sta->flags &= ~WLAN_STA_SHORT_PREAMBLE;
  429. if (params->station_flags & STATION_FLAG_SHORT_PREAMBLE)
  430. sta->flags |= WLAN_STA_SHORT_PREAMBLE;
  431. sta->flags &= ~WLAN_STA_WME;
  432. if (params->station_flags & STATION_FLAG_WME)
  433. sta->flags |= WLAN_STA_WME;
  434. }
  435. if (params->aid) {
  436. sta->aid = params->aid;
  437. if (sta->aid > IEEE80211_MAX_AID)
  438. sta->aid = 0; /* XXX: should this be an error? */
  439. }
  440. if (params->listen_interval >= 0)
  441. sta->listen_interval = params->listen_interval;
  442. if (params->supported_rates) {
  443. rates = 0;
  444. sband = local->hw.wiphy->bands[local->oper_channel->band];
  445. for (i = 0; i < params->supported_rates_len; i++) {
  446. int rate = (params->supported_rates[i] & 0x7f) * 5;
  447. for (j = 0; j < sband->n_bitrates; j++) {
  448. if (sband->bitrates[j].bitrate == rate)
  449. rates |= BIT(j);
  450. }
  451. }
  452. sta->supp_rates[local->oper_channel->band] = rates;
  453. }
  454. }
  455. static int ieee80211_add_station(struct wiphy *wiphy, struct net_device *dev,
  456. u8 *mac, struct station_parameters *params)
  457. {
  458. struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
  459. struct sta_info *sta;
  460. struct ieee80211_sub_if_data *sdata;
  461. /* Prevent a race with changing the rate control algorithm */
  462. if (!netif_running(dev))
  463. return -ENETDOWN;
  464. if (params->vlan) {
  465. sdata = IEEE80211_DEV_TO_SUB_IF(params->vlan);
  466. if (sdata->vif.type != IEEE80211_IF_TYPE_VLAN ||
  467. sdata->vif.type != IEEE80211_IF_TYPE_AP)
  468. return -EINVAL;
  469. } else
  470. sdata = IEEE80211_DEV_TO_SUB_IF(dev);
  471. sta = sta_info_add(local, dev, mac, GFP_KERNEL);
  472. if (IS_ERR(sta))
  473. return PTR_ERR(sta);
  474. sta->dev = sdata->dev;
  475. if (sdata->vif.type == IEEE80211_IF_TYPE_VLAN ||
  476. sdata->vif.type == IEEE80211_IF_TYPE_AP)
  477. ieee80211_send_layer2_update(sta);
  478. sta->flags = WLAN_STA_AUTH | WLAN_STA_ASSOC;
  479. sta_apply_parameters(local, sta, params);
  480. rate_control_rate_init(sta, local);
  481. sta_info_put(sta);
  482. return 0;
  483. }
  484. static int ieee80211_del_station(struct wiphy *wiphy, struct net_device *dev,
  485. u8 *mac)
  486. {
  487. struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
  488. struct sta_info *sta;
  489. if (mac) {
  490. /* XXX: get sta belonging to dev */
  491. sta = sta_info_get(local, mac);
  492. if (!sta)
  493. return -ENOENT;
  494. sta_info_free(sta);
  495. sta_info_put(sta);
  496. } else
  497. sta_info_flush(local, dev);
  498. return 0;
  499. }
  500. static int ieee80211_change_station(struct wiphy *wiphy,
  501. struct net_device *dev,
  502. u8 *mac,
  503. struct station_parameters *params)
  504. {
  505. struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
  506. struct sta_info *sta;
  507. struct ieee80211_sub_if_data *vlansdata;
  508. /* XXX: get sta belonging to dev */
  509. sta = sta_info_get(local, mac);
  510. if (!sta)
  511. return -ENOENT;
  512. if (params->vlan && params->vlan != sta->dev) {
  513. vlansdata = IEEE80211_DEV_TO_SUB_IF(params->vlan);
  514. if (vlansdata->vif.type != IEEE80211_IF_TYPE_VLAN ||
  515. vlansdata->vif.type != IEEE80211_IF_TYPE_AP)
  516. return -EINVAL;
  517. sta->dev = params->vlan;
  518. ieee80211_send_layer2_update(sta);
  519. }
  520. sta_apply_parameters(local, sta, params);
  521. sta_info_put(sta);
  522. return 0;
  523. }
  524. struct cfg80211_ops mac80211_config_ops = {
  525. .add_virtual_intf = ieee80211_add_iface,
  526. .del_virtual_intf = ieee80211_del_iface,
  527. .change_virtual_intf = ieee80211_change_iface,
  528. .add_key = ieee80211_add_key,
  529. .del_key = ieee80211_del_key,
  530. .get_key = ieee80211_get_key,
  531. .set_default_key = ieee80211_config_default_key,
  532. .add_beacon = ieee80211_add_beacon,
  533. .set_beacon = ieee80211_set_beacon,
  534. .del_beacon = ieee80211_del_beacon,
  535. .add_station = ieee80211_add_station,
  536. .del_station = ieee80211_del_station,
  537. .change_station = ieee80211_change_station,
  538. .get_station = ieee80211_get_station,
  539. };