Changeset 09044cb in mainline for uspace/drv/nic/ar9271
- Timestamp:
- 2015-04-22T09:42:36Z (10 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 8a64320e
- Parents:
- cc575ef9
- Location:
- uspace/drv/nic/ar9271
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/nic/ar9271/ar9271.c
rcc575ef9 r09044cb 463 463 } 464 464 465 if(key_conf->flags & IEEE80211_KEY_FLAG_TYPE_PAIRWISE) { 466 reg_ptr = AR9271_KEY_TABLE_STA; 467 mic_reg_ptr = AR9271_KEY_TABLE_MIC_STA; 468 } else { 469 reg_ptr = AR9271_KEY_TABLE_GRP; 470 mic_reg_ptr = AR9271_KEY_TABLE_MIC_GRP; 471 } 472 465 uint8_t key_id = 466 (key_conf->flags & IEEE80211_KEY_FLAG_TYPE_PAIRWISE) ? 467 AR9271_STA_KEY_INDEX : key_conf->id; 468 469 reg_ptr = AR9271_KEY_TABLE(key_id); 470 mic_reg_ptr = AR9271_KEY_TABLE(key_id + 64); 473 471 data_start = (void *) key_conf->data; 474 472 … … 558 556 ieee80211_setup_key_confirm(ieee80211_dev, true); 559 557 } else { 560 / / TODO: Delete keys from device558 /* TODO: Delete keys from device */ 561 559 ieee80211_setup_key_confirm(ieee80211_dev, false); 562 560 } … … 591 589 (htc_tx_data_header_t *) 592 590 (complete_buffer + sizeof(htc_frame_header_t)); 593 /* TODO: Distinguish data type. */594 591 data_header->data_type = HTC_DATA_NORMAL; 595 592 data_header->node_idx = 1; 596 593 data_header->vif_idx = 0; 597 /* TODO: There I should probably handle slot number. */598 594 data_header->cookie = 0; 599 595 … … 639 635 mgmt_header->node_idx = 0; 640 636 mgmt_header->vif_idx = 0; 641 /* TODO: There I should probably handle slot number. */642 637 mgmt_header->cookie = 0; 643 638 mgmt_header->keyix = 0xFF; -
uspace/drv/nic/ar9271/ar9271.h
rcc575ef9 r09044cb 136 136 137 137 /* Key related registers */ 138 AR9271_KEY_TABLE_GRP = 0x8820, 139 AR9271_KEY_TABLE_STA = 0x8880, 140 AR9271_KEY_TABLE_MIC_GRP = 0x9020, 141 AR9271_KEY_TABLE_MIC_STA = 0x9080, 138 AR9271_KEY_TABLE_BASE = 0x8800, 142 139 AR9271_KEY_TABLE_TYPE_WEP40 = 0x0, 143 140 AR9271_KEY_TABLE_TYPE_WEP104 = 0x1, … … 186 183 AR9271_FW_OFFSET = 0x903000, 187 184 } ar9271_registers_t; 185 186 /** Compute key table base position for key by its id. */ 187 #define AR9271_KEY_TABLE(id) (AR9271_KEY_TABLE_BASE + (id)*32) 188 188 189 189 /** AR9271 Requests */
Note:
See TracChangeset
for help on using the changeset viewer.