capmt: small cosmetic optimization
capmt: fixes for the adapter index
capmt: recode - use polling and write queue