| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990 |
- /* Firmware-layer dispatch: see iwl_fw.h. */
- #include "iwl_fw.h"
- #include "iwl_dvm.h"
- #include "iwl_mvm.h"
- #include "iwl_trans.h"
- int iwlfw_up(unsigned char mac[6])
- {
- if (iwl_probe() == 0 && iwl_is_dvm())
- return iwl_dvm_up(mac);
- return iwl_mvm_up(mac);
- }
- void iwlfw_down(void)
- {
- if (iwl_is_dvm())
- iwl_dvm_down();
- else
- iwl_mvm_down();
- }
- const char *iwlfw_state(void)
- {
- return iwl_is_dvm() ? iwl_dvm_state() : iwl_mvm_state();
- }
- int iwlfw_poll(void)
- {
- return iwl_is_dvm() ? iwl_dvm_poll() : iwl_mvm_poll();
- }
- int iwlfw_scan_start(void)
- {
- return iwl_is_dvm() ? iwl_dvm_scan_start() : iwl_mvm_scan_start();
- }
- int iwlfw_scan_running(void)
- {
- return iwl_is_dvm() ? iwl_dvm_scan_running() : iwl_mvm_scan_running();
- }
- int iwlfw_prepare_connect(const unsigned char bssid[6], unsigned int chan,
- unsigned int beacon_int)
- {
- return iwl_is_dvm() ? iwl_dvm_prepare_connect(bssid, chan, beacon_int)
- : iwl_mvm_prepare_connect(bssid, chan, beacon_int);
- }
- int iwlfw_set_assoc(unsigned short aid, unsigned int beacon_int,
- unsigned int dtim)
- {
- return iwl_is_dvm() ? iwl_dvm_set_assoc(aid, beacon_int, dtim)
- : iwl_mvm_set_assoc(aid, beacon_int, dtim);
- }
- void iwlfw_disconnect(void)
- {
- if (iwl_is_dvm())
- iwl_dvm_disconnect();
- else
- iwl_mvm_disconnect();
- }
- int iwlfw_tx_mgmt(const unsigned char *frame, unsigned int len)
- {
- return iwl_is_dvm() ? iwl_dvm_tx_mgmt(frame, len)
- : iwl_mvm_tx_mgmt(frame, len);
- }
- int iwlfw_tx_data(const unsigned char *frame, unsigned int len, int protect)
- {
- return iwl_is_dvm() ? iwl_dvm_tx_data(frame, len, protect)
- : iwl_mvm_tx_data(frame, len, protect);
- }
- int iwlfw_set_key(int pairwise, int keyidx, const unsigned char key[16],
- const unsigned char rsc[6])
- {
- return iwl_is_dvm() ? iwl_dvm_set_key(pairwise, keyidx, key, rsc)
- : iwl_mvm_set_key(pairwise, keyidx, key, rsc);
- }
- void iwlfw_clear_keys(void)
- {
- if (iwl_is_dvm())
- iwl_dvm_clear_keys();
- else
- iwl_mvm_clear_keys();
- }
|