change report from old OLPC-code to moblinux-v9

Holger Schurig hs4233 at
Tue Apr 15 07:58:04 EDT 2008

I diffed the moblinux-v9 driver against the original Marvell
drop into the OLPC code base. This doesn't mean that our firmware
supports those features, but it gives an interesting read. ;-)

Also note that this list is *NOT* a diff against current 
in-kernel libertas. However, it can give us a hint of what we 
might want to add or try.

wget -O 
0019-marvell_8686_8688.patch ";a=blob_plain;f=debian/patches/0019-marvell_8686_8688.patch;hb=HEAD"

ancient OLPC driver
$ git clone --no-checkout --reference /usr/src/linux-git 
$ cd olpc-2.6
$ git checkout -b ancient 

* added country CA 0x20
* country JP has 0x40 and 0x41
* wlan_generate_domain_info_11d(): reset nr_ofparsedchan in else
* wlan_parse_dnld_countryinfo_11d(): don't parse when roaming

  as allowed in PS.
* wlan_cmd_802_11_ps_mode(): also set beacon miss timeout,
  possibly set adhoc awake period
* added wlan_cmd_802_11_fw_wakeup_method()
* added wlan_host_sleep_activated_event()
* added wlan_host_sleep_deactivated_event()
* added wlan_host_sleep_gpio_int_event()
* added wlan_cmd_802_11_host_sleep_cfg()
* add handling of OID_802_11_REMOVE_WEP to
* removed wlan_cmd_802_11_enable_rsn()
* removed wlan_cmd_802_11_reset()
* removed wlan_cmd_802_11_get_stat()
* changed preamble stuff from wlan_cmd_802_11_radio_control()
  from Adapter->Preamble to Adapter->RadioOn
* added wlan_cmd_802_11_bca_timeshare()
* seems that wlan_cmd_802_11_rate_adapt_rateset() is the
  successor of wlan_cmd_802_11_data_rate()
* added wlan_cmd_802_11_cal_data_ext()
* added wlan_cmd_802_11_IBSS_Coalesced_Status()
* in QueueCmd(), they add HostCmd_CMD_802_11_WAKEUP_CONFIRM,
  HostCmd_CMD_802_11_HOST_SLEEP_ACTIVATE and
  HostCmd_CMD_802_11_HOST_SLEEP_CFG to the front
* added wlan_cmd_mfg_cmd()
* DownloadCommandToStation() maintains some debug info:
* DownloadCommandToStation() adds a longer command timeout
* DownloadCommandToStation() has code for CMD_802_11_DEEP_SLEEP
* removed SetRadioControl()
* removed SetMacPacketFilter()
* PrepareAndSendCommand() doesn't set Adapter->SeqNum anymore,
  this might be in DownloadCommandToStation()
* PrepareAndSendCommand() removed CMD_802_11_REASSOCIATE case
* PrepareAndSendCommand() removed CMD_CODE_DNLD case
* PrepareAndSendCommand() removed CMD_802_11_AUTHENTICATE case
* PrepareAndSendCommand() removed CMD_802_11_GET_STAT case
* PrepareAndSendCommand() removed CMD_802_11_DATA_RATE case
* PrepareAndSendCommand() removed CMD_802_11_ENABLE_RSN case
* PrepareAndSendCommand() removed CMD_802_11_PAIRWISE_TSC case
* PrepareAndSendCommand() removed CMD_802_11_GROUP_TSC case
* PrepareAndSendCommand() added CMD_802_11_DEEP_SLEEP case
* PrepareAndSendCommand() added CMD_802_11_HOST_SLEEP_CFG case
* PrepareAndSendCommand() added CMD_802_11_WAKEUP_CONFIRM case
* PrepareAndSendCommand() added CMD_802_11_HOST_SLEEP_ACTIVATE
* PrepareAndSendCommand() removed CMD_802_11_SET_AFC case
* PrepareAndSendCommand() removed 802_11_GET_AFC case
* PrepareAndSendCommand() added CMD_MFG_COMMAND case
* PrepareAndSendCommand() added CMD_802_11_BCA_CONFIG_TIMESHARE
* PrepareAndSendCommand() added CMD_802_11_BG_SCAN_CONFIG case
* PrepareAndSendCommand() added CMD_802_11_BG_SCAN_QUERY case
* PrepareAndSendCommand() added CMD_802_11_FW_WAKE_METHOD case
* PrepareAndSendCommand() added CMD_WMM_GET_STATUS case
* PrepareAndSendCommand() added CMD_WMM_ADDTS_REQ case
* PrepareAndSendCommand() added CMD_WMM_DELTS_REQ case
* PrepareAndSendCommand() added CMD_WMM_QUEUE_CONFIG case
* PrepareAndSendCommand() added CMD_WMM_QUEUE_STATS case
* PrepareAndSendCommand() added CMD_TX_PKT_STATS case
* PrepareAndSendCommand() removed CMD_802_11_PWR_CFG case
* PrepareAndSendCommand() added CMD_802_11_IBSS_COALESCING_STATUS
* PrepareAndSendCommand() added CMD_SDIO_PULL_CTRL case
* PrepareAndSendCommand() added CMD_802_11_LDO_CONFIG case
* PrepareAndSendCommand() added CMD_VERSION_EXT case
* CleanUpCmdCtrlNode() cleans CmdFlags
* in ExecuteNextCommand() the part with the comment "check if
  in power save mode, if yes, put the device back to PS mode"
  is only executed when Adapter->MediaConnectStatus ==
  WlanMediaStateConnected. Also some if() cases inside this
  block have changed. Still my eyes hurt when I look at that
  code ...
* ExecuteNextCommand() added section for deep sleep
* removed send_iwevcustom_event()
* added MrvDrvCommandTimerFunction() that handles re-sending
  a timed-out command
* SendConfirmSleep() also maintains some Adapter->dbg.*
* SendConfirmSleep() has code for Host Sleep
* SendConfirmSleep() has something with 300 kHz SDIO clock
* PSSleep() might now work also in AdHoc mode
* PSConfirmSleep() greatly simplified

* MacEventDisconnected() calls wlan_clean_txrx()
* MacEventDisconnected() has removed some Cisco EAP special
* MacEventDisconnected() sends an SIOCGIWAP event
* MacEventDisconnected() doesn't reset Adapter->AdHocCreated,
  Adapter->SecInfo.Auth1XAlg, Adapter->LinkSpeed, but clears
* removed HandleMICFailureEvent(), re-added as
* wlan_ret_get_hw_spec() simpliefied
* wlan_ret_get_hw_spec() doesn't change Adapter->RegionTableIndex
* lots of additions/removals that mimick wlan_cmd.c
* wlan_ret_802_11_snmp_mib() also set Adapter->TxRetryCount
* wlan_ret_802_11_key_material() remembers if GTK has been set
* wlan_ret_802_11_rf_tx_power() saves Adapter->MaxTxPowerLevel
  and Adapter->MniTxPowerLevel
* added wlan_clean_txrx() which does stops queue, turns
  carrier off, the same for wmm, etc
* wlan_process_rx_command() got a section for host sleep
* wlan_process_rx_command() removed special casing for
* wlan_process_rx_command() sends an SIOCGIWSCAN event on
* wlan_process_rx_command() no longer calls
  wlan_ret_802_11_associate() on RET_802_11_REASSOCIATE
* wlan_process_rx_command() no longer calls
  wlan_ret_802_11_disassociate() on RET_802_11_DEAUTHENTICATE
* wlan_process_event() maintains some Adapter->dbg.* variables
* wlan_process_event() reacts to
* wlan_process_event() added MACREG_INT_CODE_DEEP_SLEEP_AWAKE
* wlan_process_event() added MACREG_INT_CODE_HOST_SLEEP_AWAKE
* wlan_process_event() added MACREG_INT_CODE_BG_SCAN_REPORT
* wlan_process_event() added MACREG_INT_CODE_WMM_STATUS_CHANGE
* wlan_process_event() sends custom wireless events, e.g. on
  RSSI low
* wlan_process_event() added MACREG_INT_CODE_IBSS_COALESCED

* added tons of stuff to debugfs, e.g. ConnectStatus,
  wmmQStp, wmmPkts, Adapter->dbg.* vars

* added mfgmode kernel module parameter
* wlan_setup_station_hw(): changed CMD_GET_HW_SPEC code related
  to getting the MAC address
* wlan_setup_station_hw(): doesn't call SetMacPacketFilter()
* wlan_setup_station_hw(): doesn't set max TX power anymore
* wlan_setup_station_hw(): get firmware make method
* wlan_setup_station_hw(): use CMD_802_11_RATE_ADAPT_RATESET
  instead of CMD_802_11_DATA_RATE
* wlan_init_adapter(): lot's of little changes, mostly in
  intializing Adapter->xxxx fields
* removed MrvDrvCommandTimerFunction()
* removed MrvDrvTimerFunction()

* added wlan_pm_suspend()
* added wlan_pm_resume()
* added wlan_pm_release()
* removed channel_freq_power_JPN_BG[], added
  channel_freq_power_JPN41_BG[] and channel_freq_power_JPN40_BG[]
* region_cfp_table[]: also the japan change
* removed usb_fw_ready (uses Adapter->HardwareStatus now)
* removed fw_name
* wlan_close() now uses wlan_clean_txrx()
* misc changes to PM, e.g. wlan_pm_callback() now calls
  sbi_set_bus_clock(), but there are numrous other changes
  here as well
* wlan_hard_start_xmit() removed code section commented with
  "Transmit succeeded"
* wlan_tx_timeout() greatly simplified
* wlan_set_multicast_list() doesn't set/clear
  HostCmd_ACT_MAC_MULTICAST_ENABLE in three cases
* wlan_service_main_thread() is WMM enabled
* wlan_service_main_thread() does something with
* wlan_service_main_thread() got big code section for
* wlan_service_main_thread() got rid of "workaround for firmware
  sending deauth/linkloss event immediately after sleep request"
* wlan_service_main_thread() has also lots of normal and host
  sleep code changed
* wlan_remove_card() calls wlan_clean_txrx()
* wlan_remove_card() special cases Adapter->IsDeepSleep
* removed cleanup_txqueues()
* removed wlan_process_txqueue()
* wlan_interrupt() maintains priv->adapter->WakeupTries
  and probably sets some SD clock via sd_set_clock()

* added wlan_check_subscribe_event()
* removed MRVDRV_RXPD_STATUS_OK failure test
* removed lots of radiotap stuff

* removed lots of radiotap stuff
* SendSinglePacket() checks for WMM
* SendSinglePacket() does something with SDIO_HEADER_LEN
* wlan_tx_packet() does WMM
* SendNullPacket() does WMM and something with
* removed SendTxFeedback()

wlan_wmm.c: added

wlan_join.c: not diffed yet
wlan_proc.c: not diffed yet
wlan_scan.c: not diffed yet
wlan_wext.c: not diffed yet

All in all it seems that Marvell also manged to get v9 
big-/little-endian clean. Well, mostly. Some things, like 
wlan_ret_802_11_stat(), aren't there yet.

More information about the libertas-dev mailing list