Take off or raise (one's hat) as a greeting or token of respect.
Time was, people talked about doffing and donning articles of wear with about the same frequency. But in the mid-19th century the verb don became significantly more popular and left doff to flounder a bit in linguistic semi-obscurity. Doff and don have been a pair from the start: both date to the 14th century, with doff coming from a phrase meaning "to do off" and don from one meaning "to do on." Shakespeare was first, as far as we know, to use the word as it's defined at sense 2. He put it in Juliet's mouth: "What's in a name? That which we call a rose / By any other name would smell as sweet. / … Romeo, doff thy name; / And for that name, which is no part of thee, / Take all myself."
— doff one's hat to or doff one's cap to
: to show respect to : salute